Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: miniroot.kmod install fs + amd64cd.iso changes
On 13.01.2011 14:02, Jean-Yves Migeon wrote:
> On Thu, 13 Jan 2011 12:19:08 +0000, "Jonathan A. Kollasch"
> In that case, I propose the following:
> - rename INSTALL_FLOPPY to INSTALL for i386 (or INSTALL becomes
> INSTALL_FLOPPY for amd64). No need to mess up things between two arch
> that are closely related (I would prefer the former, 3MiB file does not
> qualify as "floppy" size to me). I don't care in the end, if we can
> avoid mess.
> - keep building the miniroot.kmod installation module.
>
> Opinions?
Second version, patch is attached. Note: I did not change i386 INSTALL
kernel name. port-i386@ is CC.
- cdrom uses GENERIC, and mount /dev/cd0a for /
- INSTALL will remain available for amd64
- miniroot.kmod installation is available, so you are free to use it for
amd64 GENERIC too.
This brings amd64 and i386 on par (regarding ISO installs and miniroot),
except for the INSTALL kernel name (still gathering opinions for
"rename" approval). I just tested them again (ISO and miniroot)
Without further objections, I will commit it in a few days. It will be
followed by a quick HEADS-UP.
--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost
Index: distrib/amd64/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- distrib/amd64/Makefile 6 Mar 2007 21:52:44 -0000 1.4
+++ distrib/amd64/Makefile 14 Jan 2011 00:25:37 -0000
@@ -4,6 +4,7 @@ SUBDIR=
SUBDIR+= ramdisks
SUBDIR+= .WAIT
SUBDIR+= instkernel
+SUBDIR+= kmod
SUBDIR+= .WAIT
SUBDIR+= cdroms
SUBDIR+= floppies
Index: distrib/amd64/cdroms/Makefile.cdrom
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/Makefile.cdrom,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile.cdrom
--- distrib/amd64/cdroms/Makefile.cdrom 6 Mar 2007 21:52:44 -0000 1.1
+++ distrib/amd64/cdroms/Makefile.cdrom 14 Jan 2011 00:25:37 -0000
@@ -1,4 +1,70 @@
# $NetBSD: Makefile.cdrom,v 1.1 2007/03/06 21:52:44 bouyer 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/chown
+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: distrib/amd64/cdroms/bootcd/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/bootcd/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- distrib/amd64/cdroms/bootcd/Makefile 22 Oct 2008 11:59:24 -0000
1.3
+++ distrib/amd64/cdroms/bootcd/Makefile 14 Jan 2011 00:25:37 -0000
@@ -4,7 +4,6 @@
.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: distrib/amd64/cdroms/bootcd/boot.cfg.in
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/bootcd/boot.cfg.in,v
retrieving revision 1.2
diff -u -p -r1.2 boot.cfg.in
--- distrib/amd64/cdroms/bootcd/boot.cfg.in 25 Oct 2008 18:18:01 -0000
1.2
+++ distrib/amd64/cdroms/bootcd/boot.cfg.in 14 Jan 2011 00:25:37 -0000
@@ -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: distrib/amd64/cdroms/bootcd-com/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/bootcd-com/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- distrib/amd64/cdroms/bootcd-com/Makefile 21 Oct 2009 02:31:44 -0000
1.4
+++ distrib/amd64/cdroms/bootcd-com/Makefile 14 Jan 2011 00:25:37 -0000
@@ -4,7 +4,6 @@
.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: distrib/amd64/cdroms/installcd/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/installcd/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- distrib/amd64/cdroms/installcd/Makefile 1 May 2008 21:59:07 -0000
1.3
+++ distrib/amd64/cdroms/installcd/Makefile 14 Jan 2011 00:25:37 -0000
@@ -1,10 +1,13 @@
# $NetBSD: Makefile,v 1.3 2008/05/01 21:59:07 xtraeme 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: distrib/amd64/cdroms/installcd/boot.cfg.in
===================================================================
RCS file: /cvsroot/src/distrib/amd64/cdroms/installcd/boot.cfg.in,v
retrieving revision 1.2
diff -u -p -r1.2 boot.cfg.in
--- distrib/amd64/cdroms/installcd/boot.cfg.in 22 Oct 2008 12:01:59 -0000
1.2
+++ distrib/amd64/cdroms/installcd/boot.cfg.in 14 Jan 2011 00:25:37 -0000
@@ -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
Index: distrib/amd64/instkernel/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/instkernel/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- distrib/amd64/instkernel/Makefile 22 Nov 2007 21:23:43 -0000 1.3
+++ distrib/amd64/instkernel/Makefile 14 Jan 2011 00:25:37 -0000
@@ -13,10 +13,14 @@ ${V}= ${${V}DIR}/${F}.fs
.endfor
MDSETTARGETS= INSTALL ${RAMDISK} -
+MDSETTARGETS+= GENERIC ${RAMDISK} -
MDSETTARGETS+=INSTALL_XEN3_DOMU ${RAMDISK} -
MDSET_RELEASEDIR= binary/kernel
+# need symbols to load modules. don't actually want image inserted.
+MDSET_NOSTRIP.netbsd-GENERIC=
+MDSET_NOIMAGE.netbsd-GENERIC=
# do not strip Xen kernels, there's no space constraints here.
MDSET_NOSTRIP.netbsd-INSTALL_XEN3_DOMU=
MDSET_NOSYMBOLS.netbsd-INSTALL_XEN3_DOMU=
Index: etc/etc.amd64/Makefile.inc
===================================================================
RCS file: /cvsroot/src/etc/etc.amd64/Makefile.inc,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile.inc
--- etc/etc.amd64/Makefile.inc 18 Mar 2008 04:20:36 -0000 1.11
+++ etc/etc.amd64/Makefile.inc 14 Jan 2011 00:25:39 -0000
@@ -14,9 +14,11 @@ BUILD_KERNELS= INSTALL INSTALL_XEN3_DOM
INSTALLATION_DIRS+= installation/cdrom
INSTALLATION_DIRS+= installation/floppy
INSTALLATION_DIRS+= installation/misc
+INSTALLATION_DIRS+= installation/miniroot
snap_md_post:
cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom
'*.iso'
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy
'*.fs'
+ ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot
'*.*'
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
'*.*'
--- /dev/null 2011-01-14 01:29:05.000000000 +0100
+++ distrib/amd64/kmod/Makefile 2011-01-12 23:59:52.000000000 +0100
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.10 2009/04/03 22:36:35 perry Exp $
+
+.include <bsd.own.mk>
+.include "../../common/Makefile.distrib"
+
+MKMAN= no
+PROG= miniroot.kmod
+
+SRCMOD=
${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+DSTMOD= ${.OBJDIR}/miniroot.kmod
+RAMDISK= ramdisk
+RAMDISKDIR!= cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}
+RAMDISKFS= ${RAMDISKDIR}/${RAMDISK}.fs
+
+miniroot.kmod: ${RAMDISKFS} ${SRCMOD}
+ ${OBJCOPY} --add-section miniroot=${RAMDISKFS} \
+ --set-section-flags miniroot=alloc,contents,load,data \
+ ${SRCMOD} ${DSTMOD}.tmp
+ gzip -9nc < ${DSTMOD}.tmp > ${DSTMOD}
+ rm -f ${DSTMOD}.tmp
+
+.include <bsd.prog.mk>
+
+release: miniroot.kmod
+ ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
+ ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot/
+
--- /dev/null 2011-01-14 01:29:13.000000000 +0100
+++ distrib/amd64/cdroms/etc.ttys 2011-01-12 16:53:17.000000000 +0100
@@ -0,0 +1,7 @@
+# $NetBSD: etc.ttys,v 1.1 2010/04/19 04:41:36 martin Exp $
+#
+# re-launch the sysinst wrapper script on console
+#
+# name getty type status comments
+#
+console "/usr/libexec/getty sysinst" wsvt25 on secure
--- /dev/null 2011-01-14 01:29:13.000000000 +0100
+++ distrib/amd64/cdroms/etc.rc 2011-01-12 16:53:17.000000000 +0100
@@ -0,0 +1,57 @@
+# $NetBSD: etc.rc,v 1.1 2010/04/19 04:41:36 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
+# 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
--- /dev/null 2011-01-14 01:29:35.000000000 +0100
+++ distrib/amd64/cdroms/install.sh 2011-01-13 14:57:58.000000000 +0100
@@ -0,0 +1,85 @@
+#! /bin/sh
+# $NetBSD: install.sh,v 1.1 2010/04/19 04:41:36 martin 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 <martin%NetBSD.org@localhost>.
+#
+# 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
Home |
Main Index |
Thread Index |
Old Index