CVS commit: src/distrib/common/bootimage

2021-07-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jul 24 13:59:29 UTC 2021

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

Log Message:
bootimage: allow appending additional rc.conf options

If RC_CONF_EXTRA is defined, append the contents of this file to the
target file-system's rc.conf


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.27 src/distrib/common/bootimage/Makefile.bootimage:1.28
--- src/distrib/common/bootimage/Makefile.bootimage:1.27	Fri Jun  4 17:09:36 2021
+++ src/distrib/common/bootimage/Makefile.bootimage	Sat Jul 24 13:59:28 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.27 2021/06/04 17:09:36 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.28 2021/07/24 13:59:28 jmcneill Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -366,6 +366,10 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB
 	@echo Setting savecore=NO in /etc/rc.conf ...
 	echo "savecore=NO" >> ${WORKRCCONF}
 .endif
+.if defined(RC_CONF_EXTRA)
+	@echo Adding contents of ${RC_CONF_EXTRA} to /etc/rc.conf ...
+	cat ${RC_CONF_EXTRA} >> ${WORKRCCONF}
+.endif
 	${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf
 .if defined(IMGDIR_EXTRA)
 	@echo Copying extra dirs...



CVS commit: src/distrib/common/bootimage

2021-06-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jun  4 17:09:36 UTC 2021

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

Log Message:
Check and remove a stale work file for UEFI images with incorrect size.

Fixes PR/56132 (build.sh target install-image fails in update-mode).


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.26 src/distrib/common/bootimage/Makefile.bootimage:1.27
--- src/distrib/common/bootimage/Makefile.bootimage:1.26	Wed Aug  5 01:35:18 2020
+++ src/distrib/common/bootimage/Makefile.bootimage	Fri Jun  4 17:09:36 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.26 2020/08/05 01:35:18 jmcneill Exp $
+#	$NetBSD: Makefile.bootimage,v 1.27 2021/06/04 17:09:36 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -294,6 +294,15 @@ WORKFATDIR?=	work.fatdir
 
 .if ${USE_GPT} != "no"
 ${WORKFSTAB}: ${WORKMBR}
+
+.BEGIN:
+	@if [ -f ${WORKMBR} ]; then			 		\
+		st_size=`${TOOL_STAT} -f %z ${WORKMBR}`;		\
+		if [ "$$st_size" -ne "$$((${IMAGESECTORS} * 512))" ]; then \
+			echo Removing stale ${WORKMBR} ...;		\
+			rm -f ${WORKMBR};\
+		fi			\
+	fi
 .endif
 
 ${WORKFSTAB}:



CVS commit: src/distrib/common

2020-10-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Oct 11 14:10:04 UTC 2020

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Copy release to /${RELEASEMACHINEDIR} instead of /${MACHINE} to match
sysinst expectations.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/common/Makefile.bootcd

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.43 src/distrib/common/Makefile.bootcd:1.44
--- src/distrib/common/Makefile.bootcd:1.43	Fri Dec 20 19:46:51 2019
+++ src/distrib/common/Makefile.bootcd	Sun Oct 11 14:10:04 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.43 2019/12/20 19:46:51 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.44 2020/10/11 14:10:04 jmcneill Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -188,8 +188,8 @@ copy-releasedir:
 			echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \
 			exit 1; 	\
 		fi; 			\
-		${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom/${MACHINE}"; 	\
-		release_destdir="${CUROBJDIR}/cdrom/${MACHINE}";	\
+		${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom/${RELEASEMACHINEDIR}"; 	\
+		release_destdir="${CUROBJDIR}/cdrom/${RELEASEMACHINEDIR}";	\
 		cd ${RELEASEDIR}/${RELEASEMACHINEDIR}; 			\
 		echo Copying $$(pwd) to $$release_destdir ...; 		\
 		${TOOL_PAX} ${PAX_TIMESTAMP}\



CVS commit: src/distrib/common

2020-07-02 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Jul  2 08:48:11 UTC 2020

Modified Files:
src/distrib/common: Makefile.minirootkmod

Log Message:
Makefile.minirootkmod don't have SRCS


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/common/Makefile.minirootkmod

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.minirootkmod
diff -u src/distrib/common/Makefile.minirootkmod:1.4 src/distrib/common/Makefile.minirootkmod:1.5
--- src/distrib/common/Makefile.minirootkmod:1.4	Sat Apr  4 19:50:53 2020
+++ src/distrib/common/Makefile.minirootkmod	Thu Jul  2 08:48:10 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.minirootkmod,v 1.4 2020/04/04 19:50:53 christos Exp $
+#	$NetBSD: Makefile.minirootkmod,v 1.5 2020/07/02 08:48:10 lukem Exp $
 #
 # Makefile snippet to build a miniroot kernel module (e.g. miniroot.kmod)
 #
@@ -25,6 +25,9 @@ RAMDISK?=	ramdisk
 MKMAN=		no
 PROG=		${MINIROOT}.kmod
 
+# Not a real PROG; doesn't actually have source
+SRCS.${PROG}=
+
 # SRCMOD is a skeleton version of miniroot.kmod, without an embedded ramdisk.
 # It should already have been created by "make install" in
 # .../sys/modules/miniroot, and its name includes literal "miniroot",



CVS commit: src/distrib/common/bootimage

2020-05-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 28 15:12:03 UTC 2020

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

Log Message:
Default USE_MBR to no


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/common/bootimage/Makefile.installimage

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/bootimage/Makefile.installimage
diff -u src/distrib/common/bootimage/Makefile.installimage:1.6 src/distrib/common/bootimage/Makefile.installimage:1.7
--- src/distrib/common/bootimage/Makefile.installimage:1.6	Thu Nov 21 22:29:03 2019
+++ src/distrib/common/bootimage/Makefile.installimage	Thu May 28 15:12:03 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.installimage,v 1.6 2019/11/21 22:29:03 joerg Exp $
+#	$NetBSD: Makefile.installimage,v 1.7 2020/05/28 15:12:03 jmcneill Exp $
 #
 # Common Makefile to create a bootable installation image for USB flash etc.
 #
@@ -36,6 +36,8 @@ SETS?=		modules base etc
 
 FSTAB_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/fstab.install.in
 
+USE_MBR?=	no
+
 .if ${USE_MBR} != "no"
 DISKPROTO_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.mbr.in
 .else



CVS commit: src/distrib/common

2020-04-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 14 12:14:59 UTC 2020

Modified Files:
src/distrib/common: zfsroot.rc

Log Message:
We solves the zpool SIGBUS issue by building a threaded libhack.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/common/zfsroot.rc

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/zfsroot.rc
diff -u src/distrib/common/zfsroot.rc:1.4 src/distrib/common/zfsroot.rc:1.5
--- src/distrib/common/zfsroot.rc:1.4	Tue Feb 25 20:05:10 2020
+++ src/distrib/common/zfsroot.rc	Tue Apr 14 12:14:59 2020
@@ -1,6 +1,6 @@
 #/bin/sh
 #
-#	$NetBSD: zfsroot.rc,v 1.4 2020/02/25 20:05:10 roy Exp $
+#	$NetBSD: zfsroot.rc,v 1.5 2020/04/14 12:14:59 roy Exp $
 
 # Assumption - boot.cfg loads this ramdisk.
 # Assumption - The needed kernel modules: solaris and zfs; are either on this
@@ -19,11 +19,6 @@ export HOME=/
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 umask 022
 
-# FIXME XXX Sometimes zpool import gets SIGBUS
-# Ensure that we are in a writable directory to try and capture a coredump
-# Not that we actually get a coredump 
-cd /tmp
-
 echo "Importing $rpool"
 /sbin/zpool import -f -N "$rpool"
 



CVS commit: src/distrib/common/bootimage

2020-03-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 21 14:19:27 UTC 2020

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage
Added Files:
src/distrib/common/bootimage: diskproto.mbrfat.in

Log Message:
Add "live-image with a FAT partition for bootstrap files" support.

See PR/55075 for more details.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r0 -r1.1 src/distrib/common/bootimage/diskproto.mbrfat.in

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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.23 src/distrib/common/bootimage/Makefile.bootimage:1.24
--- src/distrib/common/bootimage/Makefile.bootimage:1.23	Thu Nov 21 22:29:03 2019
+++ src/distrib/common/bootimage/Makefile.bootimage	Sat Mar 21 14:19:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.23 2019/11/21 22:29:03 joerg Exp $
+#	$NetBSD: Makefile.bootimage,v 1.24 2020/03/21 14:19:26 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -63,6 +63,9 @@
 #	EFIMB
 #		EFI partition size in target image in MB
 #		(default: 128)
+#	FATMB
+#		FAT partition size in target image in MB
+#		(default: 0)
 #	KERN_SET
 #		kernel set name which should be extracted into image
 #		(default: kern-GENERIC)
@@ -123,6 +126,15 @@
 #	EFIBOOT
 #		EFI bootloader
 #		(default: empty)
+#	MBRFAT
+#		MBR partition type value for FAT
+#		(default: 6 ("16-bit FAT, more than 32M"))
+#	FATMAKEFSOPTIONS
+#		options passed to makefs(8) to create a FAT partition
+#		(default: -o fat_type=16)
+#	FATFILES
+#		list of additional files to be copied into FAT partition
+#		(default: empty)
 #
 
 .include  		#
@@ -169,11 +181,13 @@ GPTSECTORS=	0
 EFIMB?=		128		# 128MB
 GPTSECTORS=	2048
 .endif
+FATMB?=		0
 
 # XXX: SWAPMB could be zero and expr(1) returns exit status 1 in that case
 IMAGESECTORS!=	expr ${IMAGEMB} \* 1024 \* 1024 / 512
 SWAPSECTORS!=	expr ${SWAPMB} \* 1024 \* 1024 / 512 || true
 EFISECTORS!=	expr ${EFIMB} \* 1024 \* 1024 / 512 || true
+FATSECTORS!=	expr ${FATMB} \* 1024 \* 1024 / 512 || true
 
 .if ${USE_MBR} == "no" && ${USE_GPT} == "no"
 LABELSECTORS?=	0
@@ -184,7 +198,7 @@ LABELSECTORS?=	2048	# 1MB aligned for mo
 .endif
 
 FSSECTORS!=	expr ${IMAGESECTORS} - ${SWAPSECTORS} - ${LABELSECTORS} \
-		- ${EFISECTORS} - ${GPTSECTORS}
+		- ${EFISECTORS} - ${GPTSECTORS} - ${FATSECTORS}
 FSSIZE!=	expr ${FSSECTORS} \* 512
 
 # parameters for disklabel and MBR
@@ -196,10 +210,14 @@ MBRHEADS=	255
 MBRSECTORS=	63
 MBRCYLINDERS!=	expr ${IMAGESECTORS} / \( ${MBRHEADS} \* ${MBRSECTORS} \)
 MBRNETBSD=	169
+MBRFAT?=	6	# 16-bit FAT, more than 32M
 
-BSDPARTSECTORS!= expr ${IMAGESECTORS} - ${LABELSECTORS} - ${EFISECTORS} - ${GPTSECTORS}
-FSOFFSET!=	expr ${LABELSECTORS} + ${EFISECTORS}
-SWAPOFFSET!=	expr ${LABELSECTORS} + ${FSSECTORS} + ${EFISECTORS}
+BSDPARTSECTORS!= expr ${IMAGESECTORS} - ${LABELSECTORS} \
+		- ${EFISECTORS} - ${GPTSECTORS} - ${FATSECTORS}
+FSOFFSET!=	expr ${LABELSECTORS} + ${EFISECTORS} + ${FATSECTORS}
+SWAPOFFSET!=	expr ${LABELSECTORS} + ${FSSECTORS} \
+		+ ${EFISECTORS} + ${FATSECTORS}
+FATOFFSET=	${LABELSECTORS}
 
 # parameters for sunlabel
 FSCYLINDERS!=	expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \)
@@ -227,6 +245,7 @@ FSTAB_IN?=	${DISTRIBDIR}/common/bootimag
 SPEC_IN?=	${DISTRIBDIR}/common/bootimage/spec.in
 
 IMGMAKEFSOPTIONS?=	-o bsize=16384,fsize=2048,density=8192
+FATMAKEFSOPTIONS?=	-o fat_type=16
 
 WORKDIR?=   work
 WORKSPEC?=  work.spec
@@ -267,6 +286,8 @@ WORKGPT?=	work.gpt
 WORKLABEL?=	work.diskproto
 WORKIMG?=	work.img
 EFIWORKDIR?=	work.efidir
+WORKFAT?=	work.fat
+WORKFATDIR?=	work.fatdir
 
 .if ${USE_GPT} != "no"
 ${WORKFSTAB}: ${WORKMBR}
@@ -388,6 +409,9 @@ TARGET_BLOCKS+=	${WORKMBRTRUNC}
 .if ${USE_GPT} != "no"
 TARGET_BLOCKS+=	${WORKEFI}
 .endif
+.if ${FATSECTORS} != 0
+TARGET_BLOCKS+=	${WORKFAT}
+.endif
 TARGET_BLOCKS+=	 ${TARGETFS}
 .if ${SWAPSECTORS} != 0
 TARGET_BLOCKS+=	${WORKSWAP}
@@ -398,6 +422,7 @@ TARGET_BLOCKS+=	${WORKGPT}
 
 CLEANFILES+=	${WORKMBR} ${WORKMBRTRUNC} ${WORKSWAP}
 CLEANFILES+=	${WORKEFI} ${WORKGPT}
+CLEANFILES+=	${WORKFAT}
 CLEANFILES+=	${WORKLABEL}.tmp ${WORKLABEL}
 CLEANFILES+=	${WORKIMG} ${IMGBASE}.img
 
@@ -423,6 +448,8 @@ ${WORKLABEL}:
 	-e "s/@@SWAPSECTORS@@/${SWAPSECTORS}/"			\
 	-e "s/@@SWAPOFFSET@@/${SWAPOFFSET}/"			\
 	-e "s/@@BSDPARTSECTORS@@/${BSDPARTSECTORS}/"		\
+	-e "s/@@FATSECTORS@@/${FATSECTORS}/"			\
+	-e "s/@@FATOFFSET@@/${FATOFFSET}/"\
 	< ${DISKPROTO_IN} > ${WORKLABEL}.tmp
 	mv ${WORKLABEL}.tmp ${WORKLABEL}
 
@@ -439,6 +466,26 @@ ${WORKEFI}: ${TARGETFS}
 	-t msdos -o F=32,c=1	\
 	${WORKEFI} ${EFIWORKDIR}
 
+${WORKFAT}: ${TARGETFS} ${FATFILES}
+	@echo create FAT partition for bootstrap files...
+	@${MKDIR} ${MKDIRPERM} ${WORKFATDIR}

CVS commit: src/distrib/common

2020-02-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Feb 25 20:05:10 UTC 2020

Modified Files:
src/distrib/common: zfsroot.rc

Log Message:
ramdisk-zfsroot: Remove the module loading magic

It's been determined that it's too magical and it's either the job
of the bootloader or you compile it into the kernel yourself.

This entry works in /boot.cfg:

menu=Boot ZFS Root:load solaris;load zfs;fs /ramdisk-zfsroot.fs;boot


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/zfsroot.rc

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/zfsroot.rc
diff -u src/distrib/common/zfsroot.rc:1.3 src/distrib/common/zfsroot.rc:1.4
--- src/distrib/common/zfsroot.rc:1.3	Sun Feb 23 10:51:12 2020
+++ src/distrib/common/zfsroot.rc	Tue Feb 25 20:05:10 2020
@@ -1,40 +1,24 @@
 #/bin/sh
 #
-#	$NetBSD: zfsroot.rc,v 1.3 2020/02/23 10:51:12 roy Exp $
+#	$NetBSD: zfsroot.rc,v 1.4 2020/02/25 20:05:10 roy Exp $
 
-echo "Starting root on ZFS boot strapper"
-
-# Abort on any error
-set -e
+# Assumption - boot.cfg loads this ramdisk.
+# Assumption - The needed kernel modules: solaris and zfs; are either on this
+#  ramdisk OR loaded by boot.cfg.
+#  Finding the correct dev node to mount to get them is too magic.
+#  NetBSD cannot build and distribute a kernel with ZFS builtin.
+# Assumption - the root pool is set to legacy mount.
 
 # Configurable - define the ZFS root pool and ROOT.
 # XXX Can these be set in boot.cfg?
-# Assumption - the root pool is set to legacy mount.
 rpool=rpool
 rroot=ROOT
 
-# Assumption - the boot device is named boot.
-# Could use /dev/dk0, /dev/wd0a, etc instead.
-# XXX Can be exposed by sysctl kern.boot_device?
-bootdev="NAME=boot"
-
 # Setup some stuff incase things go south and we drop to the shell
 export HOME=/
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 umask 022
 
-# Avoid having the solaris and zfs modules in ramdisk directly.
-# Means we don't need to update the ramdisk with the kernel modules
-# or load them from boot.cfg so it's less pain for the user.
-#bootdev="$(/sbin/sysctl -n kern.boot_device)"
-modpath="$(/sbin/sysctl -n kern.module.path)"
-echo "Loading needed kernel modules from $bootdev:$modpath"
-/sbin/mount -o ro "$bootdev" /mnt
-for m in solaris zfs; do
-	/sbin/modload "/mnt/$modpath/$m/$m.kmod"
-done
-/sbin/umount /mnt
-
 # FIXME XXX Sometimes zpool import gets SIGBUS
 # Ensure that we are in a writable directory to try and capture a coredump
 # Not that we actually get a coredump 
@@ -46,5 +30,4 @@ echo "Importing $rpool"
 echo "Mounting $rpool/$rroot to /altroot"
 /sbin/mount -t zfs "$rpool/$rroot" /altroot;
 
-echo "Pivoting to /altroot, welcome to root on ZFS"
 /sbin/sysctl -w init.root=/altroot



CVS commit: src/distrib/common

2020-02-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Feb 23 10:51:12 UTC 2020

Modified Files:
src/distrib/common: mtree.zfsroot zfsroot.rc

Log Message:
ramdisk-zfsroot: We no longer need to have /etc/zfs in mtree

Now that mountall doesn't rely on /etc/zfs/zpool.cache being present.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/mtree.zfsroot \
src/distrib/common/zfsroot.rc

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/mtree.zfsroot
diff -u src/distrib/common/mtree.zfsroot:1.2 src/distrib/common/mtree.zfsroot:1.3
--- src/distrib/common/mtree.zfsroot:1.2	Sun Feb 23 05:15:54 2020
+++ src/distrib/common/mtree.zfsroot	Sun Feb 23 10:51:12 2020
@@ -1,7 +1,5 @@
-#	$NetBSD: mtree.zfsroot,v 1.2 2020/02/23 05:15:54 roy Exp $
+#	$NetBSD: mtree.zfsroot,v 1.3 2020/02/23 10:51:12 roy Exp $
 
 .
 ./altroot
-./etc
-./etc/zfs
 ./rpool
Index: src/distrib/common/zfsroot.rc
diff -u src/distrib/common/zfsroot.rc:1.2 src/distrib/common/zfsroot.rc:1.3
--- src/distrib/common/zfsroot.rc:1.2	Sun Feb 23 05:15:54 2020
+++ src/distrib/common/zfsroot.rc	Sun Feb 23 10:51:12 2020
@@ -1,6 +1,6 @@
 #/bin/sh
 #
-#	$NetBSD: zfsroot.rc,v 1.2 2020/02/23 05:15:54 roy Exp $
+#	$NetBSD: zfsroot.rc,v 1.3 2020/02/23 10:51:12 roy Exp $
 
 echo "Starting root on ZFS boot strapper"
 
@@ -46,10 +46,5 @@ echo "Importing $rpool"
 echo "Mounting $rpool/$rroot to /altroot"
 /sbin/mount -t zfs "$rpool/$rroot" /altroot;
 
-# This ensures that rc.d/mountall mounts all ZFS mounts set to automount.
-if [ ! -e /altroot/etc/zfs/zpool.cache ]; then
-	echo >/altroot/etc/zfs/zpool.cache
-fi
-
 echo "Pivoting to /altroot, welcome to root on ZFS"
 /sbin/sysctl -w init.root=/altroot



CVS commit: src/distrib/common

2020-02-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Feb 23 05:15:54 UTC 2020

Modified Files:
src/distrib/common: list.zfsroot mtree.zfsroot zfsroot.rc

Log Message:
zfs: Allow modules to be loaded once in the ZFS chroot

Rather than copying the needed modules from FFS to the ramdisk,
load then directly from FFS instead.

This way, we can symlink ramdisk stand into /altroot and let nature take
it's course like loading firmware.

Set shell exit on error rather than using chained commands.
zpool import seems to SIGBUS randomly on amd64 and if we didn't do the
former then zpool would hang the init. Now at least we exit to the shell.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/list.zfsroot \
src/distrib/common/mtree.zfsroot src/distrib/common/zfsroot.rc

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/list.zfsroot
diff -u src/distrib/common/list.zfsroot:1.1 src/distrib/common/list.zfsroot:1.2
--- src/distrib/common/list.zfsroot:1.1	Sat Feb 22 09:53:47 2020
+++ src/distrib/common/list.zfsroot	Sun Feb 23 05:15:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: list.zfsroot,v 1.1 2020/02/22 09:53:47 roy Exp $
+#	$NetBSD: list.zfsroot,v 1.2 2020/02/23 05:15:54 roy Exp $
 #
 # list file (c.f. parselist.awk) for ZFS on root.
 #
@@ -12,6 +12,11 @@ ARGVLN	zfs mount_zfs
 # We need sysctl to set init.root=/altroot
 PROG	sbin/sysctl
 
+# We need modload as we cannot build CDDL modules in the kernel
+PROG	sbin/modload
+PROG	sbin/modunload
+PROG	sbin/modstat
+
 LIBS	-lnvpair
 LIBS	-luutil
 LIBS	-lzfs
@@ -25,5 +30,6 @@ LIBS	-lzfs_core
 
 COPY	${NETBSDSRCDIR}/distrib/common/zfsroot.rc etc/rc
 
-# Make firmware images available.
+# Make modules and firmware images available
+SYMLINK	altroot/stand stand
 SYMLINK	altroot/libdata libdata
Index: src/distrib/common/mtree.zfsroot
diff -u src/distrib/common/mtree.zfsroot:1.1 src/distrib/common/mtree.zfsroot:1.2
--- src/distrib/common/mtree.zfsroot:1.1	Sat Feb 22 09:53:47 2020
+++ src/distrib/common/mtree.zfsroot	Sun Feb 23 05:15:54 2020
@@ -1,8 +1,7 @@
-#	$NetBSD: mtree.zfsroot,v 1.1 2020/02/22 09:53:47 roy Exp $
+#	$NetBSD: mtree.zfsroot,v 1.2 2020/02/23 05:15:54 roy Exp $
 
 .
 ./altroot
 ./etc
 ./etc/zfs
 ./rpool
-./stand
Index: src/distrib/common/zfsroot.rc
diff -u src/distrib/common/zfsroot.rc:1.1 src/distrib/common/zfsroot.rc:1.2
--- src/distrib/common/zfsroot.rc:1.1	Sat Feb 22 09:53:47 2020
+++ src/distrib/common/zfsroot.rc	Sun Feb 23 05:15:54 2020
@@ -1,7 +1,11 @@
 #/bin/sh
 #
-#	$NetBSD: zfsroot.rc,v 1.1 2020/02/22 09:53:47 roy Exp $
-#	ZFS on Root boot strapper
+#	$NetBSD: zfsroot.rc,v 1.2 2020/02/23 05:15:54 roy Exp $
+
+echo "Starting root on ZFS boot strapper"
+
+# Abort on any error
+set -e
 
 # Configurable - define the ZFS root pool and ROOT.
 # XXX Can these be set in boot.cfg?
@@ -10,7 +14,7 @@ rpool=rpool
 rroot=ROOT
 
 # Assumption - the boot device is named boot.
-# Could use dk0, wd0a, etc instead.
+# Could use /dev/dk0, /dev/wd0a, etc instead.
 # XXX Can be exposed by sysctl kern.boot_device?
 bootdev="NAME=boot"
 
@@ -19,46 +23,33 @@ export HOME=/
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 umask 022
 
-echo
-echo "Starting ZFS on root boot strapper"
-
 # Avoid having the solaris and zfs modules in ramdisk directly.
 # Means we don't need to update the ramdisk with the kernel modules
 # or load them from boot.cfg so it's less pain for the user.
 #bootdev="$(/sbin/sysctl -n kern.boot_device)"
 modpath="$(/sbin/sysctl -n kern.module.path)"
-modmnt=/mnt
-echo "Copying needed kernel modules from $bootdev:$modpath"
-case "$bootdev" in
-*=*|"/"*)	;;
-*)		bootdev="/dev/$bootdev";;
-esac
-/sbin/mount -o ro "$bootdev" "$modmnt"
-/sbin/mount -t tmpfs none /stand
+echo "Loading needed kernel modules from $bootdev:$modpath"
+/sbin/mount -o ro "$bootdev" /mnt
 for m in solaris zfs; do
