Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2000 09:35:19 +0200
From:      Udo Schweigert <ust@cert.siemens.de>
To:        Kris Kennaway <kris@FreeBSD.ORG>
Cc:        stable@FreeBSD.ORG
Subject:   Re: HEADS UP! Always use the 'make buildkernel' target to make yer kernels
Message-ID:  <20000710093519.A52878@alaska.cert.siemens.de>
In-Reply-To: <Pine.BSF.4.21.0007092043510.33246-100000@freefall.freebsd.org>; from kris@FreeBSD.ORG on Sun, Jul 09, 2000 at 08:49:50PM -0700
References:  <Pine.BSF.4.21.0007092043510.33246-100000@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 09, 2000 at 20:49:50 -0700, Kris Kennaway wrote:
> Subject basically says it all. "make buildkernel KERNEL=<whatever>" and
> "make installkernel KERNEL=<whatever>" (or set KERNEL in /etc/make.conf or
> the environment, where KERNEL is the name of the kernel to build (GENERIC,
> etc)) are what you should always be using to build your kernels, unless
> you know what you're doing.
> 

I found it was a good idea (by experience), to always have an up to date 
version of the GENERIC-kernel available in /. Since it is possible to
build two kernel by saying 

# make buildkernel KERNEL="mykernel GENERIC"

it would also be nice to have the possibility to install both new kernels to
/ (instead of only installing the first) by saying

# make installkernel KERNEL="mykernel GENERIC"

Attached you find a patch to do this.

Best regards.
-- 
Udo Schweigert, Siemens AG   | Voice      : +49 89 636 42170
ZT IK 3, Siemens CERT        | Fax        : +49 89 636 41166
D-81730 Muenchen / Germany   | email      : ust@cert.siemens.de
PGP-2/5 fingerprint          | D8 A5 DF 34 EC 87 E8 C6  E2 26 C4 D0 EE 80 36 B2

--- Makefile.inc1.orig	Sun Jul  2 13:00:19 2000
+++ Makefile.inc1	Mon Jul 10 09:25:36 2000
@@ -356,13 +356,11 @@
 .endif
 
 BUILDKERNELS=
-INSTALLKERNEL=
+INSTALLKERNELS=
 .for _kernel in ${KERNEL}
 .if exists(${KRNLCONFDIR}/${_kernel})
 BUILDKERNELS+=	${_kernel}
-.if empty(INSTALLKERNEL)
-INSTALLKERNEL= ${_kernel}
-.endif
+INSTALLKERNELS+= ${_kernel}
 .endif
 .endfor
 
@@ -393,12 +391,14 @@
 #
 # installkernel
 #
-# Install the kernel defined by INSTALLKERNEL
+# Install the kernels defined by INSTALLKERNELS
 #
 installkernel:
-	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
-		${IMAKEENV} MACHINE=${MACHINE} KERNEL=${INSTALLKERNEL} \
+.for _kernel in ${INSTALLKERNELS}
+	cd ${KRNLOBJDIR}/${_kernel}; \
+		${IMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} \
 		    ${MAKE} install
+.endfor
 
 #
 # update


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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