CVS commit: src/distrib/vax/cdroms/installcd

2014-06-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun  4 19:31:57 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
When uncompressing the kernel, allow overwriting of an existing one in the
cdrom content directory - this helps update builds.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/vax/cdroms/installcd/Makefile

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

Modified files:

Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.6 src/distrib/vax/cdroms/installcd/Makefile:1.7
--- src/distrib/vax/cdroms/installcd/Makefile:1.6	Sat May 31 10:43:00 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Wed Jun  4 19:31:57 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2014/05/31 10:43:00 martin Exp $
+#	$NetBSD: Makefile,v 1.7 2014/06/04 19:31:57 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
@@ -31,7 +31,7 @@ image_md_pre:
 	for f in ${SYSINSTDIR}/sysinstmsgs.??; do \
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
-	${TOOL_GZIP} -d cdrom/netbsd.gz
+	${TOOL_GZIP} -d -f cdrom/netbsd.gz
 	echo '. type=dir optional'  ./fs.spec
 	echo './dev type=dir optional'  ./fs.spec
 	${HOST_SH} cdrom/dev/MAKEDEV -s all | ${TOOL_SED} -e '1d' -e 's:^\./:./dev/:'  ./fs.spec



CVS commit: src/distrib/vax/cdroms/installcd

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

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Instead of running MAKEDEV inside the image content dir (which would only
work for root), make it emit a mtree spec file and pass that to makefs.
This should also work for unprivileged builds.
Problem pointed out by Izumi Tsutsui.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/vax/cdroms/installcd/Makefile

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

Modified files:

Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.5 src/distrib/vax/cdroms/installcd/Makefile:1.6
--- src/distrib/vax/cdroms/installcd/Makefile:1.5	Fri May 30 13:24:22 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Sat May 31 10:43:00 2014
@@ -1,8 +1,11 @@
-#	$NetBSD: Makefile,v 1.5 2014/05/30 13:24:22 martin Exp $
+#	$NetBSD: Makefile,v 1.6 2014/05/31 10:43:00 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
 CDRELEASE_NOISOS=true
+CDMAKEFSEXTRAOPTS+=-F ./fs.spec
+
+CLEANFILES+= fs.spec
 
 # for PRINTOBJDIR
 .include bsd.own.mk
@@ -29,7 +32,9 @@ image_md_pre:
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
 	${TOOL_GZIP} -d cdrom/netbsd.gz
-	(cd cdrom/dev  ${HOST_SH} ./MAKEDEV all)
+	echo '. type=dir optional'  ./fs.spec
+	echo './dev type=dir optional'  ./fs.spec
+	${HOST_SH} cdrom/dev/MAKEDEV -s all | ${TOOL_SED} -e '1d' -e 's:^\./:./dev/:'  ./fs.spec
 	${MKDIR} cdrom/var
 	${MKDIR} cdrom/kern
 



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:19:43 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: etc.rc

Log Message:
Make it deal with /dev being the result of a MAKDEV all instead of
MAKEDEV init by mounting a ptyfs if needed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/cdroms/installcd/etc.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/vax/cdroms/installcd/etc.rc
diff -u src/distrib/vax/cdroms/installcd/etc.rc:1.2 src/distrib/vax/cdroms/installcd/etc.rc:1.3
--- src/distrib/vax/cdroms/installcd/etc.rc:1.2	Fri May 23 12:25:46 2014
+++ src/distrib/vax/cdroms/installcd/etc.rc	Fri May 30 13:19:42 2014
@@ -1,4 +1,4 @@
-# $NetBSD: etc.rc,v 1.2 2014/05/23 12:25:46 martin Exp $
+# $NetBSD: etc.rc,v 1.3 2014/05/30 13:19:42 martin Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -51,6 +51,16 @@ EOM
 	exec sh
 }
 
+# if /dev has not been populated by init, it may be a stock MAKEDEV all
+# variant without opty - in which case we need to mount a ptyfs
+if [ ! -r /dev/ttypf ]; then
+	if mount | grep '^ptyfs on /dev/pts' /dev/null 21; then
+		# do not mount it again
+	else
+		mount -t ptyfs ptyfs /dev/pts
+	fi
+fi
+
 # mount a few tempfs to allow modifications over the CD contents
 mount -t tmpfs tmpfs /tmp || lowmemfail
 mount -t tmpfs tmpfs /var || lowmemfail



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:23:05 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
The current vax /boot is super slow unziping kernels - and this is a CD, wich
has space enough, so unzip the kernel on it to speed up the boot process.
XXX The /boot bug should nevertheless be fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/vax/cdroms/installcd/Makefile

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

