Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/i386/floppies Add construction of three types of "re...



details:   https://anonhg.NetBSD.org/src/rev/a11896894147
branches:  trunk
changeset: 487651:a11896894147
user:      he <he%NetBSD.org@localhost>
date:      Sat Jun 10 18:56:47 2000 +0000

description:
Add construction of three types of "rescue" images, based on the
boot images.

The difference compared to the boot images is that these do not contain
sysinst, but do on the other hand contain dump/rdump, restore/rrestore,
scsictl and chio in addition to the other stuff already on the install
floppies.

The images built are
        rescue1.fs
        rescue2.fs      Based on the full INSTALL kernel, on two floppies
        rescue-sm.fs    Based on INSTALL_SMALL
        rescue-ti.fs    Based on INSTALL_TINY

diffstat:

 distrib/i386/floppies/Makefile                       |    6 +-
 distrib/i386/floppies/ramdisk-rescue/Makefile        |   78 ++++++++++++++
 distrib/i386/floppies/ramdisk-rescue/Makefile.inc    |   53 +++++++++
 distrib/i386/floppies/ramdisk-rescue/dot.profile     |   72 +++++++++++++
 distrib/i386/floppies/ramdisk-rescue/list            |  104 +++++++++++++++++++
 distrib/i386/floppies/ramdisk-rescue/mtree.conf      |   82 ++++++++++++++
 distrib/i386/floppies/ramdisk-rescue/ramdiskbin.conf |   45 ++++++++
 distrib/i386/floppies/ramdisk-rescue/termcap.mini    |   61 +++++++++++
 distrib/i386/floppies/rescue-fdset/Makefile          |   17 +++
 distrib/i386/floppies/rescue-kernel/Makefile         |   40 +++++++
 distrib/i386/floppies/rescue-small/Makefile          |   21 +++
 distrib/i386/floppies/rescue-tiny/Makefile           |   21 +++
 12 files changed, 599 insertions(+), 1 deletions(-)

diffs (truncated from 658 to 300 lines):

diff -r 9f66e54d7aaa -r a11896894147 distrib/i386/floppies/Makefile
--- a/distrib/i386/floppies/Makefile    Sat Jun 10 18:52:45 2000 +0000
+++ b/distrib/i386/floppies/Makefile    Sat Jun 10 18:56:47 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.16 2000/05/10 23:44:51 hubertf Exp $
+#      $NetBSD: Makefile,v 1.17 2000/06/10 18:56:47 he Exp $
 
 SUBDIR=                ramdisk
 SUBDIR+=       ramdisk-kernel
@@ -7,6 +7,10 @@
 SUBDIR+=       bootfloppy-small
 SUBDIR+=       bootfloppy-tiny
 
+SUBDIR+=       ramdisk-rescue
+SUBDIR+=       rescue-kernel
+SUBDIR+=       rescue-fdset rescue-small rescue-tiny
+
 TARGETS+=release
 
 .include <bsd.subdir.mk>
