Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Change the way kernel sets are specified, and make them



details:   https://anonhg.NetBSD.org/src/rev/ff996d86369c
branches:  trunk
changeset: 518408:ff996d86369c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Nov 29 22:45:53 2001 +0000

description:
Change the way kernel sets are specified, and make them
more consistent.  To quote the comment in etc/Makefile
that describes how it's done:

# This target builds the kernels specified by each port.  A port may
# specify the following kernels:
#
#       KERNEL_SETS             The list of kernels that will be
#                               packaged into sets, named
#                               kern-${kernel}.tgz.  These kernels
#                               are also placed in the binary/kernels
#                               area of the release package as
#                               netbsd-${kernel}.gz.
#
#       EXTRA_KERNELS           Additional kernels to place in the
#                               binary/kernels area of the release
#                               package as netbsd-${kernel}.gz, but
#                               which are not placed into sets. This
#                               allows a port to provide e.g. a netbootable
#                               installation kernel containing a ramdisk.
#
#       BUILD_KERNELS           Additional kernels to build which are
#                               not placed into sets nor into the
#                               binary/kernels area of the release
#                               package.  These are typically kernels
#                               that are built for inclusion only in
#                               installation disk/CD-ROM/tape images.
#

diffstat:

 etc/Makefile                      |  58 ++++++++++++++++++++++----------------
 etc/etc.alpha/Makefile.inc        |   5 ++-
 etc/etc.amiga/Makefile.inc        |   8 ++--
 etc/etc.arm26/Makefile.inc        |   6 +--
 etc/etc.arm32/Makefile.inc        |   9 ++---
 etc/etc.atari/Makefile.inc        |   8 ++--
 etc/etc.bebox/Makefile.inc        |   5 +--
 etc/etc.hp300/Makefile.inc        |   8 ++--
 etc/etc.hpcmips/Makefile.inc      |   7 ++--
 etc/etc.i386/Makefile.inc         |  17 +++--------
 etc/etc.mac68k/Makefile.inc       |   8 +++--
 etc/etc.macppc/Makefile.inc       |   5 ++-
 etc/etc.mvme68k/Makefile.inc      |   9 ++---
 etc/etc.netwinder/Makefile.inc    |   8 ++--
 etc/etc.news68k/Makefile.inc      |   9 ++----
 etc/etc.next68k/Makefile.inc      |   6 +--
 etc/etc.playstation2/Makefile.inc |   6 ++-
 etc/etc.pmax/Makefile.inc         |  10 ++----
 etc/etc.prep/Makefile.inc         |   7 +++-
 etc/etc.sandpoint/Makefile.inc    |   6 +--
 etc/etc.sgimips/Makefile.inc      |  10 ++----
 etc/etc.sparc/Makefile.inc        |   9 ++---
 etc/etc.sparc64/Makefile.inc      |   7 ++--
 etc/etc.sun2/Makefile.inc         |  15 +++------
 etc/etc.sun3/Makefile.inc         |  15 +++------
 etc/etc.vax/Makefile.inc          |   8 ++--
 etc/etc.walnut/Makefile.inc       |   6 +--
 etc/etc.x68k/Makefile.inc         |   8 ++--
 28 files changed, 132 insertions(+), 151 deletions(-)

diffs (truncated from 619 to 300 lines):

diff -r b382e9a758fd -r ff996d86369c etc/Makefile
--- a/etc/Makefile      Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/Makefile      Thu Nov 29 22:45:53 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.195 2001/11/25 18:19:14 thorpej Exp $
+#      $NetBSD: Makefile,v 1.196 2001/11/29 22:45:53 thorpej Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -19,11 +19,6 @@
 #      before kernel compile
 #   NO_SENDMAIL is normally undefined; if defined, it will not do a
 #      `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.
-#   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/.
 #
 # Targets:
 #    distribution: makes a full NetBSD distribution in DESTDIR. If
@@ -337,16 +332,29 @@
        ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
 .endfor
 