-	p="$modpath/$m"
-	if [ ! -e "$modmnt/$p/$m.kmod" ]; then
-		echo "$modmnt/$p/$m.kmod not found!" >&2
-		continue
-	fi
-	echo "	$m.kmod"
-	/bin/mkdir -p "$p"
-	/bin/cp "$modmnt/$p/$m.kmod" "$p"
+	/sbin/modload "/mnt/$modpath/$m/$m.kmod"
 done
-# zpool list will load the needed modules, then we can dispose of the mounts.
-/sbin/zpool list >/dev/null 2>&1
-/sbin/umount /stand
-/sbin/umount "$modmnt"
-echo
-
-echo "Importing $rpool, mounting and pivoting"
-# If we can mount the ZFS root partition to /altroot
-# then chroot to it and start /etc/rc
-if /sbin/zpool import -f -N "$rpool" && \
-   /sbin/mount -t zfs "$rpool/$rroot" /altroot; then
-	# This ensures that mountall mounts all ZFS mounts set to automount.
-	if [ ! -e /altroot/etc/zfs/zpool.cache ]; then
-		echo >/altroot/etc/zfs/zpool.cache
-	fi
-	/sbin/sysctl -w init.root=/altroot
+/sbin/umount /mnt
+
+# FIXME XXX Sometimes zpool import gets SIGBUS
+# Ensure that we are in a writable directory to try and capture a coredump
+# Not that we actually get a coredump 
+cd /tmp
+
+echo "Import

CVS commit: src/distrib/common

2019-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  6 07:33:09 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
- clean the .tmp kernel targets as well


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/common/Makefile.mdset

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.mdset
diff -u src/distrib/common/Makefile.mdset:1.42 src/distrib/common/Makefile.mdset:1.43
--- src/distrib/common/Makefile.mdset:1.42	Tue Jan 16 09:59:37 2018
+++ src/distrib/common/Makefile.mdset	Wed Feb  6 07:33:08 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.42 2018/01/16 09:59:37 maya Exp $
+#	$NetBSD: Makefile.mdset,v 1.43 2019/02/06 07:33:08 mrg Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -125,8 +125,7 @@ _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_P
 _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_POST}
 .endif
 
