Module Name: src
Committed By: martin
Date: Fri Dec 20 19:46:51 UTC 2019
Modified Files:
src/distrib/common: Makefile.bootcd
src/distrib/vax/cdroms/installcd: Makefile
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.18 -r1.19 src/distrib/vax/cdroms/installcd/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.42 src/distrib/common/Makefile.bootcd:1.43
--- src/distrib/common/Makefile.bootcd:1.42 Mon Sep 23 13:42:31 2019
+++ src/distrib/common/Makefile.bootcd Fri Dec 20 19:46:51 2019
@@ -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 @@ BOOT?= ${DESTDIR}/usr/mdec/boot
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 @@ copy-releasedir:
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}; \
Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.18 src/distrib/vax/cdroms/installcd/Makefile:1.19
--- src/distrib/vax/cdroms/installcd/Makefile:1.18 Mon Sep 23 13:42:35 2019
+++ src/distrib/vax/cdroms/installcd/Makefile Fri Dec 20 19:46:51 2019
@@ -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