-
-# This target builds the GENERIC kernel (which must exist for all
-# ports) and puts it in binary/sets/kern.tgz, and also builds any
-# kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
-# system can create more than one kernel from a single configuration
-# we figure out how many there are, what they're named, and move them
-# to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
-# simply be "netbsd". If we don't find the "config" line, assume the
-# kernel will be "netbsd" (some config files are simple additions on
-# GENERIC, and just include it).
+# This target builds the kernels specified by each port.  A port may
+# specify the following kernels:
+#
+#      KERNEL_SETS             The list of kernels that will be
+#                              packaged into sets, named
+#                              kern-${kernel}.tgz.  These kernels
+#                              are also placed in the binary/kernels
+#                              area of the release package as
+#                              netbsd-${kernel}.gz.
+#
+#      EXTRA_KERNELS           Additional kernels to place in the
+#                              binary/kernels area of the release
+#                              package as netbsd-${kernel}.gz, but
+#                              which are not placed into sets. This
+#                              allows a port to provide e.g. a netbootable
+#                              installation kernel containing a ramdisk.
+#
+#      BUILD_KERNELS           Additional kernels to build which are
+#                              not placed into sets nor into the
+#                              binary/kernels area of the release
+#                              package.  These are typically kernels
+#                              that are built for inclusion only in
+#                              installation disk/CD-ROM/tape images.
 #
 GETKERNELAWK=  awk '/^config/ {print $$2; found=1} \
                END{ if (found == 0) print "netbsd"; }'
@@ -354,24 +362,26 @@
 .if !target(snap_kern)
 snap_kern:
 .ifndef KERNELS_DONE
-.for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
+.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
        cd ${KERNCONFDIR} && ${CONFIG} \
                -b ${KERNOBJDIR}/${configfile:C/.*\///} -s ${KERNSRCDIR} ${configfile}
 .ifndef UPDATE
        cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean 
 .endif
        cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE} ${_J}
