Subject: no installing any kernels in a release binary/kernel directory.
To: None <tech-install@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-install
Date: 07/06/2001 15:53:13
The following patch adds the ability for a port not to install any
kernels at all in a release's binary/kernel directory.

The pmax port doesn't need any extra model-specific kernels - the one
in the "kern" set is good on all models.  From reading release(7), a
netbsd.GENERIC.gz isn't mandatory, and there's no use adding another
megabyte or do to the distribution that is effectively dead wood.

Any problems with this?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/


Index: Makefile
===================================================================
RCS file: /cvsroot/basesrc/etc/Makefile,v
retrieving revision 1.176
diff -d -p -u -r1.176 Makefile
--- Makefile	2001/01/21 15:03:22	1.176
+++ Makefile	2001/07/06 05:48:56
@@ -21,6 +21,9 @@
 #	`make distribution' in the sendmail config file source directory.
 #   EXTRA_KERNELS has a machine-dependent list of kernels to build added
 #	to it, but you may also set this to have extra ones built.
+#   INSTALL_RELEASE_KERNELS is normally undefined; if defined and it is
+#	set to "no", no kernels are installed in the binary/kernels
+#	release directory.
 #   BUILD_KERNELS are a machine-dependent list of kernels that should just
 #	be built in place but not made into sets or installed, e.g., an
 #	INSTALL kernel used later in src/distrib/.
@@ -347,13 +350,15 @@ snap_kern:
 	cd ${KERNOBJDIR}/GENERIC &&	\
 		tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
 		gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
+.if !defined(INSTALL_RELEASE_KERNELS) || ${INSTALL_RELEASE_KERNELS} != "no"
 .for configfile in GENERIC ${EXTRA_KERNELS}
 	cd ${KERNOBJDIR}/${configfile} &&	\
 		for kernel in `${GETKERNELAWK} \
 			${KERNCONFDIR}/${configfile}` ; {   \
 		gzip -c -9 < $${kernel} > \
 			${RELEASEDIR}/binary/kernel/$${kernel}.${configfile}.gz ; }
-.endfor # EXTRA_KERNELS
+.endfor # GENERIC EXTRA_KERNELS
+.endif # !INSTALL_RELEASE_KERNELS
 .endif # KERNELS_DONE
 .endif # no target(snap_kern)
 
Index: etc.pmax/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/etc/etc.pmax/Makefile.inc,v
retrieving revision 1.7
diff -d -p -u -r1.7 Makefile.inc
--- etc.pmax/Makefile.inc	2000/09/10 22:04:27	1.7
+++ etc.pmax/Makefile.inc	2001/07/06 05:48:57
@@ -7,6 +7,9 @@
 # in the distribution.
 #EXTRA_KERNELS+=
 
+# Don't put any kernels in binary/kernel directory
+INSTALL_RELEASE_KERNELS=no
+
 # Set this for any kernels beyond GENERIC and ${EXTRA_KERNELS} you
 # need to build to make installation tools/media.
 BUILD_KERNELS+=INSTALL RAMDISK