Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2016 10:13:53 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        tech-lists <tech-lists@zyxst.net>, freebsd-stable@freebsd.org
Subject:   Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Message-ID:  <1481649233.1889.337.camel@freebsd.org>
In-Reply-To: <8f66557b-cf51-f140-eb49-03e806fb73ca@zyxst.net>
References:  <127a9164-9ad2-47c4-9ec4-e9f59cbe94f2@zyxst.net> <8637hu76pm.wl-herbert@mailbox.org> <cf6b5daa-a1c3-ea34-69dc-25b24b2ee4b1@zyxst.net> <86shpspvgx.wl-herbert@mailbox.org> <8f66557b-cf51-f140-eb49-03e806fb73ca@zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2016-12-13 at 10:00 +0000, tech-lists wrote:
> On 12/12/2016 23:40, Herbert J. Skuhra wrote:
> > 
> > PORTS_MODULES does not work if KERNCONF contains multiple kernels:
> > 
> > The problem is obviously in /usr/src/sys/conf/kern.post.mk (line
> > 66):
> > 
> > WRKDIRPREFIX?=  ${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${KERNCONF}
> hmm! I didn't know that.
> 
> I can't confirm exactly when the old way stopped working and when I 
> started defining modules in src.conf.
> 
> If I wanted to install a known, good kernel as /boot/workingkernel
> with 
> all of its modules, so that I can avoid kernel.old being a bad
> kernel 
> and kernel being non-bootable, how would I go about doing it?
> 
> many thanks,
> 

I think the problem might have started with some changes to the kernel
build infrastructure that result in reading make.conf and/or src.conf
when they didn't used to, so now KERNCONF with multiple entries is
defined differently in kern.post.mk than it used to be.

I wonder if this patch might fix it (I'm not in a position to test it
myself right now -- this is purely a shot in the dark)...

iIndex: sys/conf/kern.post.mk
===================================================================
--- sys/conf/kern.post.mk	(revision 302505)
+++ sys/conf/kern.post.mk	(working copy)
@@ -63,7 +63,7 @@ OSRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_v
 		    ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h
 .endif
 # Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build
-WRKDIRPREFIX?=	${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${KERNCONF}
+WRKDIRPREFIX?=	${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${.OBJDIR}
 PORTSMODULESENV=\
 	PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \
 	SRC_BASE=${SRC_BASE} \

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1481649233.1889.337.camel>