Date: Fri, 19 Jul 2019 09:28:01 +0200 From: Gary Jennejohn <gljennjohn@gmail.com> To: Norbert Koch <nkoch@demig.de> Cc: <freebsd-hackers@freebsd.org> Subject: Re: build custom kernel under FreeBSD 12 Message-ID: <20190719092801.06bc415e@ernst.home> In-Reply-To: <fb4819d6-164f-66f7-9e04-dd121e12b2bf@demig.de> References: <14ad0148-ebe6-5d13-54fa-f6711c4b43ab@demig.de> <CAFMmRNxyHQLi6dorUDYqk1yrN2DhZ06%2BExX2xvMPs%2BvKXwWVsw@mail.gmail.com> <fb4819d6-164f-66f7-9e04-dd121e12b2bf@demig.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jul 2019 08:40:05 +0200 Norbert Koch <nkoch@demig.de> wrote: > Here is a typescript: > > 12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ export > MAKEOBJDIRPREFIX=`realpath tmp` > 12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ echo $MAKEOBJDIRPREFIX > /usr/home/nk/src/kernel/src/tmp > > 12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ make buildkernel > make[1]: "/usr/home/nk/src/kernel/src/Makefile.inc1" line 341: > SYSTEM_COMPILER: Determined that CC=cc matches the source tree. Not > bootstrapping a cross-compiler. > make[1]: "/usr/home/nk/src/kernel/src/Makefile.inc1" line 348: > SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. > > -------------------------------------------------------------- > >>> Kernel build for GENERIC started on Fri Jul 19 08:34:27 CEST 2019 > -------------------------------------------------------------- > ===> GENERIC > mkdir -p /usr/src/sys > > -------------------------------------------------------------- > >>> stage 1: configuring the kernel > -------------------------------------------------------------- > cd /usr/home/nk/src/kernel/src/sys/i386/conf; > PATH=/usr/src/tmp/legacy/usr/sbin:/usr/src/tmp/legacy/usr/bin:/usr/src/tmp/legacy/bin:/usr/src/tmp/usr/sbin:/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin > config__ -d /usr/src/sys/GENERIC__ -I > '/usr/home/nk/src/kernel/src/sys/i386/conf' > '/usr/home/nk/src/kernel/src/sys/i386/conf/GENERIC' > config: /usr/src/sys/GENERIC: Permission denied > *** Error code 2 > > Stop. > make[1]: stopped in /usr/home/nk/src/kernel/src > *** Error code 1 > > Stop. > make: stopped in /usr/home/nk/src/kernel/src > It's peculiar that you have a mix of /usr/src and /usr/home/nk/src. Looking at /usr/src/Makefile.inc1 it would appear that you may also have to set KRNLOBJDIR to /usr/home/nk/src/kernel/src. Does the tmp directory really exist? Seems like a weird choice. I did what Ryan suggested and was able to make build{kernel,world} from /usr/src with no problem. But I haven't modified the kernel sources. > > Am 2019-07-18 um 19:22 schrieb Ryan Stone: > > How are you setting MAKEOBJDIRPREFIX? It needs to be set in your > > environment, i.e. > > > > $ export MAKEOBJDIRPREFIX=$HOME/obj > > $ make buildkernel > > > > Trying 'make MAKEOBJDIRPREFIX=$HOME/obj buildkernel' will fail in > > strange ways due to how make passes arguments to sub-makes. > > > > On Thu, Jul 18, 2019 at 9:53 AM Norbert Koch <nkoch@demig.de> wrote: > >> Hello. > >> > >> I am obviously too stupid to figure out how to build a custom kernel > >> as non-root user in a non-standard directory. > >> Under FreeBSD9/10/11 I could put src/ under my own directory > >> and start a kernel-compilation by just setting $MAKEOBJDIRPREFIX > >> accordingly. Doing this under FreeBSD12 gives me 'permission denied' > >> with 'config -d /usr/src/sys/GENERIC ...'. Seems like ${KRNLOBJDIR} is > >> not set correctly while the other parameters to config are. > >> I see that Makefiles differ between 12 and older releases. > >> ${OBJTOP} vs. ${OBJTREE}? > >> > >> So, what am I doing wrong? > >> > >> Thank you for any help. -- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190719092801.06bc415e>