Modified files:

Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.3 src/distrib/vax/cdroms/installcd/Makefile:1.4
--- src/distrib/vax/cdroms/installcd/Makefile:1.3	Wed May 21 14:21:35 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Fri May 30 13:23:05 2014
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.3 2014/05/21 14:21:35 martin Exp $
+#	$NetBSD: Makefile,v 1.4 2014/05/30 13:23:05 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
-CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd
+CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
 CDRELEASE_NOISOS=true
 
 # for PRINTOBJDIR
@@ -28,6 +28,7 @@ image_md_pre:
 	for f in ${SYSINSTDIR}/sysinstmsgs.??; do \
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
+	${TOOL_GZIP} -d cdrom/netbsd.gz
 	${MKDIR} cdrom/var
 	${MKDIR} cdrom/kern
 



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:24:22 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Pre-populate /dev on the CD - with rockridge extensions we can do this and
it saves us one tmpfs (or mfs) instance, which helps quite a bit on low
memory machines.


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

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

Modified files:

Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.4 src/distrib/vax/cdroms/installcd/Makefile:1.5
--- src/distrib/vax/cdroms/installcd/Makefile:1.4	Fri May 30 13:23:05 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Fri May 30 13:24:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/05/30 13:23:05 martin Exp $
+#	$NetBSD: Makefile,v 1.5 2014/05/30 13:24:22 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
@@ -29,6 +29,7 @@ image_md_pre:
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
 	${TOOL_GZIP} -d cdrom/netbsd.gz
+	(cd cdrom/dev  ${HOST_SH} ./MAKEDEV all)
 	${MKDIR} cdrom/var
 	${MKDIR} cdrom/kern
 



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 23 12:25:46 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: etc.rc

