Module Name:    src
Committed By:   christos
Date:           Thu May 16 15:46:42 UTC 2024

Modified Files:
        src/distrib/common: Makefile.image
        src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Apply the -xx treatment to the rest of the ffs makefs invocations.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/common/Makefile.image
cvs rdiff -u -r1.35 -r1.36 src/distrib/common/bootimage/Makefile.bootimage

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.image
diff -u src/distrib/common/Makefile.image:1.41 src/distrib/common/Makefile.image:1.42
--- src/distrib/common/Makefile.image:1.41	Tue Mar 19 20:31:54 2024
+++ src/distrib/common/Makefile.image	Thu May 16 11:46:42 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.41 2024/03/20 00:31:54 christos Exp $
+#	$NetBSD: Makefile.image,v 1.42 2024/05/16 15:46:42 christos Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -99,7 +99,7 @@ ${IMAGE}: ${WORKBUILT}
 	${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
 	rm -f ${.TARGET} ${.TARGET}.tmp; \
 	${TOOL_MAKEFS} -t ffs -B ${IMAGEENDIAN} -s ${IMAGESIZE} -F ${WORKSPEC} \
-	    ${MAKEFS_TIMESTAMP} -N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
+	    -xx ${MAKEFS_TIMESTAMP} -N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
 	    -o optimization=space,minfree=0 \
 	    ${MAKEFS_FLAGS} ${.TARGET}.tmp ${WORKDIR} \
 	&& mv -f ${.TARGET}.tmp ${.TARGET}; \

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.35 src/distrib/common/bootimage/Makefile.bootimage:1.36
--- src/distrib/common/bootimage/Makefile.bootimage:1.35	Mon Apr 22 10:41:24 2024
+++ src/distrib/common/bootimage/Makefile.bootimage	Thu May 16 11:46:42 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.35 2024/04/22 14:41:24 nia Exp $
+#	$NetBSD: Makefile.bootimage,v 1.36 2024/05/16 15:46:42 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -171,6 +171,8 @@ DD?=		dd
 MKDIR?=		mkdir -p
 RM?=		rm
 
+MAKESPEC=	${HOST_SH} ${NETBSDSRCDIR}/etc/makespec
+
 #
 # common definitions for image
 #
@@ -351,6 +353,7 @@ ${WORKFSTAB}:
 # create root file system for the image
 #
 ${TARGETFS}: prepare_md_post ${WORKFSTAB}
+	@${RM} -f ${WORKSPEC}
 	@if [ ! -d ${RELEASEDIR}/${RELEASEMACHINEDIR} ]; then 		\
 		echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \
 		false; 							\
@@ -413,11 +416,11 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB
 	@if [ -f ${_SRC} ]; then 					\
 		echo ${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
 		${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
+		echo "./${_TARGET} type=file uname=root gname=wheel mode=0555" >> ${WORKSPEC}; \
 	fi
 .endfor
 .endif
 	@echo Preparing spec files for makefs...
-	${RM} -f ${WORKSPEC}
 	cat ${WORKDIR}/etc/mtree/* |					\
 	    ${TOOL_SED} -e 's/ size=[0-9]*//' > ${WORKSPEC}
 	${HOST_SH} ${WORKDIR}/dev/MAKEDEV -s all ipty |			\
@@ -430,12 +433,19 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB
 .if defined(SPEC_EXTRA)
 	cat ${SPEC_EXTRA} >> ${WORKSPEC}
 .endif
+	if [ -f ${WORKDIR}/netbsd.gdb ]; then \
+	    echo "./netbsd.gdb type=file uname=root gname=wheel mode=0444" \
+	    >> ${WORKSPEC}; \
+	fi
+	if [ -d ${WORKDIR}/${MACHINE} ]; then \
+	    ${MAKESPEC} -d ${WORKDIR} ${MACHINE} >> ${WORKSPEC}; \
+	fi
 	@echo Creating rootfs...
 	# XXX /var/spool/ftp/hidden is unreadable
 	${CHMOD} +r ${WORKDIR}/var/spool/ftp/hidden
 	${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE}			\
 	    -B ${TARGET_ENDIANNESS}					\
-	    -F ${WORKSPEC} -N ${WORKDIR}/etc				\
+	    -xx -F ${WORKSPEC} -N ${WORKDIR}/etc			\
 	    ${MAKEFS_TIMESTAMP}						\
 	    ${IMGMAKEFSOPTIONS}						\
 	    ${WORKFS} ${WORKDIR}

Reply via email to