Hi,
I'm trying to compile a 10.2-RELEASE kernel for my Soekris i386 1 GByte memory system (the target system). Due to it's slowness, I'm compiling the kernel on a AMD64 system (the build system).
Unfortunately, I'm getting compile errors, and I wonder if I might have done some silly. This is not unlikely: this is in fact the first time I'm attempting to build a custom FreeBSD kernel.
The build system runs FreeBSD 10.2-RELEASE #0 r2886666.
So far, I've done:
1. Ensure my build system is up-to-date.
I assume that
2. Create a kernel configuration.
3. Build compiler
4. Build kernel
Here are some relevant excerpts from buildkernel.log:
....
It seems some of the sources are old (would
Regards,
Freek
I'm trying to compile a 10.2-RELEASE kernel for my Soekris i386 1 GByte memory system (the target system). Due to it's slowness, I'm compiling the kernel on a AMD64 system (the build system).
Unfortunately, I'm getting compile errors, and I wonder if I might have done some silly. This is not unlikely: this is in fact the first time I'm attempting to build a custom FreeBSD kernel.
The build system runs FreeBSD 10.2-RELEASE #0 r2886666.
So far, I've done:
1. Ensure my build system is up-to-date.
I assume that
freebsd-update
also updates /usr/src. freebsd-update fetch
reports No updates needed to update system to 10.2-RELEASE-p5. pkg update; pkg upgrade
report All repositories are up-to-date and Your packages are up to date.2. Create a kernel configuration.
cat [FILE]/usr/src/sys/i386/conf/SOEKRIS_ZFS[/FILE]
Code:
include GENERIC
options CPU_SOEKRIS
options KSTACK_PAGES=4
options KVA_PAGES=320
3. Build compiler
make kernel-toolchain
exited normally.4. Build kernel
make DESTDIR=/root/kernels/wolfje TARGET=i386 KERNCONF=SOEKRIS_ZFS buildkernel 2>&1 | tee /root/kernels/buildkernel.log
Here are some relevant excerpts from buildkernel.log:
Code:
>>> Kernel build for SOEKRIS_ZFS started on Sun Oct 18 22:31:58 CEST 2015
--------------------------------------------------------------
===> SOEKRIS_ZFS
mkdir -p /usr/obj/i386.i386/usr/src/sys
--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/i386/conf; PATH=/usr/obj/i386.i386/usr/src/tmp/legacy/usr/sbin:/usr/obj/i386.i386/usr/src/tmp/legacy/usr/bin:/usr/obj/i386.i386/usr/src/tmp/legacy/usr/games:/usr/obj/i386.i386/usr/src/tmp/legacy/bin:/usr/obj/i386.i386/usr/src/tmp/usr/sbin:/usr/obj/i386.i386/usr/src/tmp/usr/bin:/usr/obj/i386.i386/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin config -d /usr/obj/i386.i386/usr/src/sys/SOEKRIS_ZFS -I '/usr/src/sys/i386/conf' '/usr/src/sys/i386/conf/SOEKRIS_ZFS'
Kernel build directory is /usr/obj/i386.i386/usr/src/sys/SOEKRIS_ZFS
Don't forget to do ``make cleandepend && make depend''
Code:
cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -gdwarf-2 /usr/src/sys/i386/i386/genassym.c
In file included from /usr/src/sys/i386/i386/genassym.c:44:
In file included from /usr/src/sys/sys/systm.h:42:
./machine/cpufunc.h:487:41: warning: cast to 'char *' from smaller integer type 'u_int' (aka 'unsigned int') [-Wint-to-pointer-cast]
__asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory");
^
In file included from /usr/src/sys/i386/i386/genassym.c:47:
In file included from /usr/src/sys/sys/buf.h:261:
In file included from /usr/src/sys/sys/proc.h:62:
In file included from /usr/src/sys/sys/pcpu.h:48:
In file included from ./machine/pcpu.h:36:
./machine/segments.h:91:29: error: use of undeclared identifier 'NLDT'
extern union descriptor ldt[NLDT];
^
In file included from /usr/src/sys/i386/i386/genassym.c:76:
In file included from ./machine/pcb.h:45:
In file included from ./machine/npx.h:44:
./x86/fpu.h:132:1: error: use of 'savefpu' with tag type that does not match previous declaration
struct savefpu {
^~~~~~
union
./machine/md_var.h:91:7: note: previous use is here
union savefpu;
^
It seems some of the sources are old (would
freebsd-update
also updates /usr/src?), or not using the right headers (is TARGET=i386
properly recognised?) Am I using the correct invocation of these calls?Regards,
Freek