Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Where does the kernel get built?



I have been having problems building on -current. I finally got a current snapshot and unpacked the sets. I checked out a brand new /usr/src. Then, as an experiment, I took away all my permissions to write in /usr/src and gave myself ownership of /usr/obj. Doing a "grep -i obj /etc/mk.conf" yields this:

MKOBJDIRS =                    YES
MKOBJ =                        YES
WRKOBJDIR =                     /usr/obj
MAKEOBJDIRPREFIX =              /usr/obj
TOOLDIR =                       /usr/obj/tools
OBJMACHINE =                    /usr/obj
BSDOBJDIR =                     /usr/obj
RELEASEDIR =                    /usr/obj/release

Theoretically I should have been able to build everything as myself. I was able to complete "./build.sh tools" except that the only tools built were nbmake and nbmake-i386.

I then tried "./build.sh kernel=GENERIC" which I expected to fail but I didn't expect this result:

all ===> tools
echo /usr/obj/tools >PREVIOUSTOOLDIR
all ===> lib
all ===> lib/csu
#   compile  csu/crt0.o
gcc -O2 -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Werror -DELFSIZE=32 -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/csu/common -I. -c -fPIC /usr/src/lib/csu/common/crt0-common.c -o crt0.o.c.o
Assembler messages:
Fatal error: can't create crt0.o.c.o: Permission denied
*** Error code 1

I then repeated the above as root. Same result for "./build.sh tools" but then this for "./build.sh kernel=GENERIC":

===> build.sh command:    ./build.sh kernel=GENERIC
===> build.sh started:    Sat Nov 26 09:49:10 EST 2011
===> NetBSD version:      5.99.57
===> MACHINE:             i386
===> MACHINE_ARCH:        i386
===> Build platform:      NetBSD 5.99.56 i386
===> HOST_SH:             /bin/sh
===> TOOLDIR path:        /usr/obj/tools
===> DESTDIR path:        /usr/obj/usr/src/destdir.i386
===> RELEASEDIR path:     /usr/obj/release
===> Updated makewrapper: /usr/obj/tools/bin/nbmake-i386
===> Building kernel without building new tools
===> Building kernel:     GENERIC
===> Build directory:     /usr/obj/usr/src/sys/arch/i386/compile/GENERIC
(cd /usr/obj/usr/src/sys/arch/i386/compile/GENERIC && rm -f a.out [Ee]rrs mklog core *.core .gdbinit || true)

ERROR: /usr/obj/tools/bin/nbconfig does not exist. You need to "./build.sh tools" first.
*** BUILD ABORTED ***

To be expected since the tools did not actually build. I'm not sure if these two issues are related. So, two questions:

1.  Why don't all of the tools get built?
2.  Why is it trying to create files in /usr/src?

--
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/


Home | Main Index | Thread Index | Old Index