Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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     root@mason.cse.buffalo.edu:/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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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 '10 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". –  Bruce Cran Aug 25 '10 at 10:47
    
That seems to be compiling the kernel fine! Thank you for the clarification. –  JBirch Aug 29 '10 at 5:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.