NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
HowTo: Kernel Compilation Problem
Dear Group Members,
I am trying to compile kernel of NetBSD 4.0.
The kernel configuration file is just the copy of GENERIC conf file in
/usr/src/sys/arch/i386/conf with the name mykernel.
I tried to compile it with build.sh
Few errors that i got and solved are as follows:
$ cd /usr/src
$ ./build.sh -u kernel=MYKERNEL
cmj-cnie-netbsd1# ./build.sh kernel=mykernel
===> build.sh command: ./build.sh kernel=my
===> build.sh started: Mon Feb 23 14:03:08 IST 2009
===> NetBSD version: 4.0
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> Build platform: NetBSD 4.0.1 i386
===> HOST_SH: /bin/sh
===> No nonexistent/bin/nbmake, needs building.
===> Bootstrapping nbmake
//lots of output
BSDOBJDIR /usr/obj does not exist, bailing...
*** Failed target: obj
*** Failed command: cd /usr/src/tools; here=`/bin/pwd`/;
subdir=${here#/usr/src/}; if [ "$here" != "$subdir" ] ; then if [ ! -d
/usr/obj ]; then echo "BSDOBJDIR /usr/obj does not exist, bailing..."; exit
1; fi; subdir=${s ubdir%/}; dest=/usr/obj/$subdir; if [ -x
/usr/src/tooldir.NetBSD-4.0.1-i386/bin/nbstat ] && ttarg=`/usr/src/to
oldir.NetBSD-4.0.1-i386/bin/nbstat -qf '%Y' ${here}obj` && [ "$dest" =
"$ttarg" ]; then : ; else echo '# ' " o bjdir $dest"; rm -rf obj; ln -s
$dest obj; fi; if [ ! -d $dest ]; then mkdir -p $dest; else true; fi; else
tru e ; dest=${here}obj ; if [ ! -d obj ] || [ -h obj ]; then echo '# ' "
objdir $dest"; rm -f obj; mkdir $dest; f i ; fi;
*** Error code 1
Stop.
nbmake: stopped in /usr/src/tools
ERROR: Failed to make obj in tools
*** BUILD ABORTED ***
Fix:
------------------------
In addition to creating the src directory I run the following as root:
cmj-cnie-netbsd1# mkdir /usr/obj
cmj-cnie-netbsd1# chown uttam /usr/obj
Again:
ERROR: nbconfig failed for mykernel
*** BUILD ABORTED ***
The reason for this error was that nbconfig tool was not found in the
/usr/src/tooldir.NetBSD-4.0.1-i386/bin
So I required to build the tools using build.sh script as follows:
$ cd /usr/src
./build.sh -a i386 tools // -a means architecture
Again when i compiled with build.sh, stuck into the following errors:
pciide_common.o: In function `pciide_pci_intr':
pciide_common.c:(.text+0x45e): undefined reference to `wdcintr'
pciide_common.o: In function `pciide_mapregs_native':
pciide_common.c:(.text+0x864): undefined reference to `wdc_init_shadow_regs'
pciide_common.o: In function `pciide_mapregs_compat':
pciide_common.c:(.text+0xabc): undefined reference to `wdc_init_shadow_regs'
pciide_common.o: In function `default_chip_map':
pciide_common.c:(.text+0xe33): undefined reference to `wdc_allocate_regs'
pciide_common.c:(.text+0xe84): undefined reference to `wdcattach'
pciide_common.c:(.text+0xfff): undefined reference to `wdcprobe'
pciide_common.c:(.text+0x10ce): undefined reference to `wdcprobe'
pciide_common.c:(.text+0x1116): undefined reference to `wdcattach'
pciide_common.o: In function `pciide_compat_intr':
pciide_common.c:(.text+0x4b1): undefined reference to `wdcintr'
pciide_common.o: In function `pciide_mapchan':
pciide_common.c:(.text+0xba7): undefined reference to `wdcattach'
pciide_common.c:(.text+0xbe2): undefined reference to `wdcattach'
piixide.o: In function `piixsata_chip_map':
piixide.c:(.text+0x31a): undefined reference to `wdc_allocate_regs'
piixide.o: In function `piix_chip_map':
piixide.c:(.text+0x58d): undefined reference to `wdc_allocate_regs'
azalia.o: In function `azalia_attach_intr':
azalia.c:(.text+0x2b09): undefined reference to `audio_attach_mi'
wdc_isapnp.o: In function `wdc_isapnp_attach':
wdc_isapnp.c:(.text+0x11e): undefined reference to `wdcintr'
wdc_isapnp.c:(.text+0x190): undefined reference to `wdc_init_shadow_regs'
wdc_isapnp.c:(.text+0x1a2): undefined reference to `wdcattach'
*** Failed target: netbsd
*** Failed command: echo '# ' "
and few ouput and at the end was
*** Error code 1
Stop.
nbmake: stopped in /usr/obj/sys/arch/i386/compile/mykernel
ERROR: Failed to make all in /usr/src/sys/arch/i386/compile/obj/mykernel
*** BUILD ABORTED ***
What should I do to fix the problem??
Thanks in advance
Uttam
Home |
Main Index |
Thread Index |
Old Index