1

When trying to compile my own kernel for FreeBSD 8.0, and I'm having some issues. In fact, I can't even re-compile the GENERIC kernel with no changes!

The last few lines before I get errors when running make depend are...

../../../amd64/amd64/genassym.c:227: error: 'struct pcpu' has no member named 'pc_tss'
../../../amd64/amd64/genassym.c:241: error: 'GUCODE32_SEL' undeclared here (not in a function)
../../../amd64/amd64/genassym.c:242: error: 'GUFS32_SEL' undeclared here (not in a function)
../../../amd64/amd64/genassym.c:243: error: 'GUGS32_SEL' undeclared here (not in a function)
../../../amd64/amd64/genassym.c:246: error: 'SEL_RPL_MASK' undeclared here (not in a function)
*** Error code 1

Stop in /usr/src/sys/i386/compile/GENERIC.

This, again, with no changes to the GENERIC kernel. My custom kernel is only adding VESA and SC_PIXEL_MODE, but errors in the same way.

EDIT: Interestingly enough, when running make cleandepend, I get the following output, despite compiling on an amd64 machine and install of FreeBSD.

rm -f .depend machine amd64 cd ../../../modules; MAKEOBJDIRPREFIX=/usr/src/sys/i386/compile/SANDERS/modules KMODDIR=/boot/kernel DEBUG_FLAGS="-g" MACHINE=i386 KERNBUILDDIR="/usr/src/sys/i386/compile/SANDERS" SYSDIR="/usr/src/sys/i386/compile/SANDERS/../../.." make  cleandepend
===> aac (cleandepend) rm -f @ machine amd64 rm -f .depend GPATH GRTAGS GSYMS GTAGS
===> accf_data (cleandepend) rm -f @ machine amd64 rm -f .depend GPATH GRTAGS GSYMS GTAGS
===> accf_dns (cleandepend) rm -f @ machine amd64 rm -f .depend GPATH GRTAGS GSYMS GTAGS
===> accf_http (cleandepend) rm -f @ machine amd64 rm -f .depend GPATH GRTAGS GSYMS GTAGS
===> acpi (cleandepend)
===> acpi/acpi (cleandepend) "Makefile", line 4: "ACPI can only be compiled into the kernel on the amd64 and ia64 platforms"
*** Error code 1

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

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

Stop in /usr/src/sys/i386/compile/SANDERS.

Any insight would be much appreciated :)

EDIT:

Output of uname -a is

FreeBSD jbirch.net 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64

and I'm afraid /usr/make.conf and /usr/src.conf don't exist. I pulled up the relevant man pages, which told me they usually reside in /etc/, but they didn't exist there either.

1 Answer 1

0

It looks like the system is trying to build an i386 kernel on your amd64 system. Can you post the output of "uname -a", the contents of /usr/make.conf and /usr/src.conf please?

Update:

Having re-read the original question it appears you're not following the standard build process as outlined in the Handbook, which is probably why things are going wrong. You should be running make buildkernel to build a new kernel, and make installkernel to install it; make depend etc. are run as part of the build internally, but haven't been required to be run manually since the 4.x days.

3
  • That's something I considered, but I'd have thought that you'd be able to build a 32 bit kernel on a 64 bit system. Oh well, I'll edit my original post with the output and contents above.
    – JBirch
    Aug 24, 2010 at 5:46
  • I've updated my answer based on re-reading the question: you shouldn't be running "make depend" - all you need is "make buildkernel".
    – BCran
    Aug 25, 2010 at 10:47
  • That seems to be compiling the kernel fine! Thank you for the clarification.
    – JBirch
    Aug 29, 2010 at 5:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .