From k@numeri.campus.luth.se  Thu Mar 30 12:42:11 2000
Return-Path: <k@numeri.campus.luth.se>
Received: from numeri.campus.luth.se (numeri.campus.luth.se [130.240.197.103])
	by hub.freebsd.org (Postfix) with ESMTP id A955F37BF23
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Mar 2000 12:42:06 -0800 (PST)
	(envelope-from k@numeri.campus.luth.se)
Received: (from k@localhost)
	by numeri.campus.luth.se (8.9.3/8.9.3) id WAA29110;
	Thu, 30 Mar 2000 22:43:03 +0200 (CEST)
	(envelope-from k)
Message-Id: <200003302043.WAA29110@numeri.campus.luth.se>
Date: Thu, 30 Mar 2000 22:43:03 +0200 (CEST)
From: Johan Karlsson <k@numeri.campus.luth.se>
Reply-To: k@numeri.campus.luth.se
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] Let Makefile.inc1 installkernel install multiple kernels
X-Send-Pr-Version: 3.2

>Number:         17698
>Category:       kern
>Synopsis:       [PATCH] Let Makefile.inc1 installkernel install multiple kernels
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    marcel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 30 12:50:01 PST 2000
>Closed-Date:    Sun Jul 23 11:05:10 PDT 2000
>Last-Modified:  Sun Jul 23 11:11:30 PDT 2000
>Originator:     Johan Karlsson
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
>Environment:
	numeri# ident Makefile.inc1 sys/conf/Makefile.i386
	Makefile.inc1:
	     $FreeBSD: src/Makefile.inc1,v 1.141.2.1 2000/03/30 13:08:32 sheldonh Exp $

	sys/conf/Makefile.i386:
	     $FreeBSD: src/sys/conf/Makefile.i386,v 1.179 2000/01/23 12:24:47 peter Exp $
	numeri#

	

>Description:

	Currently only the first kernel in ${KERNEL} get installed 
	by the installkernel target in ${SRC}/Makefile.inc1.
	Moreover, it gets installed as ${KERNEL} not 'kernel'
	It would be nice to be able to install multiple kernel and 
	have them named nicely.

	To do this I have added a new variable INSTKERNEL to
	${SRC}/sys/conf/Makefile.i386 (should be added to Makefile.alpha 
	and Makefile.pc98 as well but I can not test on these mashines).
	The kernel gets installed as ${INSTKERNEL} (which defaults to
	${KERNEL}) instead of ${KERNEL} in ${DESTDIR}.	

	I have also patched ${SRC}/Makefile.inc1 to install all valid
	kernels in ${KERNEL}. The first kernel is installed as ${INSTKERNEL} 
	(which defaults to 'kernel') and the following are installed as
	${INSTKERNEL}.${FOO} in ${DESTDIR}.

	
	w/o the attached patch
