Module Name:    src
Committed By:   jym
Date:           Tue Jan 18 00:16:14 UTC 2011

Modified Files:
        src/distrib/amd64/cdroms: Makefile.cdrom
        src/distrib/amd64/cdroms/bootcd: Makefile boot.cfg.in
        src/distrib/amd64/cdroms/bootcd-com: Makefile
        src/distrib/amd64/cdroms/installcd: Makefile boot.cfg.in
Added Files:
        src/distrib/amd64/cdroms: etc.rc etc.ttys install.sh

Log Message:
Bring amd64 installation ISO to same state as the i386 one:
- GENERIC kernel for booting
- root is now cd0a
- use the same scripts and conf files as the i386 install ISO.

See also http://mail-index.netbsd.org/port-i386/2011/01/14/msg002247.html


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/cdroms/Makefile.cdrom
cvs rdiff -u -r0 -r1.1 src/distrib/amd64/cdroms/etc.rc \
    src/distrib/amd64/cdroms/etc.ttys src/distrib/amd64/cdroms/install.sh
cvs rdiff -u -r1.3 -r1.4 src/distrib/amd64/cdroms/bootcd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/cdroms/bootcd/boot.cfg.in
cvs rdiff -u -r1.4 -r1.5 src/distrib/amd64/cdroms/bootcd-com/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/amd64/cdroms/installcd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/cdroms/installcd/boot.cfg.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/amd64/cdroms/Makefile.cdrom
diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.1 src/distrib/amd64/cdroms/Makefile.cdrom:1.2
--- src/distrib/amd64/cdroms/Makefile.cdrom:1.1	Tue Mar  6 21:52:44 2007
+++ src/distrib/amd64/cdroms/Makefile.cdrom	Tue Jan 18 00:16:13 2011
@@ -1,4 +1,69 @@
-# $NetBSD: Makefile.cdrom,v 1.1 2007/03/06 21:52:44 bouyer Exp $
+# $NetBSD: Makefile.cdrom,v 1.2 2011/01/18 00:16:13 jym Exp $
 
-CDMAKEFSOPTIONS= bootimage=i386;bootxx.${MACHINE},no-emul-boot
-CDINSTKERNEL= ../../instkernel
+.include <bsd.own.mk>
+
+SYSINSTDIR!= cd ${.CURDIR}/../../../utils/sysinst/arch/${MACHINE} && ${PRINTOBJDIR}
+
+# Need multidot for the boot loader to read kernel modules as it doesn't
+# understand rockridge.
+CDMAKEFSOPTIONS= bootimage=i386;bootxx.${MACHINE},no-emul-boot,allow-multidot
+CDINSTKERNEL=	../../instkernel
+CDKERNELS=	netbsd-GENERIC.gz       netbsd
+CDRELEASE_NOISOS=	true
+
+CDRUNTIME+=	./bin
+CDRUNTIME+=	./dev/MAKEDEV
+CDRUNTIME+=	./etc
+CDRUNTIME+=	./lib
+CDRUNTIME+=	./libdata
+CDRUNTIME+=	./libexec/ld.elf_so
+CDRUNTIME+=	./libexec/lfs_cleanerd
+CDRUNTIME+=	./libexec/dhcpcd-run-hooks
+CDRUNTIME+=	./libexec/resolvconf/
+CDRUNTIME+=	./mnt
+CDRUNTIME+=	./sbin
+CDRUNTIME+=	./stand
+CDRUNTIME+=	./tmp
+CDRUNTIME+=	./usr/bin/ftp
+CDRUNTIME+=	./usr/bin/grep
+CDRUNTIME+=	./usr/bin/gzip
+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/vmstat
+CDRUNTIME+=	./usr/lib/libbz2.so*
+CDRUNTIME+=	./usr/lib/libc.so*
+CDRUNTIME+=	./usr/lib/libcurses.so*
+CDRUNTIME+=	./usr/lib/libedit.so*
+CDRUNTIME+=	./usr/lib/libintl.so*
+CDRUNTIME+=	./usr/lib/libkvm.so*
+CDRUNTIME+=	./usr/lib/libterminfo.so*
+CDRUNTIME+=	./usr/lib/libutil.so*
+CDRUNTIME+=	./usr/lib/libz.so*
+CDRUNTIME+=	./usr/libexec/ld.elf_so
+CDRUNTIME+=	./usr/libexec/getty
+CDRUNTIME+=	./usr/mdec
+CDRUNTIME+=	./usr/sbin/chroot
+CDRUNTIME+=	./usr/sbin/installboot
+CDRUNTIME+=	./usr/sbin/wiconfig
+CDRUNTIME+=	./usr/share/misc/terminfo.db
+CDRUNTIME+=	./usr/share/locale
+
+image_md_pre:
+	${MKDIR} 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
+	${CP} ${SYSINSTDIR}/sysinst cdrom
+	${CHMOD} ugo+rx cdrom/sysinst
+	${CP} ${SYSINSTDIR}/sysinstmsgs.?? cdrom
+	${MKDIR} cdrom/var

