Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2019 08:40:05 +0200
From:      Norbert Koch <nkoch@demig.de>
To:        <freebsd-hackers@freebsd.org>
Subject:   Re: build custom kernel under FreeBSD 12
Message-ID:  <fb4819d6-164f-66f7-9e04-dd121e12b2bf@demig.de>
In-Reply-To: <CAFMmRNxyHQLi6dorUDYqk1yrN2DhZ06%2BExX2xvMPs%2BvKXwWVsw@mail.gmail.com>
References:  <14ad0148-ebe6-5d13-54fa-f6711c4b43ab@demig.de> <CAFMmRNxyHQLi6dorUDYqk1yrN2DhZ06%2BExX2xvMPs%2BvKXwWVsw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Here is a typescript:

=1B12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ export=20
MAKEOBJDIRPREFIX=3D`realpath tmp`
12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ echo $MAKEOBJDIRPREFIX
/usr/home/nk/src/kernel/src/tmp

=1B12.0-RELEASE-p7 (3) nk@entw-pr4 [~/src/kernel/src] $ make buildkernel
make[1]: "/usr/home/nk/src/kernel/src/Makefile.inc1" line 341:=20
SYSTEM_COMPILER: Determined that CC=3Dcc matches the source tree. Not=20
bootstrapping a cross-compiler.
make[1]: "/usr/home/nk/src/kernel/src/Makefile.inc1" line 348:=20
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
--------------------------------------------------------------
=3D=3D=3D> GENERIC
mkdir -p /usr/src/sys

--------------------------------------------------------------
 >>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/home/nk/src/kernel/src/sys/i386/conf;=20
PATH=3D/usr/src/tmp/legacy/usr/sbin:/usr/src/tmp/legacy/usr/bin:/usr/src/tm=
p/legacy/bin:/usr/src/tmp/usr/sbin:/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbi=
n:/usr/bin=20
config=C2=A0 -d /usr/src/sys/GENERIC=C2=A0 -I=20
'/usr/home/nk/src/kernel/src/sys/i386/conf'=20
'/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


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=3D$HOME/obj
> $ make buildkernel
>
> Trying 'make MAKEOBJDIRPREFIX=3D$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.
>>
>>
>> ***********************************************************************
>> * demig Prozessautomatisierung GmbH     *  demig Anlagentechnik GmbH  *
>> *                                       *                             *
>> * Anschrift:          Haardtstrasse 40  *  Haardtstrasse 40           *
>> *                       D-57076 Siegen  *  D-57076 Siegen             *
>> * Registergericht:     Siegen HRB 2819  *  Siegen HRB 5532            *
>> * Geschaeftsfuehrer:   Joachim Herbst,  *  Joachim Herbst,            *
>> *                        Winfried Held  *  Winfried Held              *
>> * Telefon:              +49 271 772020  *  +49 271 772020             *
>> * Telefax:              +49 271 74704   *  +49 271 74704              *
>> * E-Mail:                info@demig.de  *  at@demig.de                *
>> *                  http://www.demig.de  *  http://www.demig.de        *
>> ***********************************************************************
>> _______________________________________________
>> freebsd-hackers@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or=
g"

--=20
Dipl.-Ing. Norbert Koch
Entwicklung Prozessregler





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb4819d6-164f-66f7-9e04-dd121e12b2bf>