Log Message:
If mounting the various tmpfs instances fails, we do not have enough
RAM installed. Tell the user about it and exec a single user shell
(instead of randomly failing later and hanging the machine.)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/vax/cdroms/installcd/etc.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/vax/cdroms/installcd/etc.rc
diff -u src/distrib/vax/cdroms/installcd/etc.rc:1.1 src/distrib/vax/cdroms/installcd/etc.rc:1.2
--- src/distrib/vax/cdroms/installcd/etc.rc:1.1	Wed May 21 14:21:35 2014
+++ src/distrib/vax/cdroms/installcd/etc.rc	Fri May 23 12:25:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: etc.rc,v 1.1 2014/05/21 14:21:35 martin Exp $
+# $NetBSD: etc.rc,v 1.2 2014/05/23 12:25:46 martin Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -39,10 +39,22 @@ export PATH
 # hack to get around bugs in kernfs's rootdev/rrootdev lookup.
 ls -l /dev/*  /dev/null 21
 
+lowmemfail()
+{
+	cat  EOM
+This machine seems to not have enough memory for this install method.
+Please refer to the installation documentation on how to create and
+boot a custom kernel and how to install with that.
+
+Please use the 'halt' command to stop the machine.
+EOM
+	exec sh
+}
+
 # mount a few tempfs to allow modifications over the CD contents
-mount -t tmpfs tmpfs /tmp
-mount -t tmpfs tmpfs /var
-mount -t tmpfs -o union tmpfs /etc
+mount -t tmpfs tmpfs /tmp || lowmemfail
+mount -t tmpfs tmpfs /var || lowmemfail
+mount -t tmpfs -o union tmpfs /etc || lowmemfail
 
 # prepare important directories in the tmpfses, so dhcpcd and vi will work
 mkdir -p /var/run /var/db /var/tmp



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 21 14:21:35 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile
Added Files:
src/distrib/vax/cdroms/installcd: etc.rc etc.ttys install.sh

Log Message:
Use GENERIC instead of INSTALL (including the ramdisk) for this CD image
and mount the CD filesystem as root instead for installation.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/cdroms/installcd/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/vax/cdroms/installcd/etc.rc \
src/distrib/vax/cdroms/installcd/etc.ttys \
src/distrib/vax/cdroms/installcd/install.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/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.2 src/distrib/vax/cdroms/installcd/Makefile:1.3
--- src/distrib/vax/cdroms/installcd/Makefile:1.2	Sun Jan 15 22:34:34 2012
+++ src/distrib/vax/cdroms/installcd/Makefile	Wed May 21 14:21:35 2014
@@ -1,17 +1,90 @@
-#	$NetBSD: Makefile,v 1.2 2012/01/15 22:34:34 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.3 2014/05/21 14:21:35 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
-CDKERNELS=	install.ram.gz netbsd
-CDINSTKERNEL=	../../ramdisk-kernel
+CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd
+CDRELEASE_NOISOS=true
 
-#make the CD bootable
-prepare_md_post:
+# for PRINTOBJDIR
+.include bsd.own.mk
+SYSINSTDIR!= cd ${.CURDIR}/../../../utils/sysinst/arch/${MACHINE}  ${PRINTOBJDIR}
+
+# prepare mutliuser install environment
+image_md_pre:
 	${RM} -f cdrom/boot
 	${CP} ${DESTDIR}/usr/mdec/boot cdrom/boot
 	${RM} -f bootxx.${MACHINE}
 	${CP} ${DESTDIR}/usr/mdec/xxboot bootxx.${MACHINE}
+	${RM} -rf cdrom/libexec/dhcpcd-hooks/*
+	${MKDIR} -p cdrom/libexec/dhcpcd-hooks
+	${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
+	${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
+	${MKDIR} cdrom/etc
+	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
+	${INSTALL} ${COPY} ${.CURDIR}/etc.ttys cdrom/etc/ttys
+	${INSTALL} ${COPY} ${.CURDIR}/etc.rc cdrom/etc/rc
+	${INSTALL} ${COPY} -m 0555 ${.CURDIR}/install.sh cdrom/install.sh
+	${MKDIR} cdrom/mnt2 cdrom/targetroot
+	${INSTALL} ${COPY} -m 0555 ${SYSINSTDIR}/sysinst cdrom
+	for f in ${SYSINSTDIR}/sysinstmsgs.??; do \
+		${INSTALL} ${COPY} $$f cdrom; \
+	done
+	${MKDIR} cdrom/var
+	${MKDIR} cdrom/kern
 
+# make the CD bootable
 image_md_post:
 	${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE}
 
+CDRUNTIME+=	./bin
+CDRUNTIME+=	./dev/MAKEDEV
+CDRUNTIME+=	./etc
+CDRUNTIME+=	./lib
+CDRUNTIME+=	./libdata
+CDRUNTIME+=	./libexec
+CDRUNTIME+=	./mnt
+CDRUNTIME+=	./sbin
+# CDRUNTIME+=	./stand
+CDRUNTIME+=	./tmp
+CDRUNTIME+=	./usr/bin/ftp
+CDRUNTIME+=	./usr/bin/getopt
+CDRUNTIME+=	./usr/bin/gunzip
+CDRUNTIME+=	./usr/bin/gzcat
+CDRUNTIME+=	./usr/bin/gzip
+CDRUNTIME+=	./usr/bin/grep
+CDRUNTIME+=	./usr/bin/less
+CDRUNTIME+=	./usr/bin/more
+CDRUNTIME+=	./usr/bin/netstat
+CDRUNTIME+=	./usr/bin/progress
+CDRUNTIME+=	./usr/bin/sed
+CDRUNTIME+=	./usr/bin/sort
+CDRUNTIME+=	./usr/bin/tip
+CDRUNTIME+=	./usr/bin/tput
+CDRUNTIME+=	./usr/bin/vi
+CDRUNTIME+=	./usr/bin/vmstat
+CDRUNTIME+=	./usr/lib/libbz2.so*
+CDRUNTIME+=	./usr/lib/libc.so*
+CDRUNTIME+=	./usr/lib/libcurses.so*
+CDRUNTIME+=	./usr/lib/libedit.so*
+CDRUNTIME+=	./usr/lib/libgcc_s.so*
+CDRUNTIME+=	./usr/lib/libintl.so*
+CDRUNTIME+=	./usr/lib/libkvm.so*
+CDRUNTIME+=	./usr/lib/liblzma.so*
+CDRUNTIME+=	./usr/lib/libterminfo.so*
+CDRUNTIME+=	./usr/lib/libutil.so*
+CDRUNTIME+=	./usr/lib/libz.so*
+.if (${MKCRYPTO} != no)
+CDRUNTIME+=	./usr/lib/libcrypto.so*
+CDRUNTIME+=	./usr/lib/libssl.so*
+.endif
+CDRUNTIME+=	./usr/libexec/ld.elf_so
+CDRUNTIME+=	./usr/libexec/getty
+CDRUNTIME+=	./usr/mdec
+CDRUNTIME+=	./usr/sbin/chat
+CDRUNTIME+=	./usr/sbin/chroot
+CDRUNTIME+=	./usr/sbin/installboot
+CDRUNTIME+=	./usr/sbin/pppd
+CDRUNTIME+=	./usr/sbin/wiconfig
+CDRUNTIME+=	./usr/share/misc/terminfo.cdb
+CDRUNTIME+=	./usr/share/locale
+
 .include ${.CURDIR}/../../../common/Makefile.bootcd

Added files:

Index: src/distrib/vax/cdroms/installcd/etc.rc
diff -u /dev/null src/distrib/vax/cdroms/installcd/etc.rc:1.1
--- /dev/null	Wed May 21 14:21:35 2014
+++ src/distrib/vax/cdroms/installcd/etc.rc	Wed May 21 14:21:35 2014
@@ -0,0 +1,57 @@
+# $NetBSD: etc.rc,v 1.1 2014/05/21 14:21:35 martin Exp $
+#
+# Copyright (c) 1997 Perry E. Metzger
+# Copyright (c) 1994 Christopher G. Demetriou
+# 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
+#