Index: src/distrib/amd64/cdroms/bootcd/Makefile
diff -u src/distrib/amd64/cdroms/bootcd/Makefile:1.3 src/distrib/amd64/cdroms/bootcd/Makefile:1.4
--- src/distrib/amd64/cdroms/bootcd/Makefile:1.3	Wed Oct 22 11:59:24 2008
+++ src/distrib/amd64/cdroms/bootcd/Makefile	Tue Jan 18 00:16:13 2011
@@ -1,10 +1,9 @@
-#	$NetBSD: Makefile,v 1.3 2008/10/22 11:59:24 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.4 2011/01/18 00:16:13 jym Exp $
 #
 
 .include "${.CURDIR}/../Makefile.cdrom"
 
 CDBASE=		boot			# gives ${CDBASE}.iso
-CDKERNELS=	netbsd-INSTALL.gz	netbsd	# from ../instkernel
 CDBUILDEXTRA+=	boot.cfg		# Add boot.cfg file
 CLEANFILES+=	boot.cfg
 

Index: src/distrib/amd64/cdroms/bootcd/boot.cfg.in
diff -u src/distrib/amd64/cdroms/bootcd/boot.cfg.in:1.2 src/distrib/amd64/cdroms/bootcd/boot.cfg.in:1.3
--- src/distrib/amd64/cdroms/bootcd/boot.cfg.in:1.2	Sat Oct 25 18:18:01 2008
+++ src/distrib/amd64/cdroms/bootcd/boot.cfg.in	Tue Jan 18 00:16:13 2011
@@ -1,15 +1,13 @@
 banner=Welcome to the NetBSD @@VERSION@@ boot-only install CD
 banner================================================================================
 banner=
-banner=This CD contains only the install kernels. Binary sets to complete the
-banner=installation must be downloaded separately.
+banner=This CD contains only the installation program.  Binary sets to complete the
+banner=installation must be downloaded separately.  The installer can download them
+banner=if this machine has a working internet connection.
 banner=
-banner=ACPI should work on all modern and legacy hardware, however if you have
-banner=problems, please try disabling it.
-banner=
-banner=If you encounter problems on hardware manufactured after 1998 with ACPI
-banner=enabled, please file a problem report including output from the 'dmesg'
-banner=command.
+banner=ACPI (Advanced Configuration and Power Interface) should work on all modern
+banner=and legacy hardware.  However if you do encounter a problem while booting,
+banner=try disabling it and report a bug at http://www.NetBSD.org/.
 menu=Install NetBSD:boot netbsd
 menu=Install NetBSD (no ACPI):boot netbsd -2
 menu=Install NetBSD (no ACPI, no SMP):boot netbsd -12