-
-CLEANFILES+=	${_KERNEL.${_K}.${_F}}
+CLEANFILES+=	${_KERNEL.${_K}.${_F}} ${_KERNEL.${_K}.${_F}}.tmp
 
 .if defined(MDSET_NOIMAGE.${_FILENAME})
 ${_I}=



CVS commit: src/distrib/common

2018-12-29 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Dec 29 13:09:35 UTC 2018

Modified Files:
src/distrib/common: cgdroot.rc

Log Message:
ROOT.a doesn't resolve to a useful partition, hardcode wd0a and ld0a for now.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/cgdroot.rc

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/cgdroot.rc
diff -u src/distrib/common/cgdroot.rc:1.3 src/distrib/common/cgdroot.rc:1.4
--- src/distrib/common/cgdroot.rc:1.3	Sat Dec 29 01:04:38 2018
+++ src/distrib/common/cgdroot.rc	Sat Dec 29 13:09:35 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: cgdroot.rc,v 1.3 2018/12/29 01:04:38 alnsn Exp $
+#	$NetBSD: cgdroot.rc,v 1.4 2018/12/29 13:09:35 alnsn Exp $
 #
 # Copyright (c) 2013 Pierre Pronchery 
 # All rights reserved.
@@ -37,7 +37,7 @@ export EDITOR
 umask 022
 
 mounted=
-for dev in NAME=cgd.conf ROOT.a ; do
+for dev in NAME=cgd.conf /dev/wd0a /dev/ld0a ; do
 	if mount -o ro $dev /etc/cgd 2>/dev/null ; then
 		mounted=$dev
 		break



CVS commit: src/distrib/common

2018-12-28 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Dec 29 01:04:39 UTC 2018

Modified Files:
src/distrib/common: cgdroot.rc

Log Message:
Break the loop after a successful mount.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/cgdroot.rc

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/cgdroot.rc
diff -u src/distrib/common/cgdroot.rc:1.2 src/distrib/common/cgdroot.rc:1.3
--- src/distrib/common/cgdroot.rc:1.2	Sat Dec 29 00:52:11 2018
+++ src/distrib/common/cgdroot.rc	Sat Dec 29 01:04:38 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: cgdroot.rc,v 1.2 2018/12/29 00:52:11 alnsn Exp $
+#	$NetBSD: cgdroot.rc,v 1.3 2018/12/29 01:04:38 alnsn Exp $
 #
 # Copyright (c) 2013 Pierre Pronchery 
 # All rights reserved.
@@ -40,6 +40,7 @@ mounted=
 for dev in NAME=cgd.conf ROOT.a ; do
 	if mount -o ro $dev /etc/cgd 2>/dev/null ; then
 		mounted=$dev
+		break
 	fi
 done
 if [ -z "$mounted" ]; then



CVS commit: src/distrib/common

2018-12-28 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Dec 29 00:52:11 UTC 2018

Modified Files:
src/distrib/common: cgdroot.rc

Log Message:
Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/cgdroot.rc

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/cgdroot.rc
diff -u src/distrib/common/cgdroot.rc:1.1 src/distrib/common/cgdroot.rc:1.2
--- src/distrib/common/cgdroot.rc:1.1	Mon Jul 15 00:25:38 2013
+++ src/distrib/common/cgdroot.rc	Sat Dec 29 00:52:11 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $
+#	$NetBSD: cgdroot.rc,v 1.2 2018/12/29 00:52:11 alnsn Exp $
 #
 # Copyright (c) 2013 Pierre Pronchery 
 # All rights reserved.
@@ -36,8 +36,13 @@ export EDITOR
 
 umask 022
 
-mount -o ro /dev/wd0a /etc/cgd
-if [ $? -ne 0 ]; then
+mounted=
+for dev in NAME=cgd.conf ROOT.a ; do
+	if mount -o ro $dev /etc/cgd 2>/dev/null ; then
+		mounted=$dev
+	fi
+done
+if [ -z "$mounted" ]; then
 	echo "Could not mount the boot partition" 1>&2
 	exit 2
 fi



CVS commit: src/distrib/common/bootimage

2018-10-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  7 18:07:00 UTC 2018

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

Log Message:
Support .tar.xz sets


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.17 src/distrib/common/bootimage/Makefile.bootimage:1.18
--- src/distrib/common/bootimage/Makefile.bootimage:1.17	Sat Feb 11 08:08:00 2017
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Oct  7 18:07:00 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.17 2017/02/11 08:08:00 pgoyette Exp $
+#	$NetBSD: Makefile.bootimage,v 1.18 2018/10/07 18:07:00 martin Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -217,6 +217,7 @@ WORKFSTAB?=	work.fstab
 WORKRCCONF?=	work.rc.conf
 WORKFS?=work.rootfs
 TARGETFS?=  imgroot.fs
+TAR_SUFF=	${"${USE_XZ_SETS:Uno}"!="no":?tar.xz:tgz}
 
 CLEANFILES+=	${WORKSPEC} ${WORKFSTAB} ${WORKRCCONF} ${WORKFS}
 CLEANFILES+=	${TARGETFS}
@@ -231,12 +232,12 @@ ${TARGETFS}: prepare_md_post
 	fi;
 	@${MKDIR} ${MKDIRPERM} ${WORKDIR}
 .for set in ${IMG_SETS}
-	@if [ ! -f ${SETS_DIR}/${set}.tgz ]; then 			\
-		echo "Missing ${SETS_DIR}/${set}.tgz, aborting";	\
+	@if [ ! -f ${SETS_DIR}/${set}.${TAR_SUFF} ]; then 		\
+		echo "Missing ${SETS_DIR}/${set}.${TAR_SUFF}, aborting";\
 		false; 			\
 	fi
-	@echo Extracting ${set}.tgz ...
-	@(cd ${WORKDIR}; ${TOOL_PAX} ${PAX_TIMESTAMP} -rnz -f ${SETS_DIR}/${set}.tgz .)
+	@echo Extracting ${set}.${TAR_SUFF} ...
+	@(cd ${WORKDIR}; ${TOOL_PAX} ${PAX_TIMESTAMP} -rnz -f ${SETS_DIR}/${set}.${TAR_SUFF} .)
 .endfor
 .if defined(SECONDARY_BOOT)
 	@echo Copying secondary boot...



CVS commit: src/distrib/common

2018-09-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep 28 15:03:34 UTC 2018

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Fix stupid typo (=+ instead of +=).
Remove hard coded debug sets removal, now that the configurable
variant works.
Prepare for .tar.xz sets.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/common/Makefile.bootcd

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.40 src/distrib/common/Makefile.bootcd:1.41
--- src/distrib/common/Makefile.bootcd:1.40	Mon Jun 25 12:18:22 2018
+++ src/distrib/common/Makefile.bootcd	Fri Sep 28 15:03:34 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.40 2018/06/25 12:18:22 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.41 2018/09/28 15:03:34 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -53,7 +53,10 @@ CDROMS_RELEASEDIR?=	images
 CDRELEASE_EXCLUDE=	-s ',./installation/cdrom.*,,gp'
 .endif
 .if defined(CDRELEASE_NODEBUG)
-CDRELEASE_EXCLUDE=+	-s ',./binary/sets/debug.tgz,,gp'	-s ',./binary/sets/xdebug.tgz,,gp'
+CDRELEASE_EXCLUDE+=	-s ',./binary/sets/debug.tgz,,gp'
+CDRELEASE_EXCLUDE+=	-s ',./binary/sets/xdebug.tgz,,gp'
+CDRELEASE_EXCLUDE+=	-s ',./binary/sets/debug.tar.xz,,gp'
+CDRELEASE_EXCLUDE+=	-s ',./binary/sets/xdebug.tar.xz,,gp'
 .endif
 .if !defined(CDRELEASE_LIVEIMAGE)
 CDRELEASE_EXCLUDE+=	-s ',./installation/liveimage.*,,gp'
@@ -189,8 +192,6 @@ copy-releasedir:
 		${TOOL_PAX} ${PAX_TIMESTAMP}\
 			-rw -pe ${PAX_v}\
 			${CDRELEASE_EXCLUDE}\
-			-s ',./binary/sets/debug.tgz,,gp'		\
-			-s ',./binary/sets/xdebug.tgz,,gp'		\
 			. $$release_destdir; \
 		cd "${CUROBJDIR}";	\
 	fi



CVS commit: src/distrib/common

2018-09-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Sep 16 21:49:18 UTC 2018

Modified Files:
src/distrib/common: buildfloppies.sh

