Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2000 00:38:08 -0700 (PDT)
From:      Kris Kennaway <kris@FreeBSD.org>
To:        current@freebsd.org
Subject:   Re: HEADS UP! Always use the 'make buildkernel' target to make yer kernels (fwd)
Message-ID:  <Pine.BSF.4.21.0007100037210.66738-100000@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
I don't particularly want to be drawn into this whole buildfoo
bootstrapping thing..any other takers? :-)

Kris

--
In God we Trust -- all others must submit an X.509 certificate.
    -- Charles Forsythe <forsythe@alum.mit.edu>

---------- Forwarded message ----------
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

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-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0007100037210.66738-100000>