diff -r 9f66e54d7aaa -r a11896894147 distrib/i386/floppies/ramdisk-rescue/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/i386/floppies/ramdisk-rescue/Makefile     Sat Jun 10 18:56:47 2000 +0000
@@ -0,0 +1,78 @@
+#      $NetBSD: Makefile,v 1.1 2000/06/10 18:56:48 he Exp $
+
+TOP=           ${.CURDIR}/..
+WARNS=1
+
+.include "${TOP}/Makefile.inc"
+IMAGE=         ramdisk.fs
+
+AUXDEPENDS=    dot.profile termcap.mini
+
+CBIN=          ramdiskbin
+
+MOUNT_POINT?=  /mnt
+# DEV/RDEV file system device, CDEV/RDEV vnconfig device
+VND?=          vnd0
+VND_DEV=       /dev/${VND}a
+VND_RDEV=      /dev/r${VND}a
+VND_CDEV=      /dev/${VND}d
+VND_CRDEV=     /dev/r${VND}d
+IMAGE?=                xxx.fs
+MDEC=          ${DESTDIR}/usr/mdec
+
+LISTS=         list
+CRUNCHCONF=    ${CBIN}.conf
+MTREE=         mtree.conf
+
+RAMDISKSPC=    128
+RAMDISKCYLS=   24
+RAMDISKSIZE!=  expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
+
+realall: ${IMAGE}
+
+${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS}
+       dd if=/dev/zero of=${IMAGE} count=${RAMDISKSIZE}
+       vnconfig -v -c ${VND_CDEV} ${IMAGE} 512/${RAMDISKSPC}/1/${RAMDISKCYLS}
+       -disklabel ${VND_CDEV} >tmplabel
+       disklabel -r -R ${VND_CDEV} tmplabel
+       newfs -B le -m 0 -o space -i 3950 -c 80 ${VND_RDEV} 
+       mount ${VND_DEV} ${MOUNT_POINT}
+       mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -U
+       TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+           TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
+       @echo ""
+       @df -i ${MOUNT_POINT}
+       @echo ""
+       umount ${MOUNT_POINT}
+       vnconfig -u ${VND_CDEV}
+
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND_DEV}
+       -/bin/rm -f ${IMAGE}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+       crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+       make -f ${CBIN}.mk all
+
+# This is listed in ramdiskbin.conf but is built here.
+${CBIN}: libhack.o
+
+# Use stubs to eliminate some large stuff from libc
+HACKSRC=${TOP}/../../utils/libhack
+.include "${HACKSRC}/Makefile.inc"
+
+# turn off small gethostby*
+HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
+
+release:
+
+clean cleandir distclean:
+       /bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
+.include <bsd.sys.mk>
diff -r 9f66e54d7aaa -r a11896894147 distrib/i386/floppies/ramdisk-rescue/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/i386/floppies/ramdisk-rescue/Makefile.inc Sat Jun 10 18:56:47 2000 +0000
@@ -0,0 +1,53 @@
+#      $NetBSD: Makefile.inc,v 1.1 2000/06/10 18:56:48 he Exp $
+
+# TOP is assumed to be defined by Makefile including this one.
+
+CBIN=          ramdiskbin
+COMMONDIR=     ${TOP}/ramdisk-common
+
+MOUNT_POINT?=  /mnt
+VND?=          vnd0
+VND_DEV=       /dev/${VND}a
+VND_RDEV=      /dev/r${VND}a
+VND_CDEV=      /dev/${VND}d
+VND_CRDEV=     /dev/r${VND}d
+IMAGE?=                xxx.fs
+MDEC=          ${DESTDIR}/usr/mdec
+
+LISTS=         ${COMMONDIR}/list ${.CURDIR}/list
+CRUNCHCONF=    ${COMMONDIR}/${CBIN}.conf
+MTREE=         ${COMMONDIR}/mtree.conf
+
+DISKTYPE=      floppy3
+
+realall: ${AUXTARGETS} ${CBIN} 
+       dd if=/dev/zero of=${IMAGE} count=3072
+       vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
+       disklabel -rw ${VND_CDEV} ${DISKTYPE}
+       newfs -B le -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
+       mount ${VND_DEV} ${MOUNT_POINT}
+       mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
+       TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+           TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
+       @echo ""
+       @df -i ${MOUNT_POINT}
+       @echo ""
+       umount ${MOUNT_POINT}
+       vnconfig -u ${VND_CDEV}
+
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND_DEV}
+       -/bin/rm -f ${IMAGE}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+       crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+       make -f ${CBIN}.mk all
+
+clean cleandir distclean:
+       /bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff -r 9f66e54d7aaa -r a11896894147 distrib/i386/floppies/ramdisk-rescue/dot.profile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/i386/floppies/ramdisk-rescue/dot.profile  Sat Jun 10 18:56:47 2000 +0000
@@ -0,0 +1,72 @@
+#      $NetBSD: dot.profile,v 1.1 2000/06/10 18:56:48 he Exp $
+#
+# Copyright (c) 1994 Christopher G. Demetriou
+# Copyright (c) 1997 Perry E. Metzger
+# 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=pc3
+export TERM
+HOME=/
+export HOME
+BLOCKSIZE=1k
+export BLOCKSIZE
+EDITOR=ed
+export EDITOR
+
+umask 022
+
+ROOTDEV=/dev/md0a
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+       export DONEPROFILE
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+       echo ''
+
+       # mount the ramdisk read write
+       mount -u $ROOTDEV /
+
+       # mount the kern_fs so that we can examine the dmesg state
+       mount -t kernfs /kern /kern
+
+       # pull in the functions that people will use from the shell prompt.
+       # . /.commonutils
+       # . /.instutils
+       dmesg() cat /kern/msgbuf
+       grep() sed -n "/$1/p"
+
+       echo "This image contains utilities which may be needed"
+       echo "to get you out of a pinch."
+
+fi
diff -r 9f66e54d7aaa -r a11896894147 distrib/i386/floppies/ramdisk-rescue/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/i386/floppies/ramdisk-rescue/list Sat Jun 10 18:56:47 2000 +0000
@@ -0,0 +1,104 @@
+#      $NetBSD: list,v 1.1 2000/06/10 18:56:48 he Exp $
+
+# copy the crunched binary, link to it, and kill it
+COPY   ${OBJDIR}/ramdiskbin            ramdiskbin
+LINK   ramdiskbin                      bin/cat
+LINK   ramdiskbin                      bin/chio
+LINK   ramdiskbin                      bin/chmod
+LINK   ramdiskbin                      bin/cp
+LINK   ramdiskbin                      bin/dd
+LINK   ramdiskbin                      bin/df
+LINK   ramdiskbin                      bin/ed
+LINK   ramdiskbin                      bin/ln
+LINK   ramdiskbin                      bin/ls
+LINK   ramdiskbin                      bin/mkdir
+LINK   ramdiskbin                      bin/mt
+LINK   ramdiskbin                      bin/mv
+LINK   ramdiskbin                      bin/pax
+LINK   ramdiskbin                      bin/pwd
+LINK   ramdiskbin                      bin/rcmd
+LINK   ramdiskbin                      bin/rm
+LINK   ramdiskbin                      bin/sh
+LINK   ramdiskbin                      bin/stty
+LINK   ramdiskbin                      bin/sync
+LINK   ramdiskbin                      sbin/cd9660
+LINK   ramdiskbin                      sbin/disklabel
+LINK   ramdiskbin                      sbin/dump
+LINK   ramdiskbin                      sbin/fdisk
+LINK   ramdiskbin                      sbin/ffs
+LINK   ramdiskbin                      sbin/fsck
+LINK   ramdiskbin                      sbin/fsck_ffs
+LINK   ramdiskbin                      sbin/halt
+LINK   ramdiskbin                      sbin/ifconfig
+LINK   ramdiskbin                      sbin/init
+LINK   ramdiskbin                      sbin/kernfs
+LINK   ramdiskbin                      sbin/mbrlabel
+LINK   ramdiskbin                      sbin/mknod
+LINK   ramdiskbin                      sbin/mount
+LINK   ramdiskbin                      sbin/mount_cd9660
+LINK   ramdiskbin                      sbin/mount_ext2fs
+LINK   ramdiskbin                      sbin/mount_ffs
+LINK   ramdiskbin                      sbin/mount_kernfs
+LINK   ramdiskbin                      sbin/mount_msdos
+LINK   ramdiskbin                      sbin/mount_nfs
+LINK   ramdiskbin                      sbin/mount_ntfs
+LINK   ramdiskbin                      sbin/msdos
+LINK   ramdiskbin                      sbin/newfs
+LINK   ramdiskbin                      sbin/nfs
+LINK   ramdiskbin                      sbin/ntfs
+LINK   ramdiskbin                      sbin/ping
+LINK   ramdiskbin                      sbin/ping6
+LINK   ramdiskbin                      sbin/rdump
+LINK   ramdiskbin                      sbin/reboot
+LINK   ramdiskbin                      sbin/restore
+LINK   ramdiskbin                      sbin/route
+LINK   ramdiskbin                      sbin/rrestore
+LINK   ramdiskbin                      sbin/rtsol
+LINK   ramdiskbin                      sbin/scsictl
+LINK   ramdiskbin                      sbin/shutdown
+LINK   ramdiskbin                      sbin/slattach
+LINK   ramdiskbin                      sbin/swapctl
+LINK   ramdiskbin                      sbin/umount



Home | Main Index | Thread Index | Old Index