Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Ian Lepore skrev: > > On Tue, 2016-12-13 at 10:13 -0700, Ian Lepore wrote: >> On Tue, 2016-12-13 at 10:00 +, 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 > > Actually, now that I look at it again, I wonder if it should be just: > > +WRKDIRPREFIX?= ${.OBJDIR} Yeah, this could work: Before: ===> Ports module x11/nvidia-driver (all) cd ${PORTSDIR:-/usr/ports}/x11/nvidia-driver; env -u CC -u CXX -u CPP PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin SRC_BASE=/usr/src OSVERSION=1100506 WRKDIRPREFIX=/usr/obj/usr/src/sys/WS01 GENERIC make -B clean all After: ===> Ports module x11/nvidia-driver (all) cd ${PORTSDIR:-/usr/ports}/x11/nvidia-driver; env -u CC -u CXX -u CPP PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin SRC_BASE=/usr/src OSVERSION=1100506 WRKDIRPREFIX=/usr/obj/usr/src/sys/WS01 make -B clean all -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Tue, 2016-12-13 at 10:13 -0700, Ian Lepore wrote: > On Tue, 2016-12-13 at 10:00 +, 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 Actually, now that I look at it again, I wonder if it should be just: +WRKDIRPREFIX?= ${.OBJDIR} -- Ian ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Tue, 2016-12-13 at 10:00 +, 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 ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Mon, 2016-12-12 at 20:22 -0800, Kevin Oberman wrote: > On Mon, Dec 12, 2016 at 4:20 PM, Herbert J. Skuhrarg> > wrote: > > > > > Kevin Oberman skrev: > > > > > > > > > Clearly the documentation is a bit behind the times. For some > > > time people > > > have used KERNCONF to build multiple kernels, but that was a > > > lucky things > > > that was not officially supported. It just happened to work. > > > Then, with > > > 11.0, it no longer did in many cases sue to changes in the kernel > > > build > > > system. When people complained, there did not seem to be a way to > > > fix > > this > > > > > > without blocking future goals in speeding up and enhancinghte > > > standard > > > kernel build. > > > > > > The result was BUILDKERNELS. It was specifically designed to > > > allow the > > > building of multiple kernels and the appropriate modules. This > > > would > > always > > > > > > take longer and use more disk space, but it would work reliably. > > > Now, bit > > > building a single, local kernel, KERNCONF is the best way, though > > > I > > suspect > > > > > > that it make only a small difference until new capabilities are > > > added > > later > > > > > > in the life of 11. > > > > > > So, while it seems the man pages need to catch up, building > > > multiple > > > kernels should be done with KERNCONF in either make.conf or > > > src.conf and > > > multiple kernels with BUILDKERNELS. > > > > > > This is from my recollection of the discussion thread. I'll admit > > > to > > being > > > > > > too lazy to go find and read all of it. I suspect it was on > > > current@, > > but > > > > > > I'm not even sure of that. > > ??? > > > > From /usr/src/Makefile.inc1: > > > > 1137 .if ${TARGET_ARCH} == "powerpc64" > > 1138 KERNCONF?= GENERIC64 > > 1139 .else > > 1140 KERNCONF?= GENERIC > > 1141 .endif > > [...] > > 1149 BUILDKERNELS= > > 1150 INSTALLKERNEL= > > 1151 .if defined(NO_INSTALLKERNEL) > > 1152 # All of the BUILDKERNELS loops start at index 1. > > 1153 BUILDKERNELS+= dummy > > 1154 .endif > > 1155 .for _kernel in ${KERNCONF} > > 1156 .if exists(${KERNCONFDIR}/${_kernel}) > > 1157 BUILDKERNELS+= ${_kernel} > > 1158 .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) > > 1159 INSTALLKERNEL= ${_kernel} > > 1160 .endif > > 1161 .endif > > 1162 .endfor > > > > So setting BUILDKERNELS has no effect. > > > > -- > > Herbert > > > I think you miss the significance. BUILDKERNELS only is used to build > the > kernels. It is not used by installkernel as installing two kernels > does not > make sense. It is ONLY used to build multiple kernels. KERNCONF is > still > used to specify the kernel, with attendant modules, to be installed. > > I should also mention that, if you want to install a new kernel > without > overwriting the old kernel and modules (/boot/kernel.old/), "make > reinstallkernel". It replaces the existing kernel instead of renaming > the > kernel directory to kernel.old. I find this very handy, but it is > poorly > documented. So, if you want to install GENERIC and not lose your last > working kernel, "make reinstallkernel KERNCONF=GENERIC". That will > blow > away the bad kernel and modules and install GENERIC. Note that it > does not > touch the /usr/obj directory that PUMPKIN is built in, so PUMPKIN and > similarly be reinstalled. > > The man page for src.conf is automatically generated and only lists > those > values which are specific to src.conf (WITH_ and WITHOUT_) and > describes > its use. It is used as input for system builds and installs but > should not > be accessed for any other purpose. make.conf is always read by make > with no > regard to what is being made. (N.B. I believe that some people have > ignored > this in some ports stuff.) Anything that is put into make.conf may be > placed in src,conf if you only want to have it used when > building/installing the kernel and world. > > I'm probably forgetting something, but I hope this explains it a bit. The BUILDKERNELS variable is part of the build system's internal machinery for building multiple kernels when the user has set KERNCONF= to more than one name. It's not a thing that a user can set. -- Ian ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
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, -- J. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On 13/12/2016 04:22, Kevin Oberman wrote: I should also mention that, if you want to install a new kernel without overwriting the old kernel and modules (/boot/kernel.old/), "make reinstallkernel". It replaces the existing kernel instead of renaming the kernel directory to kernel.old. I find this very handy, but it is poorly documented. So, if you want to install GENERIC and not lose your last working kernel, "make reinstallkernel KERNCONF=GENERIC". That will blow away the bad kernel and modules and install GENERIC. Note that it does not touch the /usr/obj directory that PUMPKIN is built in, so PUMPKIN and similarly be reinstalled. Hi, Thanks for trying to help - as you say, it's quite poorly documented. I'd document it if I had more of as clue what I was doing. Do you know how to get the process to respect MAKE_JOBS_NUMBER=32 ? (I mean I'm happy to have to put everything on one line rather than setting variables in src.conf or make.conf, it's just that it used to work and now does not, so am interested in *The Right Way*(tm) to do what I'm trying to do). Many thanks, -- J. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Kevin Oberman skrev: > > On Mon, Dec 12, 2016 at 4:20 PM, Herbert J. Skuhra> wrote: > >> Kevin Oberman skrev: >> > >> > Clearly the documentation is a bit behind the times. For some time people >> > have used KERNCONF to build multiple kernels, but that was a lucky things >> > that was not officially supported. It just happened to work. Then, with >> > 11.0, it no longer did in many cases sue to changes in the kernel build >> > system. When people complained, there did not seem to be a way to fix >> this >> > without blocking future goals in speeding up and enhancinghte standard >> > kernel build. >> > >> > The result was BUILDKERNELS. It was specifically designed to allow the >> > building of multiple kernels and the appropriate modules. This would >> always >> > take longer and use more disk space, but it would work reliably. Now, bit >> > building a single, local kernel, KERNCONF is the best way, though I >> suspect >> > that it make only a small difference until new capabilities are added >> later >> > in the life of 11. >> > >> > So, while it seems the man pages need to catch up, building multiple >> > kernels should be done with KERNCONF in either make.conf or src.conf and >> > multiple kernels with BUILDKERNELS. >> > >> > This is from my recollection of the discussion thread. I'll admit to >> being >> > too lazy to go find and read all of it. I suspect it was on current@, >> but >> > I'm not even sure of that. >> >> ??? >> >> From /usr/src/Makefile.inc1: >> >> 1137 .if ${TARGET_ARCH} == "powerpc64" >> 1138 KERNCONF?= GENERIC64 >> 1139 .else >> 1140 KERNCONF?= GENERIC >> 1141 .endif >> [...] >> 1149 BUILDKERNELS= >> 1150 INSTALLKERNEL= >> 1151 .if defined(NO_INSTALLKERNEL) >> 1152 # All of the BUILDKERNELS loops start at index 1. >> 1153 BUILDKERNELS+= dummy >> 1154 .endif >> 1155 .for _kernel in ${KERNCONF} >> 1156 .if exists(${KERNCONFDIR}/${_kernel}) >> 1157 BUILDKERNELS+= ${_kernel} >> 1158 .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) >> 1159 INSTALLKERNEL= ${_kernel} >> 1160 .endif >> 1161 .endif >> 1162 .endfor >> >> So setting BUILDKERNELS has no effect. >> >> -- >> Herbert >> > > I think you miss the significance. BUILDKERNELS only is used to build the > kernels. It is not used by installkernel as installing two kernels does not > make sense. It is ONLY used to build multiple kernels. KERNCONF is still > used to specify the kernel, with attendant modules, to be installed. > > I should also mention that, if you want to install a new kernel without > overwriting the old kernel and modules (/boot/kernel.old/), "make > reinstallkernel". It replaces the existing kernel instead of renaming the > kernel directory to kernel.old. I find this very handy, but it is poorly > documented. So, if you want to install GENERIC and not lose your last > working kernel, "make reinstallkernel KERNCONF=GENERIC". That will blow > away the bad kernel and modules and install GENERIC. Note that it does not > touch the /usr/obj directory that PUMPKIN is built in, so PUMPKIN and > similarly be reinstalled. > > The man page for src.conf is automatically generated and only lists those > values which are specific to src.conf (WITH_ and WITHOUT_) and describes > its use. It is used as input for system builds and installs but should not > be accessed for any other purpose. make.conf is always read by make with no > regard to what is being made. (N.B. I believe that some people have ignored > this in some ports stuff.) Anything that is put into make.conf may be > placed in src,conf if you only want to have it used when > building/installing the kernel and world. > > I'm probably forgetting something, but I hope this explains it a bit. Sorry, but why are you telling (me) all this? :) Can we return to the OP's issue? How does setting BUILDKERNELS (as suggested by Scott B.) resolves (t)his issue? His problem is obviously PORTS_MODULES (see my previous message). -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Mon, Dec 12, 2016 at 4:20 PM, Herbert J. Skuhrawrote: > Kevin Oberman skrev: > > > > Clearly the documentation is a bit behind the times. For some time people > > have used KERNCONF to build multiple kernels, but that was a lucky things > > that was not officially supported. It just happened to work. Then, with > > 11.0, it no longer did in many cases sue to changes in the kernel build > > system. When people complained, there did not seem to be a way to fix > this > > without blocking future goals in speeding up and enhancinghte standard > > kernel build. > > > > The result was BUILDKERNELS. It was specifically designed to allow the > > building of multiple kernels and the appropriate modules. This would > always > > take longer and use more disk space, but it would work reliably. Now, bit > > building a single, local kernel, KERNCONF is the best way, though I > suspect > > that it make only a small difference until new capabilities are added > later > > in the life of 11. > > > > So, while it seems the man pages need to catch up, building multiple > > kernels should be done with KERNCONF in either make.conf or src.conf and > > multiple kernels with BUILDKERNELS. > > > > This is from my recollection of the discussion thread. I'll admit to > being > > too lazy to go find and read all of it. I suspect it was on current@, > but > > I'm not even sure of that. > > ??? > > From /usr/src/Makefile.inc1: > >1137 .if ${TARGET_ARCH} == "powerpc64" >1138 KERNCONF?= GENERIC64 >1139 .else >1140 KERNCONF?= GENERIC >1141 .endif >[...] >1149 BUILDKERNELS= >1150 INSTALLKERNEL= >1151 .if defined(NO_INSTALLKERNEL) >1152 # All of the BUILDKERNELS loops start at index 1. >1153 BUILDKERNELS+= dummy >1154 .endif >1155 .for _kernel in ${KERNCONF} >1156 .if exists(${KERNCONFDIR}/${_kernel}) >1157 BUILDKERNELS+= ${_kernel} >1158 .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) >1159 INSTALLKERNEL= ${_kernel} >1160 .endif >1161 .endif >1162 .endfor > > So setting BUILDKERNELS has no effect. > > -- > Herbert > I think you miss the significance. BUILDKERNELS only is used to build the kernels. It is not used by installkernel as installing two kernels does not make sense. It is ONLY used to build multiple kernels. KERNCONF is still used to specify the kernel, with attendant modules, to be installed. I should also mention that, if you want to install a new kernel without overwriting the old kernel and modules (/boot/kernel.old/), "make reinstallkernel". It replaces the existing kernel instead of renaming the kernel directory to kernel.old. I find this very handy, but it is poorly documented. So, if you want to install GENERIC and not lose your last working kernel, "make reinstallkernel KERNCONF=GENERIC". That will blow away the bad kernel and modules and install GENERIC. Note that it does not touch the /usr/obj directory that PUMPKIN is built in, so PUMPKIN and similarly be reinstalled. The man page for src.conf is automatically generated and only lists those values which are specific to src.conf (WITH_ and WITHOUT_) and describes its use. It is used as input for system builds and installs but should not be accessed for any other purpose. make.conf is always read by make with no regard to what is being made. (N.B. I believe that some people have ignored this in some ports stuff.) Anything that is put into make.conf may be placed in src,conf if you only want to have it used when building/installing the kernel and world. I'm probably forgetting something, but I hope this explains it a bit. -- Kevin Oberman, Retired Network Engineer and kid herder ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Kevin Oberman skrev: > > Clearly the documentation is a bit behind the times. For some time people > have used KERNCONF to build multiple kernels, but that was a lucky things > that was not officially supported. It just happened to work. Then, with > 11.0, it no longer did in many cases sue to changes in the kernel build > system. When people complained, there did not seem to be a way to fix this > without blocking future goals in speeding up and enhancinghte standard > kernel build. > > The result was BUILDKERNELS. It was specifically designed to allow the > building of multiple kernels and the appropriate modules. This would always > take longer and use more disk space, but it would work reliably. Now, bit > building a single, local kernel, KERNCONF is the best way, though I suspect > that it make only a small difference until new capabilities are added later > in the life of 11. > > So, while it seems the man pages need to catch up, building multiple > kernels should be done with KERNCONF in either make.conf or src.conf and > multiple kernels with BUILDKERNELS. > > This is from my recollection of the discussion thread. I'll admit to being > too lazy to go find and read all of it. I suspect it was on current@, but > I'm not even sure of that. ??? >From /usr/src/Makefile.inc1: 1137 .if ${TARGET_ARCH} == "powerpc64" 1138 KERNCONF?= GENERIC64 1139 .else 1140 KERNCONF?= GENERIC 1141 .endif [...] 1149 BUILDKERNELS= 1150 INSTALLKERNEL= 1151 .if defined(NO_INSTALLKERNEL) 1152 # All of the BUILDKERNELS loops start at index 1. 1153 BUILDKERNELS+= dummy 1154 .endif 1155 .for _kernel in ${KERNCONF} 1156 .if exists(${KERNCONFDIR}/${_kernel}) 1157 BUILDKERNELS+= ${_kernel} 1158 .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) 1159 INSTALLKERNEL= ${_kernel} 1160 .endif 1161 .endif 1162 .endfor So setting BUILDKERNELS has no effect. -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Kevin Oberman skrev: > > On Mon, Dec 12, 2016 at 1:16 AM, tech-listswrote: >> On 12/12/2016 09:07, Thomas Mueller wrote: >> >>> My question is, do you build modules redundantly, or just once? >>> I don't want to build the same modules more than once. >>> >> >> For me - redundantly, I guess. It's not like it takes a lot of time or >> space on the compiling machine, and I ensure that everything that needs to >> be built, is built. >> >> PUMPKIN = heavily modified config with all the stuff I don't need stripped >> out, and a couple of non-default lines. >> >> GENERIC = unmodified kernel that should work if by some chance PUMPKIN >> doesn't. >> -- >> J. > > > Clearly the documentation is a bit behind the times. For some time people > have used KERNCONF to build multiple kernels, but that was a lucky things > that was not officially supported. It just happened to work. Then, with > 11.0, it no longer did in many cases sue to changes in the kernel build > system. When people complained, there did not seem to be a way to fix this > without blocking future goals in speeding up and enhancinghte standard > kernel build. > > The result was BUILDKERNELS. It was specifically designed to allow the > building of multiple kernels and the appropriate modules. This would always > take longer and use more disk space, but it would work reliably. Now, bit > building a single, local kernel, KERNCONF is the best way, though I suspect > that it make only a small difference until new capabilities are added later > in the life of 11. > > So, while it seems the man pages need to catch up, building multiple > kernels should be done with KERNCONF in either make.conf or src.conf and > multiple kernels with BUILDKERNELS. ??? >From /usr/src/Makefile.inc1: 1137 .if ${TARGET_ARCH} == "powerpc64" 1138 KERNCONF?= GENERIC64 1139 .else 1140 KERNCONF?= GENERIC 1141 .endif [...] 1151 .if defined(NO_INSTALLKERNEL) 1152 # All of the BUILDKERNELS loops start at index 1. 1153 BUILDKERNELS+= dummy 1154 .endif 1155 .for _kernel in ${KERNCONF} 1156 .if exists(${KERNCONFDIR}/${_kernel}) 1157 BUILDKERNELS+= ${_kernel} 1158 .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) 1159 INSTALLKERNEL= ${_kernel} 1160 .endif 1161 .endif 1162 .endfor So setting BUILDKERNELS has no effect. -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
tech-lists skrev: > > Hi, > > Yep I'm sure. The only extra I've added is for > nvidia-driver. Everything else is a "without" directive. My > /etc/src.conf looks like this: > > # less src.conf > PORTS_MODULES=x11/nvidia-driver > [...] > This is the error I get when I try to build kernel and world the old way: > > /usr/src # make cleandir && make clean && make buildworld && make > buildkernel && make installkernel && mergemaster -p > [...] > SRC_BASE=/storage/usr/src OSVERSION=1100506 > WRKDIRPREFIX=/usr/obj/storage/usr/src/sys/PUMPKIN GENERIC make -B clean all ^^^ > env: GENERIC: No such file or directory > *** Error code 127 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} -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Mon, Dec 12, 2016 at 1:16 AM, tech-listswrote: > On 12/12/2016 09:07, Thomas Mueller wrote: > >> My question is, do you build modules redundantly, or just once? >> I don't want to build the same modules more than once. >> > > For me - redundantly, I guess. It's not like it takes a lot of time or > space on the compiling machine, and I ensure that everything that needs to > be built, is built. > > PUMPKIN = heavily modified config with all the stuff I don't need stripped > out, and a couple of non-default lines. > > GENERIC = unmodified kernel that should work if by some chance PUMPKIN > doesn't. > -- > J. Clearly the documentation is a bit behind the times. For some time people have used KERNCONF to build multiple kernels, but that was a lucky things that was not officially supported. It just happened to work. Then, with 11.0, it no longer did in many cases sue to changes in the kernel build system. When people complained, there did not seem to be a way to fix this without blocking future goals in speeding up and enhancinghte standard kernel build. The result was BUILDKERNELS. It was specifically designed to allow the building of multiple kernels and the appropriate modules. This would always take longer and use more disk space, but it would work reliably. Now, bit building a single, local kernel, KERNCONF is the best way, though I suspect that it make only a small difference until new capabilities are added later in the life of 11. So, while it seems the man pages need to catch up, building multiple kernels should be done with KERNCONF in either make.conf or src.conf and multiple kernels with BUILDKERNELS. This is from my recollection of the discussion thread. I'll admit to being too lazy to go find and read all of it. I suspect it was on current@, but I'm not even sure of that. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkober...@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On 12/12/2016 09:07, Thomas Mueller wrote: My question is, do you build modules redundantly, or just once? I don't want to build the same modules more than once. For me - redundantly, I guess. It's not like it takes a lot of time or space on the compiling machine, and I ensure that everything that needs to be built, is built. PUMPKIN = heavily modified config with all the stuff I don't need stripped out, and a couple of non-default lines. GENERIC = unmodified kernel that should work if by some chance PUMPKIN doesn't. -- J. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
> BUILDKERNELS=PUMPKIN GENERIC > > to your /etc/src.conf and removing the KERNCONF line from /etc/make.conf > > before you run it again. KERNCONF goes on the "make buildkernel" command, > > not into /etc/make.conf, but should not be necessary at all if /etc/src.conf > > contains the list of kernels to be built. (See src.conf(5).) > - BUILDKERNELS is used in Makefile.inc1 but not listed in neither > src.conf(5) nor make.conf(5) > - KERNCONF is listed in make.conf(5) > - I use KERNCONF in /etc/make.conf to build two kernels and it works > So why are you giving this advice? > Herbert I would have thought KERNCONF would belong in src.conf, but just checked the man pages, and KERNCONF is listed in man make.conf but not src.conf . I usually build at least two kernels, one being the custom kernel and the other being GENERIB. GENERIB differs from GENERIC in not supporting very outdated devices (ISA SCSI cards for instance) but including support from some wi-fi drivers not in GENERIC. I need rsu. My question is, do you build modules redundantly, or just once? I don't want to build the same modules more than once. Tom ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Scott Bennett skrev: > > On Sun, 11 Dec 2016 12:34:58 + tech-lists> wrote: > >> I have found that make buildkernel/installkernel does not respect >> KERNCONF= variables. It also doesn't respect MAKE_JOBS_NUMBER. It *DOES* >> however respect WITH_CCACHE_BUILD. It's hard to say when the behaviour >> changed to what it is, but it was sometime around the time that >> 11-CURRENT became 11-STABLE. >> >> Sources are 11-STABLE r309795 >> >> Here is my /etc/make.conf, which used to work: >> >> MALLOC_PRODUCTION=yes >> WITH_CCACHE_BUILD=yes >> MAKE_JOBS_NUMBER=32 >> KERNCONF=PUMPKIN GENERIC >> WITH_MANCOMPRESS=YES >> WITHOUT_DEBUG=YES >> DEFAULT_VERSIONS+= ssl=libressl >> OPTIMIZED_CFLAGS=YES >> BUILD_OPTIMIZED=YES >> >> I used to be able to buildworld and kernel like this: >> >> root@localhost:/usr/src# make cleandir && make clean && make buildworld >> && make buildkernel && make installkernel && mergemaster -p >> >> and I'd get two installed kernels, PUMPKIN and GENERIC >> >> now I have to specify on the line: >> >> root@localhost:/usr/src# make cleandir && make clean && make -j32 >> buildworld && make -j32 buildkernel KERNCONF=PUMPKIN >> >> Also, I have to specify jobs # for both buildworld and buildkernel >> otherwise it just uses one, two or four cores. >> >> How can I get it to work like it did previously? >> > You may have misremembered how you did it previously. Try adding > > BUILDKERNELS=PUMPKIN GENERIC > > to your /etc/src.conf and removing the KERNCONF line from /etc/make.conf > before you run it again. KERNCONF goes on the "make buildkernel" command, > not into /etc/make.conf, but should not be necessary at all if /etc/src.conf > contains the list of kernels to be built. (See src.conf(5).) - BUILDKERNELS is used in Makefile.inc1 but not listed in neither src.conf(5) nor make.conf(5) - KERNCONF is listed in make.conf(5) - I use KERNCONF in /etc/make.conf to build two kernels and it works So why are you giving this advice? -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On Sun, 11 Dec 2016 12:34:58 + tech-listswrote: >I have found that make buildkernel/installkernel does not respect >KERNCONF= variables. It also doesn't respect MAKE_JOBS_NUMBER. It *DOES* >however respect WITH_CCACHE_BUILD. It's hard to say when the behaviour >changed to what it is, but it was sometime around the time that >11-CURRENT became 11-STABLE. > >Sources are 11-STABLE r309795 > >Here is my /etc/make.conf, which used to work: > >MALLOC_PRODUCTION=yes >WITH_CCACHE_BUILD=yes >MAKE_JOBS_NUMBER=32 >KERNCONF=PUMPKIN GENERIC >WITH_MANCOMPRESS=YES >WITHOUT_DEBUG=YES >DEFAULT_VERSIONS+= ssl=libressl >OPTIMIZED_CFLAGS=YES >BUILD_OPTIMIZED=YES > >I used to be able to buildworld and kernel like this: > >root@localhost:/usr/src# make cleandir && make clean && make buildworld >&& make buildkernel && make installkernel && mergemaster -p > >and I'd get two installed kernels, PUMPKIN and GENERIC > >now I have to specify on the line: > >root@localhost:/usr/src# make cleandir && make clean && make -j32 >buildworld && make -j32 buildkernel KERNCONF=PUMPKIN > >Also, I have to specify jobs # for both buildworld and buildkernel >otherwise it just uses one, two or four cores. > >How can I get it to work like it did previously? > You may have misremembered how you did it previously. Try adding BUILDKERNELS=PUMPKIN GENERIC to your /etc/src.conf and removing the KERNCONF line from /etc/make.conf before you run it again. KERNCONF goes on the "make buildkernel" command, not into /etc/make.conf, but should not be necessary at all if /etc/src.conf contains the list of kernels to be built. (See src.conf(5).) Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at sdf.org *xor* bennett at freeshell.org * ** * "A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army." * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
On 11/12/2016 16:48, Herbert J. Skuhra wrote: tech-lists wrote: Hello list, I have found that make buildkernel/installkernel does not respect KERNCONF= variables. It also doesn't respect MAKE_JOBS_NUMBER. It *DOES* however respect WITH_CCACHE_BUILD. It's hard to say when the behaviour changed to what it is, but it was sometime around the time that 11-CURRENT became 11-STABLE. Sources are 11-STABLE r309795 Here is my /etc/make.conf, which used to work: I don't know MAKE_JOBS_NUMBER(?), but KERNCONF works for me! Are you sure that there is no extra KERNCONF line in /etc/src.conf? -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" Hi, Yep I'm sure. The only extra I've added is for nvidia-driver. Everything else is a "without" directive. My /etc/src.conf looks like this: # less src.conf PORTS_MODULES=x11/nvidia-driver WITHOUT_ASSERT_DEBUG="YES" WITHOUT_ATM="YES" WITHOUT_AUDIT="YES" #WITHOUT_BLUETOOTH="YES" WITHOUT_BOOTPD="YES" #WITHOUT_BSNMP="YES" WITHOUT_CUSE="YES" WITHOUT_DMAGENT="YES" WITHOUT_FINGER="YES" WITHOUT_FLOPPY="YES" WITHOUT_FREEBSD_UPDATE="YES" WITHOUT_HAST="YES" WITHOUT_HYPERV="YES" WITHOUT_INETD="YES" WITHOUT_IPFILTER="YES" WITHOUT_IPX="YES" WITHOUT_IPX_SUPPORT="YES" WITHOUT_ISCSI="YES" WITHOUT_JAIL="YES" WITHOUT_KERBEROS="YES" WITHOUT_KERBEROS_SUPPORT="YES" WITHOUT_LPR="YES" #WITHOUT_NDIS="YES" #WITHOUT_NETGRAPH="YES" WITHOUT_PORTSNAP="YES" WITHOUT_PPP="YES" WITHOUT_QUOTAS="YES" WITHOUT_RADIUS_SUPPORT="YES" WITHOUT_RBOOTD="YES" WITHOUT_RCMDS="YES" WITHOUT_ROUTED="YES" WITHOUT_SHAREDOCS="YES" WITHOUT_TALK="YES" WITHOUT_TFTP="YES" WITHOUT_TCP_WRAPPERS="YES" WITHOUT_TESTS="YES" This is the error I get when I try to build kernel and world the old way: /usr/src # make cleandir && make clean && make buildworld && make buildkernel && make installkernel && mergemaster -p ===> zlib (all) machine -> /storage/usr/src/sys/amd64/include x86 -> /storage/usr/src/sys/x86/include /usr/local/bin/ccache cc -target x86_64-unknown-freebsd11.0 --sysroot=/usr/obj/storage/usr/src/tmp -B/usr/obj/storage/usr/src/tmp/usr/bin -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/storage/usr/src/sys/PUMPKIN/opt_global.h -I. -I/storage/usr/src/sys -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/obj/storage/usr/src/sys/PUMPKIN -MD -MF.depend.zlib.o -MTzlib.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -mno-aes -mno-avx -std=iso9899:1999 -c /storage/usr/src/sys/modules/zlib/../../libkern/zlib.c -o zlib.o ld -d -warn-common -r -d -o zlib.ko zlib.o :> export_syms awk -f /storage/usr/src/sys/conf/kmod_syms.awk zlib.ko export_syms | xargs -J% objcopy % zlib.ko objcopy --strip-debug zlib.ko ===> Ports module x11/nvidia-driver (all) cd ${PORTSDIR:-/usr/ports}/x11/nvidia-driver; env -u CC -u CXX -u CPP PATH=/usr/obj/storage/usr/src/tmp/legacy/usr/sbin:/usr/obj/storage/usr/src/tmp/legacy/usr/bin:/usr/obj/storage/usr/src/tmp/legacy/bin:/usr/obj/storage/usr/src/tmp/usr/sbin:/usr/obj/storage/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin SRC_BASE=/storage/usr/src OSVERSION=1100506 WRKDIRPREFIX=/usr/obj/storage/usr/src/sys/PUMPKIN GENERIC make -B clean all env: GENERIC: No such file or directory *** Error code 127 Stop. make[2]: stopped in /obj/storage/usr/src/sys/PUMPKIN *** Error code 1 Stop. make[1]: stopped in /storage/usr/src *** Error code 1 Stop. make: stopped in /storage/usr/src ## The config file(s) are there: root@localhost:/usr/src# ls -la /sys/amd64/conf total 85 drwxr-xr-x 2 root wheel 9 Dec 10 12:12 . drwxr-xr-x 14 root wheel 15 Dec 10 12:06 .. -rw-r--r-- 1 root wheel491 Dec 10 12:06 DEFAULTS -rw-r--r-- 1 root wheel 14315 Dec 10 12:06 GENERIC -rw-r--r-- 1 root wheel827 Dec 10 12:06 GENERIC.hints -rw-r--r-- 1 root wheel 5762 Dec 10 12:06 MINIMAL -rw-r--r-- 1 root wheel139 Dec 10 12:06 Makefile -rw-r--r-- 1 root wheel 20174 Dec 10 12:06 NOTES -rw-r--r-- 1 root wheel 6538 Dec 10 12:12 PUMPKIN many thanks, -- J. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to
Re: make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
tech-lists wrote: > > Hello list, > I have found that make buildkernel/installkernel does not respect > KERNCONF= variables. It also doesn't respect MAKE_JOBS_NUMBER. It > *DOES* however respect WITH_CCACHE_BUILD. It's hard to say when the > behaviour changed to what it is, but it was sometime around the time > that 11-CURRENT became 11-STABLE. > > Sources are 11-STABLE r309795 > > Here is my /etc/make.conf, which used to work: I don't know MAKE_JOBS_NUMBER(?), but KERNCONF works for me! Are you sure that there is no extra KERNCONF line in /etc/src.conf? -- Herbert ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
make buildkernel does not respect KERNCONF or JOBS in /etc/make.conf
Hello list, I have found that make buildkernel/installkernel does not respect KERNCONF= variables. It also doesn't respect MAKE_JOBS_NUMBER. It *DOES* however respect WITH_CCACHE_BUILD. It's hard to say when the behaviour changed to what it is, but it was sometime around the time that 11-CURRENT became 11-STABLE. Sources are 11-STABLE r309795 Here is my /etc/make.conf, which used to work: MALLOC_PRODUCTION=yes WITH_CCACHE_BUILD=yes MAKE_JOBS_NUMBER=32 KERNCONF=PUMPKIN GENERIC WITH_MANCOMPRESS=YES WITHOUT_DEBUG=YES DEFAULT_VERSIONS+= ssl=libressl OPTIMIZED_CFLAGS=YES BUILD_OPTIMIZED=YES I used to be able to buildworld and kernel like this: root@localhost:/usr/src# make cleandir && make clean && make buildworld && make buildkernel && make installkernel && mergemaster -p and I'd get two installed kernels, PUMPKIN and GENERIC now I have to specify on the line: root@localhost:/usr/src# make cleandir && make clean && make -j32 buildworld && make -j32 buildkernel KERNCONF=PUMPKIN Also, I have to specify jobs # for both buildworld and buildkernel otherwise it just uses one, two or four cores. How can I get it to work like it did previously? Many thanks, -- J. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"