Module Name:    src
Committed By:   martin
Date:           Fri Apr 24 17:40:54 UTC 2020

Modified Files:
        src/distrib/common [netbsd-9]: Makefile.bootcd
        src/distrib/vax/cdroms/installcd [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #849):

        distrib/vax/cdroms/installcd/Makefile: revision 1.19
        distrib/common/Makefile.bootcd: revision 1.43

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.41 -r1.41.2.1 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.17 -r1.17.2.1 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.41 src/distrib/common/Makefile.bootcd:1.41.2.1
--- src/distrib/common/Makefile.bootcd:1.41	Fri Sep 28 15:03:34 2018
+++ src/distrib/common/Makefile.bootcd	Fri Apr 24 17:40:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.41 2018/09/28 15:03:34 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.41.2.1 2020/04/24 17:40:54 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.17 src/distrib/vax/cdroms/installcd/Makefile:1.17.2.1
--- src/distrib/vax/cdroms/installcd/Makefile:1.17	Fri Sep 28 15:05:23 2018
+++ src/distrib/vax/cdroms/installcd/Makefile	Fri Apr 24 17:40:53 2020
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile,v 1.17 2018/09/28 15:05:23 martin Exp $
+#	$NetBSD: Makefile,v 1.17.2.1 2020/04/24 17:40:53 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDRELEASE_NODEBUG=	true
+CDDEV_POPULATE=	true			# populate /dev on the CD
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
 CDRELEASE_NOISOS=true
 CD_SETS=	base etc	# no modules for VAX

Reply via email to