kernel compile: syntax error

Hi all,

I thought I would recompile the kernel on my VPS using the kernel configuration file that SirDice kindly shared with us in an earlier thread.

Something is going wrong here. It appears to be in line #1, which is nothing more than
Code:
cpu             HAMMER
. I don't see any other problems with the file. My installation would appear to be adequate as I can compile GENERIC.

Here is SirDice's config file: http://pastebin.com/41uUHpKj

Any thoughts what might be going wrong here?

$ time sudo make buildkernel KERNCONF=VPS

--------------------------------------------------------------
>>> Kernel build for VPS started on Sat Sep 22 21:08:28 CEST 2012
--------------------------------------------------------------
===> VPS
mkdir -p /usr/obj/usr/src/sys

--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/i386/conf; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin config -d /usr/obj/usr/src/sys/VPS /usr/src/sys/i386/conf/VPS
config: /usr/src/sys/i386/conf/VPS:1: syntax error
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


$ uname -rps
FreeBSD 9.0-RELEASE i386
 
Code:
$ hd VPS | head -n2
00000000  63 70 75 20 20 20 20 20  20 20 20 20 20 20 20 20  |cpu             |
00000010  48 41 4d 4d 45 52 0d 0a  69 64 65 6e 74 20 20 20  |HAMMER..ident   |
 
If I understand your answer correctly, how then to I force make to build an AMD64 kernel, if that is what is required?
 
The option is not valid for an i386 kernel, replace it with for example:
Code:
cpu             I486_CPU
cpu             I586_CPU
cpu             I686_CPU

Read the i386 /usr/src/sys/i386/conf/GENERIC configuration file for more information.
 
cbrace said:
Code:
$ hd VPS | head -n2
00000000  63 70 75 20 20 20 20 20  20 20 20 20 20 20 20 20  |cpu             |
00000010  48 41 4d 4d 45 52 0d 0a  69 64 65 6e 74 20 20 20  |HAMMER..ident   |

In addition to the amd64/i386 problem, cut and paste of that file has added MS-DOS line endings (0d 0a) and changed tabs to spaces. I don't know for a fact that either is a problem, but would suspect the carriage returns.
 
Fixed! Thanks. I pasted it into Gedit and saved it anew. FWIW, here is what it looks like now:
Code:
00000000  63 70 75 20 20 20 20 20  20 20 20 20 20 20 20 20  |cpu             |
00000010  49 36 38 36 5f 43 50 55  0a 69 64 65 6e 74 20 20  |I686_CPU.ident  |

In case you anyone else uses the same config file, make returned another error message about a minute into the process:
/usr/src/sys/i386/i386/mp_machdep.c:42:2: error: #error The apic device is required for SMP, add "device apic" to your config file.
So I added this line from GENERIC:
Code:
device		apic			# I/O APIC
Perhaps SirDice was compiling a kernel for a single-core VPS or maybe this isn't required for the AMD64 architecture.
 
Thanks WB, great tip.

I can now confirm that "apic" is not needed under AMD64 kernel compiles.
 
I compiled a new kernel on my AMD64 server with SirDice's config file and it wouldn't boot. Back to GENERIC.

igb and bce returned errors, so I commented them out. However, I don't know what module is failing here:
/usr/src/sys/modules/netgraph/atm/uni/../../../../contrib/ngatm/netnatm/sig/sig_party.c: In function 'uni_sig_party':
/usr/src/sys/modules/netgraph/atm/uni/../../../../contrib/ngatm/netnatm/sig/sig_party.c:916: internal compiler error: in symbol_marked_for_renaming, at tree-into-ssa.c:548
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph/atm/uni.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph/atm.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1
I can't find (netnatm | netgraph | atm | ngatmin) in GENERIC.

Thanks.
 
Back
Top