Log Message:
Remove use of test ([) -o (and a couple of other trivial cleanups).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/distrib/common/buildfloppies.sh

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/buildfloppies.sh
diff -u src/distrib/common/buildfloppies.sh:1.18 src/distrib/common/buildfloppies.sh:1.19
--- src/distrib/common/buildfloppies.sh:1.18	Sat Feb 11 03:07:06 2017
+++ src/distrib/common/buildfloppies.sh	Sun Sep 16 21:49:18 2018
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: buildfloppies.sh,v 1.18 2017/02/11 03:07:06 christos Exp $
+# $NetBSD: buildfloppies.sh,v 1.19 2018/09/16 21:49:18 kre Exp $
 #
 # Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -58,12 +58,12 @@ _USAGE_
 
 plural()
 {
-	[ $1 -ne 1 ] && echo "s"
+	[ "$1" -ne 1 ] && echo "s"
 }
 
 roundup()
 {
-	echo $(( ( $1 + $2 - 1 ) / ( $2 ) ))
+	echo $(( ( ( $1 ) + ( $2 ) - 1 ) / ( $2 ) ))
 }
 
 
@@ -148,8 +148,10 @@ for file in $files; do
 	set -- $(ls -ln $file)
 	file_bytes=$5
 	pad_bytes=$(($(roundup $file_bytes 512) * 512 - $file_bytes))
-	[ "$file_bytes" != 0 -o "$file" = "${file#USTAR.volsize.}" ] &&
+	if [ "$file_bytes" != 0 ] || [ "$file" = "${file#USTAR.volsize.}" ]
+	then
 		msg="$msg $file $pad_bytes,"
+	fi
 	free_space=$(($free_space - 512 - $file_bytes - $pad_bytes))
 done
 echo "Free space in last tar block:$msg"



CVS commit: src/distrib/common

2018-09-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Sep 16 21:41:34 UTC 2018

Modified Files:
src/distrib/common: sunbootcd.sh

Log Message:
Remove test ([) -o usage, and make a couple of minor cleanups as well.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/common/sunbootcd.sh

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/sunbootcd.sh
diff -u src/distrib/common/sunbootcd.sh:1.6 src/distrib/common/sunbootcd.sh:1.7
--- src/distrib/common/sunbootcd.sh:1.6	Wed Feb 22 16:12:34 2012
+++ src/distrib/common/sunbootcd.sh	Sun Sep 16 21:41:34 2018
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: sunbootcd.sh,v 1.6 2012/02/22 16:12:34 martin Exp $
+# $NetBSD: sunbootcd.sh,v 1.7 2018/09/16 21:41:34 kre Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -59,11 +59,13 @@ _USAGE_
 	exit 1
 }
 
-if [ $# -lt 2 -o $# -gt 6 ]; then
-	usage
-fi
+case "$#" in
+([23456])	;;
+(*)		usage;;
+esac
 
-for curfile in $*; do
+for curfile
+do
 	[ "$curfile" = "-" ] && continue
 	if [ ! -f "$curfile" ]; then
 		echo 1>&2 "${PROGNAME}: ${curfile}: No such file."
@@ -81,7 +83,8 @@ printf "${FORMAT}" "fsimage:" 0 ${ISOCYL
 
 ENDCYL=${ISOCYLS}
 curpart=0
-for curfile in $*; do
+for curfile
+do
 	curpart=$(( ${curpart} + 1 ))
 	[ "$curfile" = "-" ] && continue
 



CVS commit: src/distrib/common

2018-06-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jun 25 12:18:22 UTC 2018

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Do not put debug.tgz and xdebug.tgz onto install CDs (a lot of them
grow out of bounds and for some architectures can not turn into DVDs).


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/distrib/common/Makefile.bootcd

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.39 src/distrib/common/Makefile.bootcd:1.40
--- src/distrib/common/Makefile.bootcd:1.39	Fri Sep  8 09:50:44 2017
+++ src/distrib/common/Makefile.bootcd	Mon Jun 25 12:18:22 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.39 2017/09/08 09:50:44 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.40 2018/06/25 12:18:22 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -189,6 +189,8 @@ copy-releasedir:
 		${TOOL_PAX} ${PAX_TIMESTAMP}\
 			-rw -pe ${PAX_v}\
 			${CDRELEASE_EXCLUDE}\
+			-s ',./binary/sets/debug.tgz,,gp'		\
+			-s ',./binary/sets/xdebug.tgz,,gp'		\
 			. $$release_destdir; \
 		cd "${CUROBJDIR}";	\
 	fi



CVS commit: src/distrib/common

2018-01-16 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jan 16 09:59:37 UTC 2018

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Make MDSET_NOGZIP behave as documented also if MDSET_SUFFIX is set

MDSET_NOGZIP is documented as intended to apply for all kernels, even if
MDSET_NOGZIP.filename is not set.

>From Harold Gutch in PR toolchain/52836


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

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.mdset
diff -u src/distrib/common/Makefile.mdset:1.41 src/distrib/common/Makefile.mdset:1.42
--- src/distrib/common/Makefile.mdset:1.41	Tue Sep 20 20:55:54 2016
+++ src/distrib/common/Makefile.mdset	Tue Jan 16 09:59:37 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.41 2016/09/20 20:55:54 christos Exp $
+#	$NetBSD: Makefile.mdset,v 1.42 2018/01/16 09:59:37 maya Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -102,7 +102,7 @@ ${_KERNEL.${_K}.${_F}}.${_S}: ${_KERNEL.
 	false
 .endif
 
-.if defined(MDSET_NOGZIP.${_FILENAME}) && defined(MDSET_NOGZIP)
+.if defined(MDSET_NOGZIP.${_FILENAME}) || defined(MDSET_NOGZIP)
 KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}
 .else			# {
 KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz



CVS commit: src/distrib/common

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 02:37:32 UTC 2017

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
there is no -f in install


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.bootcd

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.37 src/distrib/common/Makefile.bootcd:1.38
--- src/distrib/common/Makefile.bootcd:1.37	Fri Feb 10 22:07:06 2017
+++ src/distrib/common/Makefile.bootcd	Wed Feb 15 21:37:32 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.37 2017/02/11 03:07:06 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.38 2017/02/16 02:37:32 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -231,7 +231,7 @@ copy-releasedir:
 			release_destdir="${CUROBJDIR}/cdrom";		\
 			if [ -f $${cde} ]; then\
 echo Copying $${cde} to $$release_destdir ...;	\
-${INSTALL} ${COPY} -m 0644 -f $${cde} $${release_destdir};	\
+${INSTALL} ${COPY} -m 0644 $${cde} $${release_destdir};	\
 			elif [ -d $${cde} ]; then			\
 cd $${cde};\
 echo Copying $$(pwd) to $$release_destdir ...;	\



CVS commit: src/distrib/common/bootimage

2017-02-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Feb 11 08:08:00 UTC 2017

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

Log Message:
Remove leftover "-f" from when this used to be a cp command.

Unbreak the build for install-image target.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.16 src/distrib/common/bootimage/Makefile.bootimage:1.17
--- src/distrib/common/bootimage/Makefile.bootimage:1.16	Sat Feb 11 04:19:25 2017
+++ src/distrib/common/bootimage/Makefile.bootimage	Sat Feb 11 08:08:00 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.16 2017/02/11 04:19:25 christos Exp $
+#	$NetBSD: Makefile.bootimage,v 1.17 2017/02/11 08:08:00 pgoyette Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -240,7 +240,7 @@ ${TARGETFS}: prepare_md_post
 .endfor
 .if defined(SECONDARY_BOOT)
 	@echo Copying secondary boot...
-	${INSTALL} ${COPY} -m 0644 -f ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
+	${INSTALL} ${COPY} -m 0644 ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
 .endif
 	@echo Preparing /etc/fstab ...
 	${TOOL_SED} "s/@@BOOTDISK@@/${BOOTDISK}/" < ${FSTAB_IN} > ${WORKFSTAB}



CVS commit: src/distrib/common/bootimage

2017-02-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 11 04:19:25 UTC 2017

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

Log Message:
remove extra endif


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.15 src/distrib/common/bootimage/Makefile.bootimage:1.16
--- src/distrib/common/bootimage/Makefile.bootimage:1.15	Fri Feb 10 22:07:06 2017
+++ src/distrib/common/bootimage/Makefile.bootimage	Fri Feb 10 23:19:25 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.15 2017/02/11 03:07:06 christos Exp $
+#	$NetBSD: Makefile.bootimage,v 1.16 2017/02/11 04:19:25 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -131,7 +131,6 @@
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
 PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
 .endif
-.endif
 
 .if empty(IMGBASE)
 .BEGIN:



CVS commit: src/distrib/common/bootimage

2017-01-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 24 18:01:07 UTC 2017

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

Log Message:
use the same logic to compute the timestamp like the other files


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.12 src/distrib/common/bootimage/Makefile.bootimage:1.13
--- src/distrib/common/bootimage/Makefile.bootimage:1.12	Tue Nov 24 19:50:57 2015
+++ src/distrib/common/bootimage/Makefile.bootimage	Tue Jan 24 13:01:07 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.12 2015/11/25 00:50:57 christos Exp $
+#	$NetBSD: Makefile.bootimage,v 1.13 2017/01/24 18:01:07 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -127,8 +127,8 @@
 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
-.if ${MKREPRO:Uno} == "yes"
-TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
 .endif
 
 .if empty(IMGBASE)
@@ -296,7 +296,7 @@ ${TARGETFS}: prepare_md_post
 	${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE}			\
 	-B ${TARGET_ENDIANNESS}	\
 	-F ${WORKSPEC} -N ${WORKDIR}/etc\
-	${TIMESTAMP}		\
+	${MAKEFS_TIMESTAMP}		\
 	${IMGMAKEFSOPTIONS}		\
 	${WORKFS} ${WORKDIR}
 .if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"



CVS commit: src/distrib/common

2016-09-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 20 20:55:54 UTC 2016

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Add the ability to specify more sections to strip.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/common/Makefile.mdset

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.mdset
diff -u src/distrib/common/Makefile.mdset:1.40 src/distrib/common/Makefile.mdset:1.41
--- src/distrib/common/Makefile.mdset:1.40	Tue Aug  5 11:40:58 2014
+++ src/distrib/common/Makefile.mdset	Tue Sep 20 16:55:54 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.40 2014/08/05 15:40:58 apb Exp $
+#	$NetBSD: Makefile.mdset,v 1.41 2016/09/20 20:55:54 christos Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -153,7 +153,7 @@ ${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERN
 	${NM} ${.TARGET}.tmp | ${TOOL_GZIP_N} -9 > ${.TARGET}.symbols.gz
 .endif
 .if !defined(MDSET_NOSTRIP.${_FILENAME}) && !defined(MDSET_NOSTRIP)
-	${STRIP} -R .eh_frame -R .eh_frame_hdr -R .comment -R .ident ${.TARGET}.tmp
+	${STRIP} -R .eh_frame -R .eh_frame_hdr -R .comment -R .ident ${MDSET_STRIPSECTIONS} ${.TARGET}.tmp
 .endif
 	@mv ${.TARGET}.tmp ${.TARGET}
 .if defined(MDSET_POST.${_FILENAME}) || defined(MDSET_POST)



CVS commit: src/distrib/common

2016-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jun 19 08:44:34 UTC 2016

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Copy with -f.
On x68k, CDEXTRA has /usr/mdec/boot and its permission is 444.
So this copy was failed from second time.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/common/Makefile.bootcd

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.34 src/distrib/common/Makefile.bootcd:1.35
--- src/distrib/common/Makefile.bootcd:1.34	Sun Dec 20 22:42:04 2015
+++ src/distrib/common/Makefile.bootcd	Sun Jun 19 08:44:34 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.34 2015/12/20 22:42:04 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.35 2016/06/19 08:44:34 isaki Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -230,7 +230,7 @@ copy-releasedir:
 			release_destdir="${CUROBJDIR}/cdrom";		\
 			if [ -f $${cde} ]; then\
 echo Copying $${cde} to $$release_destdir ...;	\
-${CP} $${cde} $${release_destdir};	\
+${CP} -f $${cde} $${release_destdir};	\
 			elif [ -d $${cde} ]; then			\
 cd $${cde};\
 echo Copying $$(pwd) to $$release_destdir ...;	\



CVS commit: src/distrib/common

2016-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May 29 16:12:31 UTC 2016

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

Log Message:
Don't build PIE binaries for install media


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/common/Makefile.distrib

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.distrib
diff -u src/distrib/common/Makefile.distrib:1.11 src/distrib/common/Makefile.distrib:1.12
--- src/distrib/common/Makefile.distrib:1.11	Tue Jan 21 19:52:56 2014
+++ src/distrib/common/Makefile.distrib	Sun May 29 12:12:31 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.distrib,v 1.11 2014/01/22 00:52:56 christos Exp $
+#	$NetBSD: Makefile.distrib,v 1.12 2016/05/29 16:12:31 christos Exp $
 #
 # Makefile snippet to setup various make variables variables used in distrib/:
 #
@@ -17,6 +17,7 @@
 .if !defined(_MAKEFILE_DISTRIB_)
 _MAKEFILE_DISTRIB_=1
 
+NOPIE=
 .include 
 
 DISTRIBDIR=	${NETBSDSRCDIR}/distrib



CVS commit: src/distrib/common

2015-12-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 22:48:00 UTC 2015

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

Log Message:
Add MKREPRO_TIMESTAMP support to the makefs invocation.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/distrib/common/Makefile.image

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.38 src/distrib/common/Makefile.image:1.39
--- src/distrib/common/Makefile.image:1.38	Tue Aug 12 07:48:22 2014
+++ src/distrib/common/Makefile.image	Sun Dec 20 17:47:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.38 2014/08/12 11:48:22 martin Exp $
+#	$NetBSD: Makefile.image,v 1.39 2015/12/20 22:47:59 christos Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -41,6 +41,10 @@ PARSELISTENV+=	TARGETDIR=${.OBJDIR}/${WO
 
 GZIP_FLAGS= -9 ${GZIP_N_FLAG}
 
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+.endif
+
 .if !target(${WORKBUILT})	# {
 ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS}
 #	There is a .PHONY ${CRUNCHBIN}, so check if out of date by hand
@@ -93,7 +97,7 @@ ${IMAGE}: ${WORKBUILT}
 	${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
 	rm -f ${.TARGET} ${.TARGET}.tmp; \
 	${TOOL_MAKEFS} -t ffs -B ${IMAGEENDIAN} -s ${IMAGESIZE} -F ${WORKSPEC} \
-	-N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
+	${MAKEFS_TIMESTAMP} -N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
 	-o optimization=space,minfree=0 \
 	${MAKEFS_FLAGS} ${.TARGET}.tmp ${WORKDIR} \
 	&& mv -f ${.TARGET}.tmp ${.TARGET}; \



CVS commit: src/distrib/common

2015-12-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 22:42:04 UTC 2015

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Use MKREPRO_TIMESTAMP


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/common/Makefile.bootcd

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.33 src/distrib/common/Makefile.bootcd:1.34
--- src/distrib/common/Makefile.bootcd:1.33	Tue Nov 24 19:50:57 2015
+++ src/distrib/common/Makefile.bootcd	Sun Dec 20 17:42:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.33 2015/11/25 00:50:57 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.34 2015/12/20 22:42:04 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -74,8 +74,8 @@ _CDMAKEFSOPTIONS=	rockridge,label=${ISO_
 _CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
 .endif
 
-.if ${MKREPRO:Uno} == "yes"
-TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
 .endif
 
 .if ${MKUNPRIVED} == "no"
@@ -285,7 +285,7 @@ image:
 .endif
 	if [ -s ${WORKSPEC} ]; then specarg="-F ${WORKSPEC}"; fi;	\
 	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg} 	\
-		${TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
+		${MAKEFS_TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post



CVS commit: src/distrib/common

2015-11-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 25 00:50:57 UTC 2015

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

Log Message:
PR/50360: Thomas Klausner: if MKREPRO is set, provide a consistent timestamp
for the files in the cdroms to be built. For now we copy the timestamp of
. We could set an absolute timestamp too like -T 0 for the epoch.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.11 -r1.12 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.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.32 src/distrib/common/Makefile.bootcd:1.33
--- src/distrib/common/Makefile.bootcd:1.32	Fri May 29 02:28:50 2015
+++ src/distrib/common/Makefile.bootcd	Tue Nov 24 19:50:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.32 2015/05/29 06:28:50 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.33 2015/11/25 00:50:57 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -74,6 +74,10 @@ _CDMAKEFSOPTIONS=	rockridge,label=${ISO_
 _CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
 .endif
 
+.if ${MKREPRO:Uno} == "yes"
+TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
+.endif
+
 .if ${MKUNPRIVED} == "no"
 CD_METALOG.unpriv=
 mtunpriv=
@@ -281,7 +285,7 @@ image:
 .endif
 	if [ -s ${WORKSPEC} ]; then specarg="-F ${WORKSPEC}"; fi;	\
 	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg} 	\
-		${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
+		${TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.11 src/distrib/common/bootimage/Makefile.bootimage:1.12
--- src/distrib/common/bootimage/Makefile.bootimage:1.11	Fri May  8 13:46:03 2015
+++ src/distrib/common/bootimage/Makefile.bootimage	Tue Nov 24 19:50:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.11 2015/05/08 17:46:03 riastradh Exp $
+#	$NetBSD: Makefile.bootimage,v 1.12 2015/11/25 00:50:57 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -127,6 +127,10 @@
 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
+.if ${MKREPRO:Uno} == "yes"
+TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
+.endif
+
 .if empty(IMGBASE)
 .BEGIN:
 	@echo "Error: IMGBASE is not set"
@@ -292,6 +296,7 @@ ${TARGETFS}: prepare_md_post
 	${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE}			\
 	-B ${TARGET_ENDIANNESS}	\
 	-F ${WORKSPEC} -N ${WORKDIR}/etc\
+	${TIMESTAMP}		\
 	${IMGMAKEFSOPTIONS}		\
 	${WORKFS} ${WORKDIR}
 .if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"



CVS commit: src/distrib/common

2015-05-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 29 06:28:50 UTC 2015

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Put a full "init" /dev on the CD, not just "all". The install environment
relies on it currently. (XXX fix that and revert this)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/common/Makefile.bootcd

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.31 src/distrib/common/Makefile.bootcd:1.32
--- src/distrib/common/Makefile.bootcd:1.31	Wed May 27 15:17:59 2015
+++ src/distrib/common/Makefile.bootcd	Fri May 29 06:28:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.31 2015/05/27 15:17:59 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.32 2015/05/29 06:28:50 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -265,7 +265,7 @@ image:
 		 -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC};	\
 	fi
 	if [ -r cdrom/dev/MAKEDEV ]; then			\
-		${HOST_SH} cdrom/dev/MAKEDEV -s all |		\
+		${HOST_SH} cdrom/dev/MAKEDEV -s init |		\
 		${TOOL_SED} -e '/^\. type=dir/d' 		\
 			-e 's,^\.,./dev,' >> ${WORKSPEC};	\
 	fi



CVS commit: src/distrib/common

2015-05-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 27 15:17:59 UTC 2015

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Deal with WORKSPECFILE not existing for many cd images


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/common/Makefile.bootcd

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.30 src/distrib/common/Makefile.bootcd:1.31
--- src/distrib/common/Makefile.bootcd:1.30	Wed May 27 09:44:40 2015
+++ src/distrib/common/Makefile.bootcd	Wed May 27 15:17:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.30 2015/05/27 09:44:40 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.31 2015/05/27 15:17:59 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -76,7 +76,7 @@ _CDMAKEFSOPTIONS=	rockridge,label=${ISO_
 
 .if ${MKUNPRIVED} == "no"
 CD_METALOG.unpriv=
-mtunpriv=""
+mtunpriv=
 .else
 CD_METALOG.unpriv=-M ${METALOG}.sanitised
 mtunpriv="-U"
@@ -95,7 +95,6 @@ CDIMAGE=	${CDBASE}.iso
 CDIMAGE=	NetBSD-${DISTRIBVER}-${CDBASE:S/cd$//}.iso
 .endif
 WORKSPEC=	fs.spec
-CDMAKEFSEXTRAOPTS+=-F ${WORKSPEC}
 
 CLEANFILES+=	${CDIMAGE}
 CLEANFILES+=	bootxx.${MACHINE}
@@ -260,11 +259,16 @@ copy-releasedir:
 image:
 	@echo Preparing spec files for makefs...
 	${RM} -f ${WORKSPEC}
-	cat cdrom/etc/mtree/* |	\
-	${TOOL_SED} -e 's/ size=[0-9]*//'\
-	 -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC}
-	${HOST_SH} cdrom/dev/MAKEDEV -s all |			\
-	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' >> ${WORKSPEC}
+	if [ -d cdrom/etc/mtree ]; then\
+		cat cdrom/etc/mtree/* |\
+		${TOOL_SED} -e 's/ size=[0-9]*//'		\
+		 -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC};	\
+	fi
+	if [ -r cdrom/dev/MAKEDEV ]; then			\
+		${HOST_SH} cdrom/dev/MAKEDEV -s all |		\
+		${TOOL_SED} -e '/^\. type=dir/d' 		\
+			-e 's,^\.,./dev,' >> ${WORKSPEC};	\
+	fi
 .if defined(SPEC_IN)
 	cat ${SPEC_IN} >> ${WORKSPEC}
 .endif
@@ -275,7 +279,9 @@ image:
 .if defined(SPEC_EXTRA)
 	cat ${SPEC_EXTRA} >> ${WORKSPEC}
 .endif
-	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
+	if [ -s ${WORKSPEC} ]; then specarg="-F ${WORKSPEC}"; fi;	\
+	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg} 	\
+		${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post



CVS commit: src/distrib/common

2015-05-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 27 09:27:40 UTC 2015

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Pass -U to maketars if we are not building as root.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/distrib/common/Makefile.bootcd

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.28 src/distrib/common/Makefile.bootcd:1.29
--- src/distrib/common/Makefile.bootcd:1.28	Mon May 25 15:38:33 2015
+++ src/distrib/common/Makefile.bootcd	Wed May 27 09:27:40 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.28 2015/05/25 15:38:33 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.29 2015/05/27 09:27:40 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -78,8 +78,10 @@ _CDMAKEFSOPTIONS=	rockridge,label=${ISO_
 
 .if ${MKUNPRIVED} == "no"
 CD_METALOG.unpriv=
+mtunpriv=""
 .else
 CD_METALOG.unpriv=-M ${METALOG}.sanitised
+mtunpriv="-U"
 .endif
 
 # Stuff that should come from elsewhere - XXX where? - HF
@@ -248,7 +250,7 @@ copy-releasedir:
 		${CHMOD} +w ${CUROBJDIR:Q}/cdrom/etc/mtree/set.${set};	\
 	fi;\
 	${CDSETSCMD} ./maketars -i "${CUROBJDIR}/cdrom"			\
-	${CD_METALOG.unpriv} -N ${NETBSDSRCDIR}/etc			\
+	${CD_METALOG.unpriv} ${mtunpriv} -N ${NETBSDSRCDIR}/etc	\
 	-F "${CUROBJDIR}/cdrom/etc/mtree"\
 	-d "${DESTDIR:S,^$,/,}" ${set}
 .endfor



CVS commit: src/distrib/common/bootimage

2015-05-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri May  8 17:46:03 UTC 2015

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

Log Message:
Fix ytpo: INSTALLBOOTOPTIONS, not INSTALLBOOTOPTOINS.

>From qjsgkem on Freenode.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.10 src/distrib/common/bootimage/Makefile.bootimage:1.11
--- src/distrib/common/bootimage/Makefile.bootimage:1.10	Thu Mar 12 04:41:23 2015
+++ src/distrib/common/bootimage/Makefile.bootimage	Fri May  8 17:46:03 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.10 2015/03/12 04:41:23 snj Exp $
+#	$NetBSD: Makefile.bootimage,v 1.11 2015/05/08 17:46:03 riastradh Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -381,7 +381,7 @@ ${IMGBASE}.img:	${TARGETFS} ${WORKLABEL}
 .endif
 	${TOOL_DISKLABEL} -R -F ${WORKIMG} ${WORKLABEL}
 .if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} != "no"
-	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${INSTALLBOOTOPTOINS} ${WORKIMG} \
+	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${INSTALLBOOTOPTIONS} ${WORKIMG} \
 	${WORKDIR}/usr/mdec/${PRIMARY_BOOT}
 .endif
 	mv ${WORKIMG} ${.TARGET}



CVS commit: src/distrib/common/bootimage

2015-03-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Mar 12 04:41:23 UTC 2015

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

Log Message:
unbreak amd64 install images by passing ipty to MAKEDEV.  revision 1.21
of etc/etc.amd64/MAKEDEV.conf removed them from 'all'.  (hi christos!)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.9 src/distrib/common/bootimage/Makefile.bootimage:1.10
--- src/distrib/common/bootimage/Makefile.bootimage:1.9	Tue Aug  5 15:40:58 2014
+++ src/distrib/common/bootimage/Makefile.bootimage	Thu Mar 12 04:41:23 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.9 2014/08/05 15:40:58 apb Exp $
+#	$NetBSD: Makefile.bootimage,v 1.10 2015/03/12 04:41:23 snj Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -276,7 +276,7 @@ ${TARGETFS}: prepare_md_post
 	${RM} -f ${WORKSPEC}
 	cat ${WORKDIR}/etc/mtree/* |	\
 	${TOOL_SED} -e 's/ size=[0-9]*//' > ${WORKSPEC}
-	${HOST_SH} ${WORKDIR}/dev/MAKEDEV -s all |			\
+	${HOST_SH} ${WORKDIR}/dev/MAKEDEV -s all ipty |			\
 	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' >> ${WORKSPEC}
 	cat ${SPEC_IN} >> ${WORKSPEC}
 .if defined(SECONDARY_BOOT)



CVS commit: src/distrib/common

2014-09-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Fri Sep 12 14:39:49 UTC 2014

Modified Files:
src/distrib/common: list.inet6

Log Message:
Remove rtsol.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/list.inet6

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/list.inet6
diff -u src/distrib/common/list.inet6:1.1 src/distrib/common/list.inet6:1.2
--- src/distrib/common/list.inet6:1.1	Sun Sep 20 22:50:50 2009
+++ src/distrib/common/list.inet6	Fri Sep 12 14:39:49 2014
@@ -1,6 +1,5 @@
-#	$NetBSD: list.inet6,v 1.1 2009/09/20 22:50:50 abs Exp $
+#	$NetBSD: list.inet6,v 1.2 2014/09/12 14:39:49 nonaka Exp $
 
 PROG	sbin/ping6
-PROG	sbin/rtsol
 
 SPECIAL	ping6		srcdir	distrib/utils/x_ping6



CVS commit: src/distrib/common

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 11:48:22 UTC 2014

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

Log Message:
Add a IMAGEPREBUILD option for makefiles to ovveride (e.g. to additionally
add files to the staging directory)


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.image

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.37 src/distrib/common/Makefile.image:1.38
--- src/distrib/common/Makefile.image:1.37	Wed Aug  6 11:41:18 2014
+++ src/distrib/common/Makefile.image	Tue Aug 12 11:48:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.37 2014/08/06 11:41:18 apb Exp $
+#	$NetBSD: Makefile.image,v 1.38 2014/08/12 11:48:22 martin Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -13,6 +13,7 @@
 #
 # Optional variables:
 #	IMAGE		name of target image
+#	IMAGEPREBUILD	additional operations to run pre image creation
 #	IMAGEPOSTBUILD	operation to run on ${IMAGE} ${.TARGET} after its built
 #			(if this returns non zero, ${.TARGET} is removed)
 #	CRUNCHBIN	name of crunchgen(1)ed binary
@@ -85,6 +86,9 @@ CLEANFILES+=	${WORKSPEC} ${WORKSPEC}.tmp
 .if defined(IMAGE)		# {
 IMGMAKEFSOPTIONS?= -o bsize=4096,fsize=512
 ${IMAGE}: ${WORKBUILT}
+.if defined(IMAGEPREBUILD)
+	${IMAGEPREBUILD}
+.endif
 	[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ]  || { \
 	${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
 	rm -f ${.TARGET} ${.TARGET}.tmp; \



CVS commit: src/distrib/common

2014-08-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Aug  6 10:41:13 UTC 2014

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

Log Message:
Introduce and use GZIP_FLAGS variable.

The previous use of GZIP="-9 ${GZIP_N_FLAG}" happened to work, but
the new use of GZIP=${GZIP_FLAGS:Q} is safer.

For consistency, also use GZIP_FLAGS elesehere in this file.


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

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.35 src/distrib/common/Makefile.image:1.36
--- src/distrib/common/Makefile.image:1.35	Tue Aug  5 15:43:50 2014
+++ src/distrib/common/Makefile.image	Wed Aug  6 10:41:13 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.35 2014/08/05 15:43:50 apb Exp $
+#	$NetBSD: Makefile.image,v 1.36 2014/08/06 10:41:13 apb Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -38,6 +38,7 @@ WORKBUILT?=	work.built
 
 PARSELISTENV+=	TARGETDIR=${.OBJDIR}/${WORKDIR:Q}
 
+GZIP_FLAGS= -9 ${GZIP_N_FLAG}
 
 .if !target(${WORKBUILT})	# {
 ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS}
@@ -103,7 +104,7 @@ fsimage: ${IMAGE}
 ${IMAGE}.gz: ${IMAGE}
 	${_MKTARGET_CREATE}
 	-rm -f ${.TARGET}
-	${TOOL_GZIP_N} -9c ${.ALLSRC} > ${.TARGET}
+	${TOOL_GZIP} ${GZIP_FLAGS} -c ${.ALLSRC} > ${.TARGET}
 
 realall: ${IMAGE}
 
@@ -121,7 +122,7 @@ CLEANFILES+=	${IMAGE} ${IMAGE}.gz ${IMAG
 ${IMAGETAR}: ${WORKBUILT} ${WORKSPEC} ${IMAGEDEPENDS}
 	${_MKTARGET_CREATE}
 	( cd ${WORKDIR}; \
-	  GZIP="-9 ${GZIP_N_FLAG}" \
+	  GZIP=${GZIP_FLAGS:Q} \
 	  ${TOOL_PAX} -ON ${NETBSDSRCDIR}/etc -wdzM <${.OBJDIR}/${WORKSPEC} \
 	) > ${.TARGET}.tmp \
 	&& mv ${.TARGET}.tmp ${.TARGET}



CVS commit: src/distrib/common

2014-05-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May 31 10:18:47 UTC 2014

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Add a variable CDMAKEFSEXTRAOPTS to provide additional parameters to the
makefs invocation that do not belong in the image option list (CDMAKEFSOPTIONS)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/common/Makefile.bootcd

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.24 src/distrib/common/Makefile.bootcd:1.25
--- src/distrib/common/Makefile.bootcd:1.24	Sat Feb 15 09:43:02 2014
+++ src/distrib/common/Makefile.bootcd	Sat May 31 10:18:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.24 2014/02/15 09:43:02 dsl Exp $
+#	$NetBSD: Makefile.bootcd,v 1.25 2014/05/31 10:18:47 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -25,6 +25,7 @@
 #	BOOTXX_CD9660	Defaults to $DESTDIR/usr/mdec/bootxx_cd9660
 #	CDBOOTOPTIONS	Options for installboot, eg -o console=com0,speed=9600
 #	CDMAKEFSOPTIONS	Options for makefs, eg bootimage=i386;bootxx,no-emul-boot
+#	CDMAKEFSEXTRAOPTS additional options for makefs, e.g. -F specfile
 #	CDROMS_RELEASEDIR Where to install ${CDBASE}.iso
 #	CDINSTKERNEL	instkernel directory (relative to ${.CURDIR})
 #	CDKERNELS	couples of the form:
@@ -206,7 +207,7 @@ copy-releasedir:
 	fi
 
 image:
-	${TOOL_MAKEFS} -t cd9660 -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
+	${TOOL_MAKEFS} -t cd9660 ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post



CVS commit: src/distrib/common

2014-02-15 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Feb 15 09:43:02 UTC 2014

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
If MAKEVERBOSE < 2 remove the -v from pax command lines.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/common/Makefile.bootcd

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.23 src/distrib/common/Makefile.bootcd:1.24
--- src/distrib/common/Makefile.bootcd:1.23	Thu Jan 16 01:15:32 2014
+++ src/distrib/common/Makefile.bootcd	Sat Feb 15 09:43:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.23 2014/01/16 01:15:32 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.24 2014/02/15 09:43:02 dsl Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -116,6 +116,12 @@ prepare:
 .endif
 .endif
 
+.if ${MAKEVERBOSE} >= 2
+PAX_v?= -v
+.else
+PAX_v?=
+.endif
+
 # Copy $RELEASEDIR/${MACHINE} in the CDROM dir
 #
 # XXX This could be done a lot easier if makefs(8) could
@@ -134,7 +140,7 @@ copy-releasedir:
 		cd ${RELEASEDIR}/${RELEASEMACHINEDIR}; 			\
 		echo Copying $$(pwd) to $$release_destdir ...; 		\
 		${TOOL_PAX} 		\
-			-rw -pe -v 	\
+			-rw -pe ${PAX_v}\
 			${CDRELEASE_EXCLUDE}\
 			. $$release_destdir; \
 		cd $$curdir;		\
@@ -150,7 +156,7 @@ copy-releasedir:
 		cd ${RELEASEDIR}/source; \
 		echo Copying $$(pwd) to $$release_destdir ...;		\
 		${TOOL_PAX} 		\
-			-rw -pe -v 	\
+			-rw -pe ${PAX_v}\
 			. $$release_destdir; \
 		cd $$curdir;		\
 	fi
@@ -161,7 +167,7 @@ copy-releasedir:
 		cd ${DESTDIR};		\
 		for cde in ${CDRUNTIME};\
 		do			\
-			${TOOL_PAX} -rw -pp -v $${cde} $$release_destdir;\
+			${TOOL_PAX} -rw -pp ${PAX_v} $${cde} $$release_destdir;\
 		done;			\
 		cd $$curdir;		\
 	fi
@@ -189,7 +195,7 @@ copy-releasedir:
 cd $${cde};\
 echo Copying $$(pwd) to $$release_destdir ...;	\
 ${TOOL_MTREE} -c $${skipflag} |		\
-	${TOOL_PAX} -rw -pe -v -M	\
+	${TOOL_PAX} -rw -pe ${PAX_v} -M	\
 	$$release_destdir; 		\
 			else		\
 echo "Missing $${cde}, aborting"; 	\



CVS commit: src/distrib/common

2014-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  1 21:05:54 UTC 2014

Modified Files:
src/distrib/common: Makefile.crunch

Log Message:
Pass DBG to crunchgen so it can get into the created mk file.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/common/Makefile.crunch

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.crunch
diff -u src/distrib/common/Makefile.crunch:1.24 src/distrib/common/Makefile.crunch:1.25
--- src/distrib/common/Makefile.crunch:1.24	Sun Oct 19 22:05:19 2008
+++ src/distrib/common/Makefile.crunch	Sat Feb  1 21:05:54 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.crunch,v 1.24 2008/10/19 22:05:19 apb Exp $
+#	$NetBSD: Makefile.crunch,v 1.25 2014/02/01 21:05:54 matt Exp $
 #
 # Makefile snippet to build a crunchgen(1)ed binary from the provided lists
 #
@@ -52,7 +52,7 @@ ${CRUNCHBIN}.cache: ${CRUNCHBIN}.mk
 CRUNCHGEN != command -v ${TOOL_CRUNCHGEN:[-1]} || echo
 
 ${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf  ${CRUNCHGEN}
-	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} \
+	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} -d ${DBG:Q} \
 	-L ${DESTDIR}/usr/lib -q ${CRUNCHGEN_FLAGS} ${CRUNCHBIN}.conf
 
 ${CRUNCHBIN}.conf: ${LISTS} ${PARSELISTDEP}



CVS commit: src/distrib/common

2014-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 22 00:52:56 UTC 2014

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

Log Message:
don't include bsd.files.mk here, it is intended as a fragment


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/common/Makefile.distrib

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.distrib
diff -u src/distrib/common/Makefile.distrib:1.10 src/distrib/common/Makefile.distrib:1.11
--- src/distrib/common/Makefile.distrib:1.10	Wed Jan 15 20:15:32 2014
+++ src/distrib/common/Makefile.distrib	Tue Jan 21 19:52:56 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.distrib,v 1.10 2014/01/16 01:15:32 christos Exp $
+#	$NetBSD: Makefile.distrib,v 1.11 2014/01/22 00:52:56 christos Exp $
 #
 # Makefile snippet to setup various make variables variables used in distrib/:
 #
@@ -29,7 +29,4 @@ DISTRIBVERDEP=	${NETBSDSRCDIR}/sys/sys/p
 MAKESUMS=	MAKE=${MAKE:Q} CKSUM=${TOOL_CKSUM:Q} ${HOST_SH} ${DISTRIBDIR}/sets/makesums
 RELEASE_INSTALL=${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE}
 
-.include 
-
-
 .endif	# _MAKEFILE_DISTRIB_



CVS commit: src/distrib/common

2013-08-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Aug 15 12:39:28 UTC 2013

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Save space and strip .eh_frame sections for the ramdisks as well.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.mdset

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.mdset
diff -u src/distrib/common/Makefile.mdset:1.37 src/distrib/common/Makefile.mdset:1.38
--- src/distrib/common/Makefile.mdset:1.37	Wed Jan 30 13:47:36 2013
+++ src/distrib/common/Makefile.mdset	Thu Aug 15 12:39:28 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.37 2013/01/30 13:47:36 he Exp $
+#	$NetBSD: Makefile.mdset,v 1.38 2013/08/15 12:39:28 joerg Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -153,7 +153,7 @@ ${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERN
 	${NM} ${.TARGET}.tmp | gzip -9n > ${.TARGET}.symbols.gz
 .endif
 .if !defined(MDSET_NOSTRIP.${_FILENAME}) && !defined(MDSET_NOSTRIP)
-	${STRIP} -R .comment -R .ident ${.TARGET}.tmp
+	${STRIP} -R .eh_frame -R .eh_frame_hdr -R .comment -R .ident ${.TARGET}.tmp
 .endif
 	@mv ${.TARGET}.tmp ${.TARGET}
 .if defined(MDSET_POST.${_FILENAME}) || defined(MDSET_POST)



CVS commit: src/distrib/common

2013-07-14 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon Jul 15 00:25:38 UTC 2013

Added Files:
src/distrib/common: cgdroot.rc list.cgdroot mtree.cgdroot

Log Message:
Common definitions for full-disk encryption support, including the rc script 
responsible for asking the passphrase and chrooting. wsconsctl is also built 
and used in case a splash screen is enabled.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/common/cgdroot.rc \
src/distrib/common/list.cgdroot src/distrib/common/mtree.cgdroot

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/distrib/common/cgdroot.rc
diff -u /dev/null src/distrib/common/cgdroot.rc:1.1
--- /dev/null	Mon Jul 15 00:25:38 2013
+++ src/distrib/common/cgdroot.rc	Mon Jul 15 00:25:38 2013
@@ -0,0 +1,60 @@
+#	$NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $
+#
+# Copyright (c) 2013 Pierre Pronchery 
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+export PATH
+TERM=wsvt25
+export TERM
+HOME=/
+export HOME
+BLOCKSIZE=1k
+export BLOCKSIZE
+EDITOR=ed
+export EDITOR
+
+umask 022
+
+mount -o ro /dev/wd0a /etc/cgd
+if [ $? -ne 0 ]; then
+	echo "Could not mount the boot partition" 1>&2
+	exit 2
+fi
+/sbin/wsconsctl -d -w splash.enable=0 > /dev/null 2>&1
+cgdconfig -C
+if [ $? -ne 0 ]; then
+	echo "Could not decrypt the encrypted volume" 1>&2
+	umount /etc/cgd
+	exit 2
+fi
+mount -o ro /dev/cgd0a /altroot
+if [ $? -ne 0 ]; then
+	echo "Could not mount the root partition" 1>&2
+	cgdconfig -U
+	umount /etc/cgd
+	exit 2
+fi
+umount /etc/cgd
+/sbin/wsconsctl -d -w splash.enable=1 > /dev/null 2>&1
+sysctl -w init.root=/altroot
Index: src/distrib/common/list.cgdroot
diff -u /dev/null src/distrib/common/list.cgdroot:1.1
--- /dev/null	Mon Jul 15 00:25:38 2013
+++ src/distrib/common/list.cgdroot	Mon Jul 15 00:25:38 2013
@@ -0,0 +1,10 @@
+#	$NetBSD: list.cgdroot,v 1.1 2013/07/15 00:25:38 khorben Exp $
+#
+# list file (c.f. parselist.awk) for cgd full-disk encryption.
+#
+
+PROG	sbin/cgdconfig
+PROG	sbin/wsconsctl
+LIBS	-lcrypto
+
+COPY	${NETBSDSRCDIR}/distrib/common/cgdroot.rc etc/rc
Index: src/distrib/common/mtree.cgdroot
diff -u /dev/null src/distrib/common/mtree.cgdroot:1.1
--- /dev/null	Mon Jul 15 00:25:38 2013
+++ src/distrib/common/mtree.cgdroot	Mon Jul 15 00:25:38 2013
@@ -0,0 +1,8 @@
+#	$NetBSD: mtree.cgdroot,v 1.1 2013/07/15 00:25:38 khorben Exp $
+
+/settype=dir uname=root gname=wheel mode=0755
+
+.
+./altroot
+./etc
+./etc/cgd			mode=0700



CVS commit: src/distrib/common

2013-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 24 21:34:19 UTC 2013

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

Log Message:
Add IMGMAKEFSOPTIONS like in the bootimage Makefile


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/common/Makefile.image

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.31 src/distrib/common/Makefile.image:1.32
--- src/distrib/common/Makefile.image:1.31	Fri Apr  3 18:36:35 2009
+++ src/distrib/common/Makefile.image	Fri May 24 17:34:19 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.31 2009/04/03 22:36:35 perry Exp $
+#	$NetBSD: Makefile.image,v 1.32 2013/05/24 21:34:19 christos Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -82,12 +82,13 @@ CLEANFILES+=	${WORKSPEC} ${WORKSPEC}.tmp
 .endif	# ! target (${WORKSPEC})# }
 
 .if defined(IMAGE)		# {
+IMGMAKEFSOPTIONS?= -o bsize=4096,fsize=512
 ${IMAGE}: ${WORKBUILT}
 	[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ]  || { \
 	${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
 	rm -f ${.TARGET} ${.TARGET}.tmp; \
 	${TOOL_MAKEFS} -t ffs -B ${IMAGEENDIAN} -s ${IMAGESIZE} -F ${WORKSPEC} \
-	-N ${NETBSDSRCDIR}/etc -o bsize=4096,fsize=512 \
+	-N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
 	-o optimization=space,minfree=0 \
 	${MAKEFS_FLAGS} ${.TARGET}.tmp ${WORKDIR} \
 	&& mv -f ${.TARGET}.tmp ${.TARGET}; \



CVS commit: src/distrib/common

2013-01-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 29 19:48:41 UTC 2013

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
revert previous, it was an unintended side effect. fixed in makefs


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/common/Makefile.bootcd

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.21 src/distrib/common/Makefile.bootcd:1.22
--- src/distrib/common/Makefile.bootcd:1.21	Tue Jan 29 13:17:29 2013
+++ src/distrib/common/Makefile.bootcd	Tue Jan 29 14:48:41 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.21 2013/01/29 18:17:29 he Exp $
+#	$NetBSD: Makefile.bootcd,v 1.22 2013/01/29 19:48:41 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -64,9 +64,9 @@ DISTRIBREV!=	${HOST_SH} ${KERNSRCDIR}/co
 ISO_VOLID!=	echo NETBSD_${DISTRIBREV} | tr a-z A-Z
 PUBLISHER?= The_NetBSD_Project
 .if defined(CDMAKEFSOPTIONS)
-_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
+_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
 .else
-_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER}
+_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
 .endif
 
 # Stuff that should come from elsewhere - XXX where? - HF



CVS commit: src/distrib/common

2013-01-29 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Tue Jan 29 18:17:29 UTC 2013

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
The rockridge option of makefs now requires a =1, follow suit.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/common/Makefile.bootcd

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.20 src/distrib/common/Makefile.bootcd:1.21
--- src/distrib/common/Makefile.bootcd:1.20	Fri Aug 17 16:57:59 2012
+++ src/distrib/common/Makefile.bootcd	Tue Jan 29 18:17:29 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.20 2012/08/17 16:57:59 riz Exp $
+#	$NetBSD: Makefile.bootcd,v 1.21 2013/01/29 18:17:29 he Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -64,9 +64,9 @@ DISTRIBREV!=	${HOST_SH} ${KERNSRCDIR}/co
 ISO_VOLID!=	echo NETBSD_${DISTRIBREV} | tr a-z A-Z
 PUBLISHER?= The_NetBSD_Project
 .if defined(CDMAKEFSOPTIONS)
-_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
+_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFSOPTIONS}
 .else
-_CDMAKEFSOPTIONS=	rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
+_CDMAKEFSOPTIONS=	rockridge=1,label=${ISO_VOLID},publisher=${PUBLISHER}
 .endif
 
 # Stuff that should come from elsewhere - XXX where? - HF



CVS commit: src/distrib/common/bootimage

2012-11-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Nov 20 20:16:04 UTC 2012

Modified Files:
src/distrib/common/bootimage: fstab.in fstab.install.in

Log Message:
Don't enable WAPBL in images.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/bootimage/fstab.in \
src/distrib/common/bootimage/fstab.install.in

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/bootimage/fstab.in
diff -u src/distrib/common/bootimage/fstab.in:1.1 src/distrib/common/bootimage/fstab.in:1.2
--- src/distrib/common/bootimage/fstab.in:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/fstab.in	Tue Nov 20 20:16:03 2012
@@ -1,4 +1,4 @@
-/dev/@@BOOTDISK@@a	/		ffs	rw,log		1 1
+/dev/@@BOOTDISK@@a	/		ffs	rw		1 1
 /dev/@@BOOTDISK@@b	none		none	sw		0 0
 ptyfs		/dev/pts	ptyfs	rw		0 0
 kernfs		/kern		kernfs	rw,noauto	0 0
Index: src/distrib/common/bootimage/fstab.install.in
diff -u src/distrib/common/bootimage/fstab.install.in:1.1 src/distrib/common/bootimage/fstab.install.in:1.2
--- src/distrib/common/bootimage/fstab.install.in:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/fstab.install.in	Tue Nov 20 20:16:03 2012
@@ -1,2 +1,2 @@
-/dev/@@BOOTDISK@@a	/		ffs	rw,log		1 1
+/dev/@@BOOTDISK@@a	/		ffs	rw		1 1
 tmpfs			/tmp		tmpfs	rw		0 0



CVS commit: src/distrib/common

2012-08-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Aug 17 16:57:59 UTC 2012

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Install fully-populated .iso images in ${RELEASEDIR}/images instead
of ${RELEASEDIR}/iso, since we'll be putting non-iso images in there too.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/common/Makefile.bootcd

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.19 src/distrib/common/Makefile.bootcd:1.20
--- src/distrib/common/Makefile.bootcd:1.19	Sun Jan 22 03:53:32 2012
+++ src/distrib/common/Makefile.bootcd	Fri Aug 17 16:57:59 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.19 2012/01/22 03:53:32 tsutsui Exp $
+#	$NetBSD: Makefile.bootcd,v 1.20 2012/08/17 16:57:59 riz Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -43,7 +43,7 @@ CDSOURCE?=	false
 .if ${CDRELEASE} == false
 CDROMS_RELEASEDIR?=	${MACHINE}/installation/cdrom
 .else
-CDROMS_RELEASEDIR?=	iso
+CDROMS_RELEASEDIR?=	images
 .endif
 .if defined(CDRELEASE_NOISOS)
 CDRELEASE_EXCLUDE=	-s ',./installation/cdrom.*,,gp'



CVS commit: src/distrib/common

2012-08-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 10 05:22:22 UTC 2012

Modified Files:
src/distrib/common: Makefile.makedev

Log Message:
Add a dependency on etc.${MACHINE}/MAKEDEV.conf


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/common/Makefile.makedev

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.makedev
diff -u src/distrib/common/Makefile.makedev:1.17 src/distrib/common/Makefile.makedev:1.18
--- src/distrib/common/Makefile.makedev:1.17	Fri Jul 20 11:19:03 2012
+++ src/distrib/common/Makefile.makedev	Fri Aug 10 05:22:22 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.makedev,v 1.17 2012/07/20 11:19:03 matt Exp $
+#	$NetBSD: Makefile.makedev,v 1.18 2012/08/10 05:22:22 matt Exp $
 #
 # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
 # (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
@@ -41,7 +41,9 @@ CLEANFILES+=	${MAKEDEVSPEC} ${MAKEDEVSPE
 #
 MTREECONF+=	${MAKEDEVSPEC}
 
-${MAKEDEVSPEC}:	${MAKEDEVSCRIPT} Makefile
+${MAKEDEVSPEC}:	${MAKEDEVSCRIPT} Makefile \
+		${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV.conf
+		
 	${_MKTARGET_CREATE}
 	rm -f ${.TARGET} ${.TARGET}.tmp
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \



CVS commit: src/distrib/common

2012-07-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 20 11:19:03 UTC 2012

Modified Files:
src/distrib/common: Makefile.makedev

Log Message:
Add a dependency for Makefile so that when you add device to the Makefile
it will automatically regenerate the device mtree file and cause the ramdisk
to be updated.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/Makefile.makedev

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.makedev
diff -u src/distrib/common/Makefile.makedev:1.16 src/distrib/common/Makefile.makedev:1.17
--- src/distrib/common/Makefile.makedev:1.16	Sat Feb 18 14:26:27 2012
+++ src/distrib/common/Makefile.makedev	Fri Jul 20 11:19:03 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.makedev,v 1.16 2012/02/18 14:26:27 njoly Exp $
+#	$NetBSD: Makefile.makedev,v 1.17 2012/07/20 11:19:03 matt Exp $
 #
 # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
 # (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
@@ -41,7 +41,7 @@ CLEANFILES+=	${MAKEDEVSPEC} ${MAKEDEVSPE
 #
 MTREECONF+=	${MAKEDEVSPEC}
 
-${MAKEDEVSPEC}:	${MAKEDEVSCRIPT}
+${MAKEDEVSPEC}:	${MAKEDEVSCRIPT} Makefile
 	${_MKTARGET_CREATE}
 	rm -f ${.TARGET} ${.TARGET}.tmp
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \



CVS commit: src/distrib/common/bootimage

2012-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Apr 22 07:23:43 UTC 2012

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

Log Message:
Fix typo in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/Makefile.installimage

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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.5 src/distrib/common/bootimage/Makefile.bootimage:1.6
--- src/distrib/common/bootimage/Makefile.bootimage:1.5	Sun Apr 22 05:24:39 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Apr 22 07:23:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.5 2012/04/22 05:24:39 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.6 2012/04/22 07:23:42 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -39,7 +39,7 @@
 #		(default: sd0)
 #	USE_MBR
 #		set yes if target disk image requires MBR partition
-#		(defautl: no)
+#		(default: no)
 #	MBR_BOOTCODE
 #		optional MBR bootcode which should be installed by fdisk(8)
 #		(default: empty)
@@ -82,7 +82,7 @@
 #			DIR	TARGETPATH
 #		for installation image etc.
 #		(default: empty)
-#		XXX: currently permittions in IMGDIR_EXTRA are not handled
+#		XXX: currently permissions in IMGDIR_EXTRA are not handled
 #	IMGDIR_EXCLUDE
 #		pax(1) options to exclude files which should not copied
 #		into TARGETPATH in IMGDIR_EXTRA

Index: src/distrib/common/bootimage/Makefile.installimage
diff -u src/distrib/common/bootimage/Makefile.installimage:1.2 src/distrib/common/bootimage/Makefile.installimage:1.3
--- src/distrib/common/bootimage/Makefile.installimage:1.2	Sun Jan 22 16:50:00 2012
+++ src/distrib/common/bootimage/Makefile.installimage	Sun Apr 22 07:23:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.installimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
+#	$NetBSD: Makefile.installimage,v 1.3 2012/04/22 07:23:42 tsutsui Exp $
 #
 # Common Makefile to create a bootable installation image for USB flash etc.
 #
@@ -35,7 +35,7 @@ DISKPROTO_IN?=	${NETBSDSRCDIR}/distrib/c
 DISKPROTO_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.in
 .endif
 
-# XXX: no permittion info for makefs(8)
+# XXX: no permission info for makefs(8)
 IMGDIR_EXTRA=	${RELEASEDIR}/${RELEASEMACHINEDIR}	${RELEASEMACHINEDIR}
 IMGDIR_EXCLUDE= 	-s ',./installation/cdrom.*,,gp'
 IMGDIR_EXCLUDE+=	-s ',./installation/liveimage.*,,gp'



CVS commit: src/distrib/common/bootimage

2012-04-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Apr 22 05:24:39 UTC 2012

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

Log Message:
Add two optional variables for liveimage/installimage builds:
---
MBR_BOOTCODE
optional MBR bootcode which should be installed by fdisk(8)
(default: empty)
- specified MBR_BOOTCODE must exist in ${DESTDIR}/usr/mdec
- if MBR_BOOTCODE is not specified,
  MBR_DEFAULT_BOOTCODE (default: mbr) will be used
  if the target ${MACHINE} has the one in /usr/mdec

INSTALLBOOTOPTIONS
options passed to installboot(8), e.g., -o console=com0
(default: empty)
---
Proposed by Brook Milligan on current-users@:
http://mail-index.NetBSD.org/current-users/2012/04/16/msg019892.html

Also make USE_MBR work on ${MACHINE}s which don't have the default
/usr/mdec/mbr bootcode. (no such port has the liveimage target yet though)

XXX: tools fdisk(8) implicitly uses host's /usr/mdec/mbr for the default
XXX: bootcode even for non-x86 targets if host is x86


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.4 src/distrib/common/bootimage/Makefile.bootimage:1.5
--- src/distrib/common/bootimage/Makefile.bootimage:1.4	Mon Apr  9 19:22:49 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Apr 22 05:24:39 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.4 2012/04/09 19:22:49 riz Exp $
+#	$NetBSD: Makefile.bootimage,v 1.5 2012/04/22 05:24:39 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -40,6 +40,13 @@
 #	USE_MBR
 #		set yes if target disk image requires MBR partition
 #		(defautl: no)
+#	MBR_BOOTCODE
+#		optional MBR bootcode which should be installed by fdisk(8)
+#		(default: empty)
+#		- specified MBR_BOOTCODE must exist in ${DESTDIR}/usr/mdec
+#		- if MBR_BOOTCODE is not specified,
+#		  MBR_DEFAULT_BOOTCODE (default: mbr) will be used
+#		  if the target ${MACHINE} has the one in /usr/mdec
 #	USE_SUNLABEL
 #		set yes if target disk image requires Sun's label
 #		(default: no)
@@ -92,6 +99,9 @@
 #	IMGMAKEFSOPTIONS
 #		options passed to makefs(8) to create root file system
 #		(default: -o bsize=16384,fsize=2048,density=8192)
+#	INSTALLBOOTOPTIONS
+#		options passed to installboot(8), e.g., -o console=com0
+#		(default: empty)
 #	PRIMARY_BOOT
 #		primary boot loader that should be installed into
 #		the target image via installboot(8)
@@ -286,7 +296,7 @@ ${TARGETFS}: prepare_md_post
 	${IMGMAKEFSOPTIONS}		\
 	${WORKFS} ${WORKDIR}
 .if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"
-	${TOOL_INSTALLBOOT} -vm ${MACHINE} ${WORKFS} \
+	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${INSTALLBOOTOPTIONS} ${WORKFS} \
 	${WORKDIR}/usr/mdec/${PRIMARY_BOOT} ${SECONDARY_BOOT_ARG}
 .endif
 	@echo done.
@@ -301,6 +311,8 @@ DISKPROTO_IN?=	${DISTRIBDIR}/common/boot
 DISKPROTO_IN?=	${DISTRIBDIR}/common/bootimage/diskproto.in
 .endif
 
+MBR_DEFAULT_BOOTCODE?=	mbr
+
 OMIT_SWAPIMG?=	no
 
 WORKMBR?=	work.mbr
@@ -328,14 +340,30 @@ ${WORKLABEL}:
 	mv ${WORKLABEL}.tmp ${WORKLABEL}
 
 ${IMGBASE}.img:	${TARGETFS} ${WORKLABEL}
-.if ${LABELSECTORS} != "0"
+.if ${USE_MBR} != "no"
 	@echo creating MBR labels...
 	${DD} if=/dev/zero of=${WORKMBR} seek=$$((${IMAGESECTORS} - 1)) count=1
-	${TOOL_FDISK} -f -u \
+	${TOOL_FDISK} -f -i -u \
 	-b ${MBRCYLINDERS}/${MBRHEADS}/${MBRSECTORS}		\
 	-0 -a -s ${MBRNETBSD}/${FSOFFSET}/${BSDPARTSECTORS}		\
-	-i -c ${WORKDIR}/usr/mdec/mbr\
 	-F ${WORKMBR}
+.if empty(MBR_BOOTCODE)
+	@if [ -f ${WORKDIR}/usr/mdec/${MBR_DEFAULT_BOOTCODE} ]; then 	\
+		echo ${TOOL_FDISK} -f	\
+		-i -c ${WORKDIR}/usr/mdec/${MBR_DEFAULT_BOOTCODE}	\
+		-F ${WORKMBR};	\
+		${TOOL_FDISK} -f	\
+		-i -c ${WORKDIR}/usr/mdec/${MBR_DEFAULT_BOOTCODE}	\
+		-F ${WORKMBR};	\
+	fi
+.else
+	@if [ ! -f ${WORKDIR}/usr/mdec/${MBR_BOOTCODE} ]; then 		\
+		echo "${MBR_BOOTCODE} is not found in DESTDIR/usr/mdec, aborting"; \
+		false; 			\
+	fi
+	${TOOL_FDISK} -f -i -c ${WORKDIR}/usr/mdec/${MBR_BOOTCODE}	\
+	-F ${WORKMBR}
+.endif
 	${DD} if=${WORKMBR} count=${LABELSECTORS} |			\
 	${CAT} - ${TARGETFS} > ${WORKIMG}
 .else
@@ -354,7 +382,7 @@ ${IMGBASE}.img:	${TARGETFS} ${WORKLABEL}
 .endif
 	${TOOL_DISKLABEL} -R -F ${WORKIMG} ${WORKLABEL}
 .if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} != "no"
-	${TOOL_INSTALLBOOT}  -vm ${MACHINE} ${WORKIMG}			\
+	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${INSTALLBOOTOPTOINS} ${WORKIMG} \
 	${WORKDIR}/usr/mdec/${PRIMARY_BOOT}
 .endif
 	mv ${WORKIMG} ${.TARGET}



CVS commit: src/distrib/common/bootimage

2012-04-09 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Apr  9 19:22:49 UTC 2012

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

Log Message:
s/Createing/Creating/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.3 src/distrib/common/bootimage/Makefile.bootimage:1.4
--- src/distrib/common/bootimage/Makefile.bootimage:1.3	Sun Jan 22 16:56:22 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Mon Apr  9 19:22:49 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.3 2012/01/22 16:56:22 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.4 2012/04/09 19:22:49 riz Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -277,7 +277,7 @@ ${TARGETFS}: prepare_md_post
 .if defined(SPEC_EXTRA)
 	cat ${SPEC_EXTRA} >> ${WORKSPEC}
 .endif
-	@echo Createing rootfs...
+	@echo Creating rootfs...
 	# XXX /var/spool/ftp/hidden is unreadable
 	${CHMOD} +r ${WORKDIR}/var/spool/ftp/hidden
 	${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE}			\



CVS commit: src/distrib/common

2012-02-22 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 22 16:12:34 UTC 2012

Modified Files:
src/distrib/common: sunbootcd.sh

Log Message:
Fix typo in usage


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/common/sunbootcd.sh

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/sunbootcd.sh
diff -u src/distrib/common/sunbootcd.sh:1.5 src/distrib/common/sunbootcd.sh:1.6
--- src/distrib/common/sunbootcd.sh:1.5	Wed Apr 30 13:10:48 2008
+++ src/distrib/common/sunbootcd.sh	Wed Feb 22 16:12:34 2012
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: sunbootcd.sh,v 1.5 2008/04/30 13:10:48 martin Exp $
+# $NetBSD: sunbootcd.sh,v 1.6 2012/02/22 16:12:34 martin Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -50,7 +50,7 @@ Usage: ${PROGNAME} fsimage sun4 [sun4c [
 	The architecture arguments must be bootable file system image
 	for that architecture, or \`-' if no entry is desired.
 	\`fsimage' is typically an iso9660 file system image, although
-	any time of file system can be used as long as the first 512
+	any type of file system can be used as long as the first 512
 	bytes of the image are not used.  \`fsimage' is modified, and
 	the additional partitions are added in order.  If the same
 	filename is used more than once for different architectures,



CVS commit: src/distrib/common

2012-02-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Feb 18 14:26:27 UTC 2012

Modified Files:
src/distrib/common: Makefile.makedev

Log Message:
Tweak MAKEDEVSPEC target to properly report MAKEDEV failures:
- No need to ignore `rm -f' failures which should not happen.
- Do not pipe MAKEDEV output, but use a temp file.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/common/Makefile.makedev

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.makedev
diff -u src/distrib/common/Makefile.makedev:1.15 src/distrib/common/Makefile.makedev:1.16
--- src/distrib/common/Makefile.makedev:1.15	Sat Oct 25 22:27:34 2008
+++ src/distrib/common/Makefile.makedev	Sat Feb 18 14:26:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.makedev,v 1.15 2008/10/25 22:27:34 apb Exp $
+#	$NetBSD: Makefile.makedev,v 1.16 2012/02/18 14:26:27 njoly Exp $
 #
 # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
 # (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
@@ -43,12 +43,12 @@ MTREECONF+=	${MAKEDEVSPEC}
 
 ${MAKEDEVSPEC}:	${MAKEDEVSCRIPT}
 	${_MKTARGET_CREATE}
-	-rm -f ${.TARGET} ${.TARGET}.tmp
+	rm -f ${.TARGET} ${.TARGET}.tmp
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \
-	| ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' \
-	> ${.TARGET}.tmp \
-	&& sort -o ${.TARGET} ${.TARGET}.tmp
+	> ${.TARGET}.tmp
+	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${.TARGET}.tmp \
+	| sort -o ${.TARGET}
 
 .else	# ! MAKEDEVTARGETS
 



CVS commit: src/distrib/common/bootimage

2012-01-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 16:56:22 UTC 2012

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

Log Message:
Appease warnings `"expr 0 \* 1024 \* 1024 / 512" returned non-zero status.'

SWAPMB could be zero (in install-image case) and
expr(1) returns exit status 1 in that case.  Umm.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.2 src/distrib/common/bootimage/Makefile.bootimage:1.3
--- src/distrib/common/bootimage/Makefile.bootimage:1.2	Sun Jan 22 16:50:00 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Jan 22 16:56:22 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.3 2012/01/22 16:56:22 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -146,8 +146,9 @@ INSTALLBOOT_AFTER_DISKLABEL?=	no
 IMAGEMB?=	2048		# 2048MB
 SWAPMB?=	128		# 128MB
 
+# XXX: SWAPMB could be zero and expr(1) returns exit status 1 in that case
 IMAGESECTORS!=	expr ${IMAGEMB} \* 1024 \* 1024 / 512
-SWAPSECTORS!=	expr ${SWAPMB} \* 1024 \* 1024 / 512
+SWAPSECTORS!=	expr ${SWAPMB} \* 1024 \* 1024 / 512 || true
 
 .if ${USE_MBR} == "no"
 LABELSECTORS?=	0
@@ -176,7 +177,7 @@ SWAPOFFSET!=	expr ${LABELSECTORS} + ${FS
 
 # parameters for sunlabel
 FSCYLINDERS!=	expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \)
-SWAPCYLINDERS!=	expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \)
+SWAPCYLINDERS!=	expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true
 
 
 #



CVS commit: src/distrib/common/bootimage

2012-01-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 16:50:00 UTC 2012

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage Makefile.installimage
Makefile.liveimage

Log Message:
Fix checks for RELEASEDIR (and IMGBASE) variables to perform it
only on live_image or install_image targets.  PR toolchain/45864


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/bootimage/Makefile.bootimage \
src/distrib/common/bootimage/Makefile.installimage \
src/distrib/common/bootimage/Makefile.liveimage

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/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.1 src/distrib/common/bootimage/Makefile.bootimage:1.2
--- src/distrib/common/bootimage/Makefile.bootimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -123,11 +123,6 @@
 	@echo "Error: IMGBASE is not set"
 	@false
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo "Error: RELEASEDIR is not set"
-	@false
-.endif
 
 # should be defined elsewhere? 
 CAT?=		cat
Index: src/distrib/common/bootimage/Makefile.installimage
diff -u src/distrib/common/bootimage/Makefile.installimage:1.1 src/distrib/common/bootimage/Makefile.installimage:1.2
--- src/distrib/common/bootimage/Makefile.installimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.installimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.installimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.installimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable installation image for USB flash etc.
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(INSTIMGBASE)
-.BEGIN:
+.if !target(check_INSTIMGBASE)
+check_INSTIMGBASE: .PHONY .NOTMAIN
+.if !defined(INSTIMGBASE)
 	@echo "Error: INSTIMGBASE is not set"
 	@false
+.else
+	@true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo "Error: RELEASEDIR is not set"
-	@false
 .endif
 
 SWAPMB=		0			# no swap
@@ -54,7 +53,7 @@ INSTIMG_RELEASEDIR?=	${RELEASEMACHINEDIR
 # should be defined elsewhere? 
 MKDIR?=		mkdir -p
 
-install_image: ${IMGBASE}.img.gz
+install_image: check_INSTIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
 	${MKDIR} ${INSTIMG_RELEASEDIR}
 	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
 	# note ${MAKESUM} will be calculated in src/etc/Makefile
Index: src/distrib/common/bootimage/Makefile.liveimage
diff -u src/distrib/common/bootimage/Makefile.liveimage:1.1 src/distrib/common/bootimage/Makefile.liveimage:1.2
--- src/distrib/common/bootimage/Makefile.liveimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.liveimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable FS image for USB flash or emulators
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(LIVEIMGBASE)
-.BEGIN:
+.if !target(check_LIVEIMGBASE)
+check_LIVEIMGBASE: .PHONY .NOTMAIN
+.if !defined(LIVEIMGBASE)
 	@echo "Error: LIVEIMGBASE is not set"
 	@false
+.else
+	@true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo "Error: RELEASEDIR is not set"
-	@false
 .endif
 
 IMGBASE=	${LIVEIMGBASE}
@@ -34,7 +33,7 @@ LIVEIMG_RELEASEDIR?=	${RELEASEMACHINEDIR
 # should be defined elsewhere? 
 MKDIR?=		mkdir -p
 
-live_image: ${IMGBASE}.img.gz
+live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
 	${MKDIR} ${LIVEIMG_RELEASEDIR}
 	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
 	# note ${MAKESUM} will be calculated in src/etc/Makefile



CVS commit: src/distrib/common

2011-05-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 06:19:11 UTC 2011

Modified Files:
src/distrib/common: list.dhcpcd

Log Message:
SRCDIRS is not the way to do this; some testing would have been nice.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/list.dhcpcd

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/list.dhcpcd
diff -u src/distrib/common/list.dhcpcd:1.1 src/distrib/common/list.dhcpcd:1.2
--- src/distrib/common/list.dhcpcd:1.1	Tue Apr  7 07:49:17 2009
+++ src/distrib/common/list.dhcpcd	Tue May 31 02:19:11 2011
@@ -1,10 +1,10 @@
-#	$NetBSD: list.dhcpcd,v 1.1 2009/04/07 11:49:17 joerg Exp $
+#	$NetBSD: list.dhcpcd,v 1.2 2011/05/31 06:19:11 christos Exp $
 #
 # list file (c.f. parselist.awk) for DHCP-enabled install media.
 #
 
-SRCDIRS	external/bsd/dhcpcd/sbin
 PROG	sbin/dhcpcd
+SPECIAL	dhcpcd srcdir external/bsd/dhcpcd/sbin/dhcpcd
 
 COPY	${DESTDIR}/etc/dhcpcd.conf etc/dhcpcd.conf
 COPY	${DESTDIR}/libexec/dhcpcd-run-hooks libexec/dhcpcd-run-hooks 555



CVS commit: src/distrib/common

2011-01-01 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat Jan  1 16:56:19 UTC 2011

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Document MDSET_NOIMAGE.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/common/Makefile.mdset

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.mdset
diff -u src/distrib/common/Makefile.mdset:1.34 src/distrib/common/Makefile.mdset:1.35
--- src/distrib/common/Makefile.mdset:1.34	Fri Apr  3 22:36:35 2009
+++ src/distrib/common/Makefile.mdset	Sat Jan  1 16:56:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.34 2009/04/03 22:36:35 perry Exp $
+#	$NetBSD: Makefile.mdset,v 1.35 2011/01/01 16:56:18 jym Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -29,6 +29,9 @@
 #
 #	MDSET_NOGZIP.${FILENAME}	If defined, don't gzip ${FILENAME}
 #
+#	MDSET_NOIMAGE.${FILENAME}	If defined, don't add ${IMAGE} to
+#	${FILENAME}
+#
 #	MDSET_NOSTRIP			If defined, don't strip any kernels.
 #
 #	MDSET_NOSTRIP.${FILENAME}	If defined, don't strip ${FILENAME}



CVS commit: src/distrib/common

2010-02-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  7 18:50:49 UTC 2010

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

Log Message:
Update version number examples for the post-2.0I world.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/common/Makefile.distrib

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.distrib
diff -u src/distrib/common/Makefile.distrib:1.7 src/distrib/common/Makefile.distrib:1.8
--- src/distrib/common/Makefile.distrib:1.7	Tue Jun 27 12:34:54 2006
+++ src/distrib/common/Makefile.distrib	Sun Feb  7 18:50:49 2010
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile.distrib,v 1.7 2006/06/27 12:34:54 christos Exp $
+#	$NetBSD: Makefile.distrib,v 1.8 2010/02/07 18:50:49 snj Exp $
 #
 # Makefile snippet to setup various make variables variables used in distrib/:
 #
 # Variables defined:
 #	DISTRIBDIR	Top level of distrib
-#	DISTRIBREV	NetBSD version without dots, as in "15ZD"
-#	DISTRIBVER	NetBSD version with dots, as in "1.5ZD"
+#	DISTRIBREV	NetBSD version without dots, as in "59924"
+#	DISTRIBVER	NetBSD version with dots, as in "5.99.24"
 #	DISTRIBVERDEP	Files to depend on for version/revision vars above
 #
 # Commands defined:



CVS commit: src/distrib/common

2009-10-21 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Wed Oct 21 11:35:19 UTC 2009

Modified Files:
src/distrib/common: mktermcap

Log Message:
update to generate something closer to common/termcap


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/common/mktermcap

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/mktermcap
diff -u src/distrib/common/mktermcap:1.4 src/distrib/common/mktermcap:1.5
--- src/distrib/common/mktermcap:1.4	Mon Dec 22 18:58:22 2008
+++ src/distrib/common/mktermcap	Wed Oct 21 11:35:19 2009
@@ -1,11 +1,13 @@
 #!/bin/sh
-#	$NetBSD: mktermcap,v 1.4 2008/12/22 18:58:22 christos Exp $
+#	$NetBSD: mktermcap,v 1.5 2009/10/21 11:35:19 abs Exp $
+#
+# Note - output has been further adjusted by hand to save space
 
-TARGET=termcap.mini
+TARGET=termcap
 
+# x68k pulls in vt220
 echo "#	\$NetBSD\$" > ${TARGET}
-for t in wsvt25m vt100 vt220 xterm ansi
+for t in wsvt25m vt100 xterm ansi dumb hp300h iris-ansi iris-ansi-ap sun x68k
 do
 	getent termcap -rp $t
-	echo
-done >> ${TARGET}
+done | sed 's/^	//' | grep . >> ${TARGET}