From owner-freebsd-hackers@freebsd.org Fri Jul 19 06:40:25 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89390BA76A for ; Fri, 19 Jul 2019 06:40:25 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from exch.demig.de (exch.demig.de [130.180.89.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84A3689233 for ; Fri, 19 Jul 2019 06:40:23 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [192.168.148.248] (port=55758 helo=SRV-FS-2.Demig.intra) by exch.demig.de with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1hoMYs-0004i5-1B for freebsd-hackers@freebsd.org; Fri, 19 Jul 2019 08:40:10 +0200 Received: from [192.168.148.215] (192.168.148.215) by SRV-FS-2 (192.168.148.248) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jul 2019 08:40:05 +0200 X-CTCH-RefID: str=0001.0A0B0213.5D3165CA.0042, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 Subject: Re: build custom kernel under FreeBSD 12 To: References: <14ad0148-ebe6-5d13-54fa-f6711c4b43ab@demig.de> From: Norbert Koch Message-ID: Date: Fri, 19 Jul 2019 08:40:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: e1e98c77-ec17-4cb1-9b24-fe57656077ed X-Rspamd-Queue-Id: 84A3689233 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of nkoch@demig.de designates 130.180.89.86 as permitted sender) smtp.mailfrom=nkoch@demig.de X-Spamd-Result: default: False [2.30 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[demig.de]; NEURAL_SPAM_MEDIUM(0.37)[0.372,0]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(0.93)[0.926,0]; MX_GOOD(-0.01)[cached: mx1.demig.de]; NEURAL_SPAM_LONG(0.56)[0.563,0]; IP_SCORE(0.75)[asn: 6830(3.82), country: AT(-0.10)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6830, ipnet:130.180.64.0/18, country:AT]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 06:40:25 -0000 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 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