Source-Changes-HG archive

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

[src/trunk]: src/distrib Do not populate /dev on CD images by default, instea...



details:   https://anonhg.NetBSD.org/src/rev/57feb0c54fbb
branches:  trunk
changeset: 847381:57feb0c54fbb
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 20 19:46:51 2019 +0000

description:
Do not populate /dev on CD images by default, instead rely on init
doing the tmpfs / MAKEDEV magic.
On images for machines with serious ram shortage (where the additional
tmpfs hurts, like VAX) override this with CDDEV_POPULATE=true.
Should fix PR port-amd64/54776.

diffstat:

 distrib/common/Makefile.bootcd        |  13 +++++++++++--
 distrib/vax/cdroms/installcd/Makefile |   3 ++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r df4f7f7b1aaa -r 57feb0c54fbb distrib/common/Makefile.bootcd
--- a/distrib/common/Makefile.bootcd    Fri Dec 20 19:03:17 2019 +0000
+++ b/distrib/common/Makefile.bootcd    Fri Dec 20 19:46:51 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootcd,v 1.42 2019/09/23 13:42:31 christos Exp $
+#      $NetBSD: Makefile.bootcd,v 1.43 2019/12/20 19:46:51 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -22,6 +22,8 @@
 #                      stuff to put on CD (use in Makefiles)
 #      CDEXTRA_SKIP    A list of file exclusion paths to exclude when copying
 #                      directories of extra stuff in CDEXTRA AND CDBUILDEXTRA
+#      CDDEV_POPULATE  Set to 'true' to fully populate /dev on the CD (and
+#                      safe a tmpfs union mount)
 #      BOOT            Defaults to $DESTDIR/usr/mdec/boot
 #      BOOTXX_CD9660   Defaults to $DESTDIR/usr/mdec/bootxx_cd9660
 #      CDBOOTOPTIONS   Options for installboot, eg -o console=com0,speed=9600
@@ -44,6 +46,7 @@
 BOOTXX_CD9660?=        ${DESTDIR}/usr/mdec/bootxx_cd9660
 CDRELEASE?=    false
 CDSOURCE?=     false
+CDDEV_POPULATE?=false
 .if ${CDRELEASE} == false
 CDROMS_RELEASEDIR?=    ${MACHINE}/installation/cdrom
 .else
@@ -269,15 +272,21 @@
        fi
 .endif
 
+.if ${CDDEV_POPULATE} != true
+DELDEV=-e '/^\.\/dev\/.*type=char/d'
+.endif
+
 image:
        @echo Preparing spec files for makefs...
        ${RM} -f ${WORKSPEC}
        if [ -d cdrom/etc/mtree ]; then                         \
                cat cdrom/etc/mtree/* |                         \
                    ${TOOL_SED} -e 's/ size=[0-9]*//'           \
+                    ${DELDEV}                                  \
                     -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC};  \
        fi
-       if [ -r cdrom/dev/MAKEDEV ]; then                       \
+       if [ -r cdrom/dev/MAKEDEV ] &&                          \
+                ${CDDEV_POPULATE} == true; then                \
                ${HOST_SH} cdrom/dev/MAKEDEV -s init |          \
                    ${TOOL_SED} -e '/^\. type=dir/d'            \
                        -e 's,^\.,./dev,' >> ${WORKSPEC};       \
diff -r df4f7f7b1aaa -r 57feb0c54fbb distrib/vax/cdroms/installcd/Makefile
--- a/distrib/vax/cdroms/installcd/Makefile     Fri Dec 20 19:03:17 2019 +0000
+++ b/distrib/vax/cdroms/installcd/Makefile     Fri Dec 20 19:46:51 2019 +0000
@@ -1,6 +1,7 @@
-#      $NetBSD: Makefile,v 1.18 2019/09/23 13:42:35 christos Exp $
+#      $NetBSD: Makefile,v 1.19 2019/12/20 19:46:51 martin Exp $
 CDBASE=                vaxcd                   # gives ${CDBASE}.iso
 CDRELEASE=     true                    # include $RELEASEDIR/$RELEASEMACHINEDIR
+CDDEV_POPULATE=        true                    # populate /dev on the CD
 CDRELEASE_NODEBUG=     true
 CDKERNELS=     ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-GENERIC.gz      netbsd.gz
 CDRELEASE_NOISOS=true



Home | Main Index | Thread Index | Old Index