===============
numeri# make KERNEL='GENERIC NEWCARD' installkernel
cd /usr/obj/usr/src/sys/GENERIC;  MAKEOBJDIRPREFIX=/usr/obj  COMPILER_PATH=/usr/obj/usr/src/i386/usr/libexec:/usr/obj/usr/src/i386/usr/bin  LIBRARY_PATH=/usr/obj/usr/src/i386/usr/lib:/usr/obj/usr/src/i386/usr/lib  OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr/libexec  PERL5LIB=/usr/obj/usr/src/i386/usr/libdata/perl/5.00503 MACHINE=i386 KERNEL=GENERIC  make install
install -c -m 555 -o root -g wheel -fschg  GENERIC /GENERIC
numeri#
===============

	w/ the attached patch (note that I've set INSTKERNEL=Kernel)
===============
numeri# make KERNEL='GENERIC NEWCARD GENERIC' INSTKERNEL=Kernel installkernel

--------------------------------------------------------------
>How-To-Repeat:
	
	

>Fix:

	

--- Makefile.inc1.orig	Thu Mar 30 20:10:14 2000
+++ Makefile.inc1	Thu Mar 30 22:39:13 2000
@@ -339,6 +339,7 @@
 # properly.
 
 KERNEL?=	GENERIC GENERIC98
+INSTKERNEL?=	kernel
 
 # The only exotic MACHINE_ARCH/MACHINE combination valid at this
 # time is i386/pc98. In all other cases set MACHINE equal to
@@ -357,11 +358,14 @@
 
 BUILDKERNELS=
 INSTALLKERNEL=
+INSTALLKERNELS=
 .for _kernel in ${KERNEL}
 .if exists(${KRNLCONFDIR}/${_kernel})
 BUILDKERNELS+=	${_kernel}
 .if empty(INSTALLKERNEL)
 INSTALLKERNEL= ${_kernel}
+.else
+INSTALLKERNELS+= ${_kernel}
 .endif
 .endif
 .endfor
@@ -392,12 +396,25 @@
 #
 # installkernel
 #
-# Install the kernel defined by INSTALLKERNEL
+# Install the kernel defined by INSTALLKERNEL and INSTALLKERNELS
 #
 installkernel:
+	@echo
+	@echo "--------------------------------------------------------------"
+	@echo ">>> Installing kernel(s)"
+	@echo "--------------------------------------------------------------"
+	@echo "===> ${INSTALLKERNEL} as ${DESTDIR}/${INSTKERNEL}"
 	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
 		${IMAKEENV} MACHINE=${MACHINE} KERNEL=${INSTALLKERNEL} \
-		    ${MAKE} install
+		    INSTKERNEL=${INSTKERNEL} ${MAKE} install
+.for _kernel in ${INSTALLKERNELS}
+	@echo "===> ${_kernel} as ${DESTDIR}/${INSTKERNEL}.${_kernel}"
+	cd ${KRNLOBJDIR}/${_kernel}; \
+		${IMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} \
+		    INSTKERNEL=${INSTKERNEL}.${_kernel} ${MAKE} install
+.endfor	
+
+
 
 #
 # update
--- sys/conf/Makefile.i386.orig	Thu Mar 30 21:26:22 2000
+++ sys/conf/Makefile.i386	Thu Mar 30 20:59:19 2000
@@ -21,6 +21,7 @@
 
 # Can be overridden by makeoptions or /etc/make.conf
 KERNEL?=	kernel
+INSTKERNEL?=	${KERNEL}
 STD8X16FONT?=	iso
 
 .if !defined(S)
@@ -197,16 +198,16 @@
 		echo "You must build a kernel first." ; \
 		exit 1 ; \
 	fi
-.if exists(${DESTDIR}/${KERNEL})
-	-chflags noschg ${DESTDIR}/${KERNEL}
-	mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.if exists(${DESTDIR}/${INSTKERNEL})
+	-chflags noschg ${DESTDIR}/${INSTKERNEL}
+	mv ${DESTDIR}/${INSTKERNEL} ${DESTDIR}/${INSTKERNEL}.old
 .endif
 	install -c -m 555 -o root -g wheel -fschg \
-		${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${KERNEL}
+		${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${INSTKERNEL}
 
 reinstall reinstall.debug:
 	install -c -m 555 -o root -g wheel -fschg \
-		${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${KERNEL}
+		${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${INSTKERNEL}
 
 config.o:
 	${NORMAL_C}

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Mar 31 02:08:53 PST 2000 
Responsible-Changed-Why:  
I haven't looked at the patch yet, but if it works as advertised, 
it's exactly what we want. :-) 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/17698: installkernel improvements
Date: Tue, 11 Apr 2000 11:44:22 +0200

 Hi Johan,
 
 Just a quick note to let you know why this is taking so long.  The only
 feedback I got from the Alpha camp is that this is broken for the Alpha
 case.  The breakage makes no sense to me, so I'll have to test it for
 myself.
 
 Ciao,
 Sheldon.
 

From: Johan Karlsson <k@numeri.campus.luth.se>
To: freebsd-gnats-submit@FreeBSD.org
Cc: k@numeri.campus.luth.se, sheldonh@uunet.co.za, brian@Awfulhak.org
Subject: NEWPATCH Re: kern/17698
Date: Sun, 18 Jun 2000 18:29:55 +0200

 Hi
 
 I have redesigned my patch for the build/installkernel targets =
 
 in Makefile.inc1. The new version is attached below.
 
 This new version solves some more problems:
 1: If 'KERNEL' is set to be mutliple kernels in /etc/make.conf the =
 
  # cd /sys/i386/conf ; config GENERIC; make depend; make all; make instal=
 l
 way will fail.
 Solution: introduce 'KERNELS' used to specify multiple kernels.
 
 2: This version knows that /modules is built/installed with the kernel an=
 d
 therefor sets NO_MODULES to true when installing more than one kernel.
 
 3: sys/conf/Makefile.* assumed that modules always are installed =
 
 in /modules and therefore only backed-up that dir.
 Sulotion: Use 'KMODDIR' to get the location where modules will be install=
 ed =
 
 when
 doing the backup.
 
 4: When install a kernel and modules into an empty root =
 
 (eg. DESTDIR=3D/usr/tmp/newroot) the install of modules would fail since =
 some
 dirs are missings. This can be a problem when doing
 # make buildworld; make buildkernel; =
 
 # make DESTDIR=3Dfoo installkernel; make DESTDIR=3Dfoo installworld
 Solution: I have added  /usr/bin /usr/sbin /usr/share/man/man4 to the =
 
 installkernel
 target to work around this problem.
 
 
 
 As in the prev patch the first kernel will be installed as ${DESTKERNEL} =
 
 (default 'kernel') and the following as ${DESTKERNEL}.${FOO}.
 
 I think this patch is a commit candidate BUT I can only test is on i386.
 
 
 Sheldon, you mentioned that the prev version faild on alpha, have you =
 
 been able to confirm that and know why it fails?
 
 Brain, can you please try this patch and see if it solves the problem you=
  =
 
 commited a fix for in Makefile.inc1 v 1.150. I changed some other locatio=
 n =
 
 which might suffer from the same problem.
 
 
 Thanks
 Johan K
 
 
 
 --- Makefile.inc1.orig	Sat Jun 17 20:51:43 2000
 +++ Makefile.inc1	Sun Jun 18 16:37:13 2000
 @@ -341,6 +341,8 @@
  # properly.
  =
 
  KERNEL?=3D	GENERIC
 +KERNELS?=3D	${KERNEL}
 +DESTKERNEL?=3D	kernel
  =
 
  # The only exotic MACHINE_ARCH/MACHINE combination valid at this
  # time is i386/pc98. In all other cases set MACHINE equal to
 @@ -359,11 +361,14 @@
  =
 
  BUILDKERNELS=3D
  INSTALLKERNEL=3D
 -.for _kernel in ${KERNEL}
 +INSTALLKERNELS=3D
 +.for _kernel in ${KERNELS}
  .if exists(${KRNLCONFDIR}/${_kernel})
  BUILDKERNELS+=3D	${_kernel}
  .if empty(INSTALLKERNEL)
  INSTALLKERNEL=3D ${_kernel}
 +.else
 +INSTALLKERNELS+=3D ${_kernel}
  .endif
  .endif
  .endfor
 @@ -391,22 +396,37 @@
  		    ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile
  .if !defined(NO_KERNELDEPEND)
  	cd ${KRNLOBJDIR}/${_kernel}; \
 -		${WMAKEENV} MACHINE=3D${MACHINE} KERNEL=3D${_kernel} \
 -		    ${MAKE} depend
 +		${WMAKEENV} MACHINE=3D${MACHINE} \
 +		    ${MAKE} KERNEL=3D${_kernel} depend
  .endif
  	cd ${KRNLOBJDIR}/${_kernel}; \
 -		${WMAKEENV} MACHINE=3D${MACHINE} KERNEL=3D${_kernel} ${MAKE} all
 +		${WMAKEENV} MACHINE=3D${MACHINE} ${MAKE} KERNEL=3D${_kernel} all
  .endfor
  =
 
  #
  # installkernel
  #
 -# Install the kernel defined by INSTALLKERNEL
 +# Install the kernel(s) defined by INSTALLKERNEL and INSTALLKERNELS
  #
  installkernel:
 +	@echo
 +	@echo "--------------------------------------------------------------"
 +	@echo ">>> Installing kernel(s)"
 +	@echo "--------------------------------------------------------------"
 +	mkdir -p ${DESTDIR}/usr/share/man/man4
 +	mkdir -p ${DESTDIR}/usr/bin
 +	mkdir -p ${DESTDIR}/usr/sbin
 +	@echo "=3D=3D=3D> ${INSTALLKERNEL} as ${DESTDIR}/${DESTKERNEL}"
  	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
 -		${IMAKEENV} MACHINE=3D${MACHINE} KERNEL=3D${INSTALLKERNEL} \
 -		    ${MAKE} KERNEL=3D${INSTALLKERNEL} install
 +		${IMAKEENV} MACHINE=3D${MACHINE} \
 +		    ${MAKE} KERNEL=3D${INSTALLKERNEL} DESTKERNEL=3D${DESTKERNEL} insta=
 ll
 +.for _kernel in ${INSTALLKERNELS}
 +	@echo "=3D=3D=3D> ${_kernel} as ${DESTDIR}/${DESTKERNEL}.${_kernel}"
 +	cd ${KRNLOBJDIR}/${_kernel}; \
 +		${IMAKEENV} MACHINE=3D${MACHINE} \
 +		    ${MAKE} KERNEL=3D${_kernel} DESTKERNEL=3D${DESTKERNEL}.${_kernel} =
 \
 +		    NO_MODULES=3D1 install
 +.endfor
  =
 
  #
  # update
 --- sys/conf/Makefile.alpha.orig	Sat Jun 17 20:55:20 2000
 +++ sys/conf/Makefile.alpha	Sun Jun 18 17:57:20 2000
 @@ -21,6 +21,7 @@
  =
 
  # Can be overridden by makeoptions or /etc/make.conf
  KERNEL?=3D	kernel
 +DESTKERNEL?=3D	${KERNEL}
  STD8X16FONT?=3D	iso
  =
 
  .if !defined(S)
 @@ -263,16 +264,16 @@
  		echo "You must build a kernel first." ; \
  		exit 1 ; \
  	fi
 -.if exists(${DESTDIR}/${KERNEL})
 -	-chflags noschg ${DESTDIR}/${KERNEL}
 -	mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
 +.if exists(${DESTDIR}/${DESTKERNEL})
 +	-chflags noschg ${DESTDIR}/${DESTKERNEL}
 +	mv ${DESTDIR}/${DESTKERNEL} ${DESTDIR}/${DESTKERNEL}.old
  .endif
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${DESTKERNEL}
  =
 
  kernel-reinstall kernel-reinstall.debug:
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${DESTKERNEL}
  =
 
  .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/mo=
 dules)
  all:	modules
 @@ -301,11 +302,14 @@
  modules-tags:
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} tags=
 
  =
 
 +# we need ${KMODDIR} to tell us where modules get installed
 +.include <bsd.own.mk>
 +
  modules-install modules-install.debug:
  .if !defined(NO_MODULES_OLD)
 -	if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \
 -		mkdir -p ${DESTDIR}/modules.old ; \
 -		cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old ; \
 +	if [ -d ${DESTDIR}${KMODDIR} -a -n "`ls ${DESTDIR}${KMODDIR}`" ]; then =
 \
 +		mkdir -p ${DESTDIR}${KMODDIR}.old; \
 +		cp -p ${DESTDIR}${KMODDIR}/* ${DESTDIR}${KMODDIR}.old; \
  	fi;
  .endif
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} inst=
 all
 --- sys/conf/Makefile.i386.orig	Sat Jun 17 20:55:20 2000
 +++ sys/conf/Makefile.i386	Sun Jun 18 00:57:30 2000
 @@ -21,6 +21,7 @@
  =
 
  # Can be overridden by makeoptions or /etc/make.conf
  KERNEL?=3D	kernel
 +DESTKERNEL?=3D	${KERNEL}
  STD8X16FONT?=3D	iso
  =
 
  .if !defined(S)
 @@ -218,16 +219,16 @@
  		echo "You must build a kernel first." ; \
  		exit 1 ; \
  	fi
 -.if exists(${DESTDIR}/${KERNEL})
 -	-chflags noschg ${DESTDIR}/${KERNEL}
 -	mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
 +.if exists(${DESTDIR}/${DESTKERNEL})
 +	-chflags noschg ${DESTDIR}/${DESTKERNEL}
 +	mv ${DESTDIR}/${DESTKERNEL} ${DESTDIR}/${DESTKERNEL}.old
  .endif
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${DESTKERNEL}
  =
 
  kernel-reinstall kernel-reinstall.debug:
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${DESTKERNEL}
  =
 
  .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/mo=
 dules)
  all:	modules
 @@ -260,11 +261,14 @@
  modules-tags:
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} tags=
 
  =
 
 +# we need ${KMODDIR} to tell us where modules get installed
 +.include <bsd.own.mk>
 +
  modules-install modules-install.debug:
  .if !defined(NO_MODULES_OLD)
 -	if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \
 -		mkdir -p ${DESTDIR}/modules.old; \
 -		cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \
 +	if [ -d ${DESTDIR}${KMODDIR} -a -n "`ls ${DESTDIR}${KMODDIR}`" ]; then =
 \
 +		mkdir -p ${DESTDIR}${KMODDIR}.old; \
 +		cp -p ${DESTDIR}${KMODDIR}/* ${DESTDIR}${KMODDIR}.old; \
  	fi;
  .endif
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} inst=
 all
 --- sys/conf/Makefile.pc98.orig	Sat Jun 17 20:55:20 2000
 +++ sys/conf/Makefile.pc98	Sun Jun 18 17:58:17 2000
 @@ -23,6 +23,7 @@
  =
 
  # Can be overridden by makeoptions or /etc/make.conf
  KERNEL?=3D	kernel
 +DESTKERNEL?=3D	${KERNEL}
  #STD8X16FONT?=3D	iso
  =
 
  .if !defined(S)
 @@ -221,16 +222,16 @@
  		echo "You must build a kernel first." ; \
  		exit 1 ; \
  	fi
 -.if exists(${DESTDIR}/${KERNEL})
 -	-chflags noschg ${DESTDIR}/${KERNEL}
 -	mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
 +.if exists(${DESTDIR}/${DESTKERNEL})
 +	-chflags noschg ${DESTDIR}/${DESTKERNEL}
 +	mv ${DESTDIR}/${DESTKERNEL} ${DESTDIR}/${DESTKERNEL}.old
  .endif
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${DESTKERNEL}
  =
 
  kernel-reinstall kernel-reinstall.debug:
  	install -c -m 555 -o root -g wheel -fschg \
 -		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL}
 +		${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${DESTKERNEL}
  =
 
  .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/mo=
 dules)
  all:	modules
 @@ -263,11 +264,14 @@
  modules-tags:
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} tags=
 
  =
 
 +# we need ${KMODDIR} to tell us where modules get installed
 +.include <bsd.own.mk>
 +
  modules-install modules-install.debug:
  .if !defined(NO_MODULES_OLD)
 -	if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \
 -		mkdir -p ${DESTDIR}/modules.old; \
 -		cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \
 +	if [ -d ${DESTDIR}${KMODDIR} -a -n "`ls ${DESTDIR}${KMODDIR}`" ]; then =
 \
 +		mkdir -p ${DESTDIR}${KMODDIR}.old; \
 +		cp -p ${DESTDIR}${KMODDIR}/* ${DESTDIR}${KMODDIR}.old; \
  	fi;
  .endif
  	cd $S/modules && env MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules ${MAKE} inst=
 all
 
 
 
 

From: Brian Somers <brian@Awfulhak.org>
To: Johan Karlsson <k@numeri.campus.luth.se>
Cc: freebsd-gnats-submit@FreeBSD.org, sheldonh@uunet.co.za,
	brian@Awfulhak.org, brian@hak.lan.Awfulhak.org
Subject: Re: NEWPATCH Re: kern/17698 
Date: Mon, 19 Jun 2000 09:52:34 +0100

 > Hi
 > 
 > I have redesigned my patch for the build/installkernel targets 
 > in Makefile.inc1. The new version is attached below.
 
 Hi.
 
 I'm not sure that this works for people that want to have a central 
 build machine and the ability to do nfs installs onto other machines.
 
 In this scenario (actually the one I'm using) I want to build several 
 kernels, but I only want to install one of them (the other machines 
 will mount src & obj and have different KERNEL settings in their 
 make.conf files so that they install their own kernels).
 
 I think the previous method was almost correct here in that it set 
 INSTALLKENREL to what it wants to install, it just wasn't passing the 
 information down to the other ${MAKE} properly.
 
 From my experience, I can't say if the INSTALLKERNELS bit is going to 
 be useful for anyone.
 
 Cheers (and sorry to be so un-constructive).
 
 -- 
 Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
       <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 Don't _EVER_ lose your sense of humour !
 
 
 

From: Johan Karlsson <k@numeri.campus.luth.se>
To: Brian Somers <brian@Awfulhak.org>
Cc: freebsd-gnats-submit@FreeBSD.org, sheldonh@uunet.co.za,
	brian@hak.lan.Awfulhak.org
Subject: Re: NEWPATCH Re: kern/17698 
Date: Mon, 19 Jun 2000 22:51:45 +0200

 At Mon, 19 Jun 2000 09:52:34 BST, Brian Somers wrote:
 >> Hi
 >> 
 >> I have redesigned my patch for the build/installkernel targets 
 >> in Makefile.inc1. The new version is attached below.
 >
 >Hi.
 >
 >I'm not sure that this works for people that want to have a central 
 >build machine and the ability to do nfs installs onto other machines.
 >
 >In this scenario (actually the one I'm using) I want to build several 
 >kernels, but I only want to install one of them (the other machines 
 >will mount src & obj and have different KERNEL settings in their 
 >make.conf files so that they install their own kernels).
 >
 
 Ok this can be achived by setting
 KERNELS=A B C D 
 on the buildmachine
 and 
 KERNEL=B
 on the machine that want to install B
 
 However, KERNELS may not be set on the install machine
 or it has set KERNELS to B only.
 
  
 >I think the previous method was almost correct here in that it set 
 >INSTALLKENREL to what it wants to install, it just wasn't passing the 
 >information down to the other ${MAKE} properly.
 
 Does that really work, I think that INSTALLKERNEL is overwritten by 
 Makefile.inc1 and therefor is should not work.
 
 Morover, if you set KERNEL to multiple kernels the 'old' kernel
 build way fails.
 
 >
 >From my experience, I can't say if the INSTALLKERNELS bit is going to 
 >be useful for anyone.
 
 I realy think it is usefull :-)
 I want to both install my custom kernel and GENERIC when I 
 upgrade world. I want to use GENERIC as a backup is I have 
 screwed my custom kernel.
 
 /Johan K
 
 >
 >Cheers (and sorry to be so un-constructive).
 >
 >-- 
 >Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
 >      <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 >Don't _EVER_ lose your sense of humour !
 >
 >
 
 
 

From: Brian Somers <brian@Awfulhak.org>
To: Johan Karlsson <k@numeri.campus.luth.se>
Cc: Brian Somers <brian@Awfulhak.org>,
	freebsd-gnats-submit@FreeBSD.org, sheldonh@uunet.co.za,
	brian@hak.lan.Awfulhak.org
Subject: Re: NEWPATCH Re: kern/17698 
Date: Mon, 19 Jun 2000 23:33:47 +0100

 > At Mon, 19 Jun 2000 09:52:34 BST, Brian Somers wrote:
 > >> Hi
 > >> 
 > >> I have redesigned my patch for the build/installkernel targets 
 > >> in Makefile.inc1. The new version is attached below.
 > >
 > >Hi.
 > >
 > >I'm not sure that this works for people that want to have a central 
 > >build machine and the ability to do nfs installs onto other machines.
 > >
 > >In this scenario (actually the one I'm using) I want to build several 
 > >kernels, but I only want to install one of them (the other machines 
 > >will mount src & obj and have different KERNEL settings in their 
 > >make.conf files so that they install their own kernels).
 > >
 > 
 > Ok this can be achived by setting
 > KERNELS=A B C D 
 > on the buildmachine
 > and 
 > KERNEL=B
 > on the machine that want to install B
 
 Ah ok, I get it.
 
 [.....]
 > Morover, if you set KERNEL to multiple kernels the 'old' kernel
 > build way fails.
 
 Yep.
 
 > >From my experience, I can't say if the INSTALLKERNELS bit is going to 
 > >be useful for anyone.
 > 
 > I realy think it is usefull :-)
 > I want to both install my custom kernel and GENERIC when I 
 > upgrade world. I want to use GENERIC as a backup is I have 
 > screwed my custom kernel.
 
 Ah, ok.  This makes sense I guess :-)
 
 > /Johan K
 
 I'd go along with these changes in that case, but I think Sheldon 
 is probably the best person to get comments from.
 
 Thanks.
 
 -- 
 Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
       <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 Don't _EVER_ lose your sense of humour !
 
 
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Brian Somers <brian@Awfulhak.org>
Cc: Johan Karlsson <k@numeri.campus.luth.se>,
	freebsd-gnats-submit@FreeBSD.org, brian@hak.lan.Awfulhak.org
Subject: Re: NEWPATCH Re: kern/17698 
Date: Tue, 20 Jun 2000 09:58:59 +0200

 On Mon, 19 Jun 2000 23:33:47 +0100, Brian Somers wrote:
 
 > I'd go along with these changes in that case, but I think Sheldon 
 > is probably the best person to get comments from.
 
 I'm just catching up on mail after 2 weeks of leave.  I probably won't
 get to this until next week. :-(
 
 Ciao,
 Sheldon.
 
Responsible-Changed-From-To: sheldonh->freebsd-bugs 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Jun 22 02:26:39 PDT 2000 
Responsible-Changed-Why:  
I need to release this one back into the general domain, since 
I have another project for FreeBSD which must receive my  
undivided attention.  Sorry about this, Johan.  You may wish to 
solicit interest in this one by mailing committers@FreeBSD.org. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17698 
Responsible-Changed-From-To: freebsd-bugs->marcel 
Responsible-Changed-By: marcel 
Responsible-Changed-When: Tue Jul 11 11:05:13 PDT 2000 
Responsible-Changed-Why:  
My plate. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17698 
State-Changed-From-To: open->closed 
State-Changed-By: marcel 
State-Changed-When: Sun Jul 23 11:05:10 PDT 2000 
State-Changed-Why:  
It has been decided that we don't support multiple kernels 
at this time. A new naming scheme has been proposed and 
until that has been materialized, it's best to leave things 
as they are. The ability to install multiple kernels will 
therefore exist one day... 


http://www.freebsd.org/cgi/query-pr.cgi?pr=17698 
>Unformatted:
 >>> Installing kernel(s)
 --------------------------------------------------------------
 ===> GENERIC as /Kernel
 cd /usr/obj/usr/src/sys/GENERIC;  MAKEOBJDIRPREFIX=/usr/obj  COMPILER_PATH=/usr/obj/usr/src/i386/usr/libexec:/usr/obj/usr/src/i386/usr/bin  LIBRARY_PATH=/usr/obj/usr/src/i386/usr/lib:/usr/obj/usr/src/i386/usr/lib  OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr /libexec  PERL5LIB=/usr/obj/usr/src/i386/usr/libdata/perl/5.00503 MACHINE=i386 KERNEL=GENERIC  INSTKERNEL=Kernel make install
 chflags noschg /Kernel
 mv /Kernel /Kernel.old
 install -c -m 555 -o root -g wheel -fschg  GENERIC /Kernel
 ===> NEWCARD as /Kernel.NEWCARD
 cd /usr/obj/usr/src/sys/NEWCARD;  MAKEOBJDIRPREFIX=/usr/obj  COMPILER_PATH=/usr/obj/usr/src/i386/usr/libexec:/usr/obj/usr/src/i386/usr/bin  LIBRARY_PATH=/usr/obj/usr/src/i386/usr/lib:/usr/obj/usr/src/i386/usr/lib  OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr /libexec  PERL5LIB=/usr/obj/usr/src/i386/usr/libdata/perl/5.00503 MACHINE=i386 KERNEL=NEWCARD  INSTKERNEL=Kernel.NEWCARD make install
 chflags noschg /Kernel.NEWCARD
 mv /Kernel.NEWCARD /Kernel.NEWCARD.old
 install -c -m 555 -o root -g wheel -fschg  NEWCARD /Kernel.NEWCARD
 ===> GENERIC as /Kernel.GENERIC
 cd /usr/obj/usr/src/sys/GENERIC;  MAKEOBJDIRPREFIX=/usr/obj  COMPILER_PATH=/usr/obj/usr/src/i386/usr/libexec:/usr/obj/usr/src/i386/usr/bin  LIBRARY_PATH=/usr/obj/usr/src/i386/usr/lib:/usr/obj/usr/src/i386/usr/lib  OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr /libexec  PERL5LIB=/usr/obj/usr/src/i386/usr/libdata/perl/5.00503 MACHINE=i386 KERNEL=GENERIC  INSTKERNEL=Kernel.GENERIC make install
 chflags noschg /Kernel.GENERIC
 mv /Kernel.GENERIC /Kernel.GENERIC.old
 install -c -m 555 -o root -g wheel -fschg  GENERIC /Kernel.GENERIC
 numeri#
 ===============
 
 
 	
 