-.endfor # kernels
-       cd ${KERNOBJDIR}/GENERIC &&     \
-               tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
-               gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
-.for configfile in GENERIC ${EXTRA_KERNELS}
+.endfor # build kernels
+.for configfile in ${KERNEL_SETS}
+       cd ${KERNOBJDIR}/${configfile:C/.*\///} && \
+               tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/${configfile}` | \
+               gzip -c -9 > ${RELEASEDIR}/binary/sets/kern-${configfile}.tgz
+.endfor # make kernel sets
+.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS}
        cd ${KERNOBJDIR}/${configfile:C/.*\///} &&      \
                for kernel in `${GETKERNELAWK} \
                        ${KERNCONFDIR}/${configfile:C/.*\///}` ; do   \
                gzip -c -9 < $${kernel} > \
-                       ${RELEASEDIR}/binary/kernel/$${kernel}.${configfile:C/.*\///}.gz ; done
-.endfor # EXTRA_KERNELS
+                       ${RELEASEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}.gz ; done
+.endfor # place KERNEL_SETS kernels + EXTRA_KERNELS in binary/kernel/...
 .endif # KERNELS_DONE
 .endif # no target(snap_kern)
 
diff -r b382e9a758fd -r ff996d86369c etc/etc.alpha/Makefile.inc
--- a/etc/etc.alpha/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.alpha/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,6 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.2 2001/05/28 18:21:13 he Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:54 thorpej Exp $
+
+KERNEL_SETS=           GENERIC
 
 BUILD_KERNELS+=                INSTALL
+
 INSTALLATION_DIRS+=    installation/floppy     \
                        installation/diskimage  \
                        installation/instkernel \
diff -r b382e9a758fd -r ff996d86369c etc/etc.amiga/Makefile.inc
--- a/etc/etc.amiga/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.amiga/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile.inc,v 1.14 2000/09/17 19:04:39 is Exp $
+#      $NetBSD: Makefile.inc,v 1.15 2001/11/29 22:45:54 thorpej Exp $
 #
 #      etc.amiga/Makefile.inc -- amiga-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-EXTRA_KERNELS+=INSTALL INSTWDCPCM
+KERNEL_SETS=           GENERIC
+
+EXTRA_KERNELS=         INSTALL INSTWDCPCM
 
 INSTALLATION_DIRS+=    installation/miniroot \
                        installation/misc
diff -r b382e9a758fd -r ff996d86369c etc/etc.arm26/Makefile.inc
--- a/etc/etc.arm26/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.arm26/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,8 +1,6 @@
-#      $NetBSD: Makefile.inc,v 1.2 2001/03/12 14:10:03 wiz Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:54 thorpej Exp $
 #
 #      etc.arm26/Makefile.inc -- arm26-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-EXTRA_KERNELS+= FOURMEG
+KERNEL_SETS=           GENERIC FOURMEG
diff -r b382e9a758fd -r ff996d86369c etc/etc.arm32/Makefile.inc
--- a/etc/etc.arm32/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.arm32/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,12 +1,11 @@
-#      $NetBSD: Makefile.inc,v 1.10 2000/11/12 00:59:05 matt Exp $
+#      $NetBSD: Makefile.inc,v 1.11 2001/11/29 22:45:55 thorpej Exp $
 #
 #      etc.arm32/Makefile.inc -- arm32-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-EXTRA_KERNELS+= A7000  CATS     EBSA285 RISCPC  SHARK
-BUILD_KERNELS= A7INST CATSINST         RPCINST SHARKINST
+KERNEL_SETS=           SHARK
+
+BUILD_KERNELS=         SHARKINST
 
 INSTALLATION_DIRS+=    installation/kernel \
                        installation/misc
diff -r b382e9a758fd -r ff996d86369c etc/etc.atari/Makefile.inc
--- a/etc/etc.atari/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.atari/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile.inc,v 1.7 2000/11/04 21:15:36 leo Exp $
+#      $NetBSD: Makefile.inc,v 1.8 2001/11/29 22:45:55 thorpej Exp $
 #
 #      etc.atari/Makefile.inc -- atari-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-EXTRA_KERNELS+=        ATARITT BOOT BOOTX FALCON HADES
+KERNEL_SETS=           GENERIC
+
+EXTRA_KERNELS=         ATARITT BOOT BOOTX FALCON HADES
 
 INSTALLATION_DIRS+=    installation/miniroot \
                        installation/misc
diff -r b382e9a758fd -r ff996d86369c etc/etc.bebox/Makefile.inc
--- a/etc/etc.bebox/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.bebox/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,8 +1,5 @@
-#      $NetBSD: Makefile.inc,v 1.2 1999/02/05 03:01:51 cjs Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:55 thorpej Exp $
 #
 #      etc.bebox/Makefile.inc -- bebox-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-#EXTRA_KERNELS+=
diff -r b382e9a758fd -r ff996d86369c etc/etc.hp300/Makefile.inc
--- a/etc/etc.hp300/Makefile.inc        Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.hp300/Makefile.inc        Thu Nov 29 22:45:53 2001 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile.inc,v 1.8 2001/04/21 17:58:21 he Exp $
+#      $NetBSD: Makefile.inc,v 1.9 2001/11/29 22:45:56 thorpej Exp $
 #
 #      etc.hp300/Makefile.inc -- hp300-specific etc Makefile targets
 #
 
-# Set this for any kernels beyond GENERIC you want to include
-# in the distribution.
-EXTRA_KERNELS+= DISKLESS
+KERNEL_SETS=           GENERIC
+
+EXTRA_KERNELS=         DISKLESS
 
 # Build the boot media and install notes and install them
 snap_md_post:
diff -r b382e9a758fd -r ff996d86369c etc/etc.hpcmips/Makefile.inc
--- a/etc/etc.hpcmips/Makefile.inc      Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.hpcmips/Makefile.inc      Thu Nov 29 22:45:53 2001 +0000
@@ -1,7 +1,8 @@
-#      $NetBSD: Makefile.inc,v 1.3 2001/04/22 02:03:05 shin Exp $
+#      $NetBSD: Makefile.inc,v 1.4 2001/11/29 22:45:56 thorpej Exp $
 
-EXTRA_KERNELS+=        TX3912 TX3922
-BUILD_KERNELS+=        RAMDISK INSTALL_TX3912 INSTALL_TX3922
+KERNEL_SETS=           GENERIC TX3912 TX3922
+
+BUILD_KERNELS=         RAMDISK INSTALL_TX3912 INSTALL_TX3922
 
 snap_md_post:
 .ifndef UPDATE
diff -r b382e9a758fd -r ff996d86369c etc/etc.i386/Makefile.inc
--- a/etc/etc.i386/Makefile.inc Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.i386/Makefile.inc Thu Nov 29 22:45:53 2001 +0000
@@ -1,14 +1,13 @@
-#      $NetBSD: Makefile.inc,v 1.29 2001/09/13 18:08:13 jdolecek Exp $
+#      $NetBSD: Makefile.inc,v 1.30 2001/11/29 22:45:56 thorpej Exp $
 #
 #      etc.i386/Makefile.inc -- i386-specific etc Makefile targets
 #
 
-# These are packaged and distributed
-EXTRA_KERNELS+= GENERIC_TINY GENERIC_LAPTOP GENERIC_DIAGNOSTIC GENERIC_PS2TINY
+KERNEL_SETS=   GENERIC GENERIC_TINY GENERIC_LAPTOP GENERIC_DIAGNOSTIC \
+               GENERIC_PS2TINY
 
-# These are for use by the bootfloppy construction tools
-BUILD_KERNELS+= INSTALL INSTALL_SMALL INSTALL_TINY INSTALL_LAPTOP INSTALL_PS2
-EXTRA_KERNEL_SETS=tiny laptop ps2tiny
+BUILD_KERNELS= INSTALL INSTALL_SMALL INSTALL_TINY INSTALL_LAPTOP INSTALL_PS2
+
 INSTALLATION_DIRS += installation/misc
 
 # mkisofs arguments to generate bootable iso image
@@ -17,12 +16,6 @@
 # Tar up extra kernel sets.
 # Build the boot floppies and install them
 snap_md_post:
-.for kernel in ${EXTRA_KERNEL_SETS}
-       uppername=`echo ${kernel} | tr 'a-z' 'A-Z'` && \
-               cd ${KERNOBJDIR}/GENERIC_$$uppername &&     \
-               tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
-               gzip -c -9 > ${RELEASEDIR}/binary/sets/kern-${kernel}.tgz
-.endfor
 .ifndef UPDATE
        cd ${.CURDIR}/../distrib && ${MAKE} cleandir
 .endif
diff -r b382e9a758fd -r ff996d86369c etc/etc.mac68k/Makefile.inc
--- a/etc/etc.mac68k/Makefile.inc       Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.mac68k/Makefile.inc       Thu Nov 29 22:45:53 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.7 2000/12/07 10:57:18 toddpw Exp $
+#      $NetBSD: Makefile.inc,v 1.8 2001/11/29 22:45:56 thorpej Exp $
 #
 #      mac68k-specific release building goo
 #
@@ -8,8 +8,10 @@
 # simply its corresponding config with "ncrscsi" commented out,
 # and "sbc" uncommented.
 #
-BUILD_KERNELS?=        INSTALL INSTALLSBC
-EXTRA_KERNELS?=                GENERICSBC
+
+KERNEL_SETS=           GENERIC GENERICSBC
+
+BUILD_KERNELS=         INSTALL INSTALLSBC
 
 INSTALLATION_DIRS+=    installation/instkernel
 
diff -r b382e9a758fd -r ff996d86369c etc/etc.macppc/Makefile.inc
--- a/etc/etc.macppc/Makefile.inc       Thu Nov 29 22:32:53 2001 +0000
+++ b/etc/etc.macppc/Makefile.inc       Thu Nov 29 22:45:53 2001 +0000
@@ -1,6 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.2 2000/06/12 23:04:36 matt Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:57 thorpej Exp $
+
+KERNEL_SETS=           GENERIC
 
 BUILD_KERNELS+=                INSTALL GENERIC_MD
+
 INSTALLATION_DIRS+=    installation
 



Home | Main Index | Thread Index | Old Index