Index: src/distrib/amd64/cdroms/bootcd-com/Makefile
diff -u src/distrib/amd64/cdroms/bootcd-com/Makefile:1.4 src/distrib/amd64/cdroms/bootcd-com/Makefile:1.5
--- src/distrib/amd64/cdroms/bootcd-com/Makefile:1.4	Wed Oct 21 02:31:44 2009
+++ src/distrib/amd64/cdroms/bootcd-com/Makefile	Tue Jan 18 00:16:13 2011
@@ -1,10 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2009/10/21 02:31:44 yamt Exp $
+#	$NetBSD: Makefile,v 1.5 2011/01/18 00:16:13 jym Exp $
 #
 
 .include "${.CURDIR}/../Makefile.cdrom"
 
 CDBASE=		boot-com			# gives ${CDBASE}.iso
-CDKERNELS=	netbsd-INSTALL.gz	netbsd	# from ../instkernel
 CDBOOTOPTIONS=	-o console=com0
 
 CDBUILDEXTRA+=	boot.cfg		# Add boot.cfg file

Index: src/distrib/amd64/cdroms/installcd/Makefile
diff -u src/distrib/amd64/cdroms/installcd/Makefile:1.3 src/distrib/amd64/cdroms/installcd/Makefile:1.4
--- src/distrib/amd64/cdroms/installcd/Makefile:1.3	Thu May  1 21:59:07 2008
+++ src/distrib/amd64/cdroms/installcd/Makefile	Tue Jan 18 00:16:13 2011
@@ -1,10 +1,13 @@
-#	$NetBSD: Makefile,v 1.3 2008/05/01 21:59:07 xtraeme Exp $
+#	$NetBSD: Makefile,v 1.4 2011/01/18 00:16:13 jym Exp $
 #
 
+# Install CD, to be made after 'build.sh release'
+# Requires populated $RELEASEDIR/${MACHINE}
+
+.include <bsd.own.mk>
 .include "${.CURDIR}/../Makefile.cdrom"
 
 CDBASE=		amd64cd			# gives ${CDBASE}.iso
-CDKERNELS=	netbsd-INSTALL.gz	netbsd	# from ../instkernel
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDBUILDEXTRA=	boot.cfg		# Add boot.cfg file
 CLEANFILES+=	boot.cfg

Index: src/distrib/amd64/cdroms/installcd/boot.cfg.in
diff -u src/distrib/amd64/cdroms/installcd/boot.cfg.in:1.2 src/distrib/amd64/cdroms/installcd/boot.cfg.in:1.3
--- src/distrib/amd64/cdroms/installcd/boot.cfg.in:1.2	Wed Oct 22 12:01:59 2008
+++ src/distrib/amd64/cdroms/installcd/boot.cfg.in	Tue Jan 18 00:16:13 2011
@@ -1,12 +1,9 @@
 banner=Welcome to the NetBSD @@VERSION@@ installation CD
 banner================================================================================
 banner=
-banner=ACPI should work on all modern and legacy hardware, however if you have 
-banner=problems, please try disabling it.
-banner=
-banner=If you encounter problems on hardware manufactured after 1998 with ACPI
-banner=enabled, please file a problem report including output from the 'dmesg'
-banner=command.
+banner=ACPI (Advanced Configuration and Power Interface) should work on all modern
+banner=and legacy hardware.  However if you do encounter a problem while booting,
+banner=try disabling it and report a bug at http://www.NetBSD.org/.
 menu=Install NetBSD:boot netbsd
 menu=Install NetBSD (no ACPI):boot netbsd -2
 menu=Install NetBSD (no ACPI, no SMP):boot netbsd -12

Added files:

Index: src/distrib/amd64/cdroms/etc.rc
diff -u /dev/null src/distrib/amd64/cdroms/etc.rc:1.1
--- /dev/null	Tue Jan 18 00:16:14 2011
+++ src/distrib/amd64/cdroms/etc.rc	Tue Jan 18 00:16:13 2011
@@ -0,0 +1,57 @@
+# $NetBSD: etc.rc,v 1.1 2011/01/18 00:16:13 jym 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
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#          This product includes software developed for the
+#          NetBSD Project.  See http://www.NetBSD.org/ for
+#          information about NetBSD.
+# 4. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+# 
+# 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.
+# 
+# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+
+# hack to get around bugs in kernfs's rootdev/rrootdev lookup.
+ls -l /dev/* > /dev/null 2>&1
+
+# 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
+
+# prepare important directories in the tmpfses, so dhcpcd will work
+mkdir -p /var/run /var/db
+
+# create a gettytab to autologin and run sysinst (etc/gettytab is a symlink
+# to /tmp/gettytab)
+echo "# Autostart sysinst" > /tmp/gettytab
+echo -n "sysinst:al=root:lo=/install.sh:im=:sp#" >> /tmp/gettytab
+stty speed >> /tmp/gettytab
+
+# done, move on to multiuser mode
+exit 0
Index: src/distrib/amd64/cdroms/etc.ttys
diff -u /dev/null src/distrib/amd64/cdroms/etc.ttys:1.1
--- /dev/null	Tue Jan 18 00:16:14 2011
+++ src/distrib/amd64/cdroms/etc.ttys	Tue Jan 18 00:16:13 2011
@@ -0,0 +1,7 @@
+# $NetBSD: etc.ttys,v 1.1 2011/01/18 00:16:13 jym Exp $
+#
+# re-launch the sysinst wrapper script on console
+#
+# name	getty				type	status		comments
+#
+console	"/usr/libexec/getty sysinst"	wsvt25	on secure
Index: src/distrib/amd64/cdroms/install.sh
diff -u /dev/null src/distrib/amd64/cdroms/install.sh:1.1
--- /dev/null	Tue Jan 18 00:16:14 2011
+++ src/distrib/amd64/cdroms/install.sh	Tue Jan 18 00:16:13 2011
@@ -0,0 +1,85 @@
+#! /bin/sh
+# $NetBSD: install.sh,v 1.1 2011/01/18 00:16:13 jym Exp $
+#
+# -
+#  Copyright (c) 2010 The NetBSD Foundation, Inc.
+#  All rights reserved.
+# 
+#  This code is derived from software contributed to The NetBSD Foundation
+#  by Martin Husemann <[email protected]>.
+# 
+#  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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+#  ``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 FOUNDATION OR CONTRIBUTORS
+#  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.
+
+
+# setup basic environment
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+
+# Check if we are on a framebuffer or on serial console and default
+# the terminal type accordingly.
+# There is no /var/db/dev.db, so sysctl might not map the devicename properly;
+# ttyE0 is 90,0 -> 0x5a00
+case $(sysctl -nx kern.consdev) in
+ 002f000000000000)
+   TERM=wsvt25
+   ;;
+ *)
+   TERM=vt220
+   ;;
+esac
+
+export TERM
+HOME=/
+export HOME
+BLOCKSIZE=1k
+export BLOCKSIZE
+EDITOR=ed
+export EDITOR
+
+umask 022
+
+stty newcrt werase ^W intr ^C kill ^U erase ^?
+if [ $TERM != "wsvt25" ]; then
+	cat << "EOM"
+
+
+You are using a serial console, we do not know your terminal emulation.
+Please select one, typical values are:
+
+	vt100
+	ansi
+	xterm
+
+EOM
+	echo -n "Terminal type (just hit ENTER for '$TERM'): "
+	read ans
+	if [ -n "$ans" ];then
+	    TERM=$ans
+	fi
+fi
+
+# run the installation or upgrade script.
+/sysinst || {
+	    echo "Oops, something went wrong - we will try again"; exit; }
+
+echo "To return to the installer, quit this shell by typing 'exit' or ^D."
+exec /bin/sh

Reply via email to