Source-Changes-HG archive

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

[src/netbsd-1-5]: src/distrib/x68k/floppies/ramdisk.sysinst Pullup from the t...



details:   https://anonhg.NetBSD.org/src/rev/70996d98f6b9
branches:  netbsd-1-5
changeset: 489334:70996d98f6b9
user:      minoura <minoura%NetBSD.org@localhost>
date:      Thu Aug 31 15:30:46 2000 +0000

description:
Pullup from the trunk.  Approved by thorpej.
  revision 1.6 for /dot.profile
  revision 1.4-1.5 for /installboot.sh
  revision 1.6-1.7 for /list
  revision 1.4-1.5 for /ramdiskbin.conf

Reduce ramdisk size.
 - More limitations to installboot.sh.
 - Use distrib/utils/{more,x_gzip}.
 - Use dmesg(8) instead of kernfs.
 - Remove unused commands.
And support IPv6.

diffstat:

 distrib/x68k/floppies/ramdisk.sysinst/dot.profile     |   7 +-
 distrib/x68k/floppies/ramdisk.sysinst/installboot.sh  |  93 +-----------------
 distrib/x68k/floppies/ramdisk.sysinst/list            |  11 +-
 distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf |  19 ++-
 4 files changed, 22 insertions(+), 108 deletions(-)

diffs (232 lines):

diff -r 6cb66c1a7192 -r 70996d98f6b9 distrib/x68k/floppies/ramdisk.sysinst/dot.profile
--- a/distrib/x68k/floppies/ramdisk.sysinst/dot.profile Thu Aug 31 15:16:43 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/dot.profile Thu Aug 31 15:30:46 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.5 2000/06/14 22:52:49 cgd Exp $
+# $NetBSD: dot.profile,v 1.5.2.1 2000/08/31 15:30:46 minoura Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -60,14 +60,9 @@
        # 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"
 
        # run sysinst.
        sysinst
diff -r 6cb66c1a7192 -r 70996d98f6b9 distrib/x68k/floppies/ramdisk.sysinst/installboot.sh
--- a/distrib/x68k/floppies/ramdisk.sysinst/installboot.sh      Thu Aug 31 15:16:43 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/installboot.sh      Thu Aug 31 15:30:46 2000 +0000
@@ -6,7 +6,7 @@
 #      requires /bin/sh /bin/dd (x_dd) /bin/mkdir /bin/rm /bin/test
 #               /sbin/disklabel
 #
-#      $NetBSD: installboot.sh,v 1.3 2000/06/18 10:33:20 minoura Exp $
+#      $NetBSD: installboot.sh,v 1.3.2.1 2000/08/31 15:30:46 minoura Exp $
 #
 #
 #    originally from:
@@ -21,91 +21,10 @@
 #
 #      NetBSD: installboot.sh,v 1.1 1998/09/01 20:02:34 itohy Exp
 
-usage='echo "usage: $0 [-nvf] /usr/mdec/xxboot /dev/rxx?a"     >&2; exit 1'
-
-blksz=1024
-nblock=8       # boot block in $blksz (8KB)
-rawpart=c
-
 PATH=/bin:/sbin:/usr/bin
 
-# parse options
-dowrite=true
-verbose=false
-force=false
-while (case "$1" in -*) ;; *) exit 1;; esac); do
-       case "$1" in
-       -[nvf]|-[nvf][nvf]|-[nvf][nvf][nvf]|-[nvf][nvf][nvf][nvf]) # enough?
-               case "$1" in *n*) dowrite=false;; esac
-               case "$1" in *v*) verbose=true;; esac
-               case "$1" in *f*) force=true;; esac
-               shift
-               ;;
-       *)
-               eval $usage;;
-       esac
-done
-
-case "$#" in
-2)     ;;
-*)     eval $usage;;
-esac
-
-boot="$1"
-rootdev="$2"
-temp=/tmp/installboot$$
-
-# report error early
-if test ! -f "$boot"; then
-       echo "$boot: file not found"    >&2
-       eval $usage
-fi
-
-# check device so as not to destroy non-BSD partitions
-if test -b "$rootdev"; then
-       echo "$rootdev: is a block special---specify a char special"
-       exit 1
-fi
-if test -c "$rootdev"; then
-       if $force; then :; else         # check if not  -f
-               case "$rootdev" in
-               /dev/rfd??)     # floppies---check disklabel later
-                       echo "$rootdev: floppies are not supported!"
-                       exit 1
-               /dev/r*[a-h])   # SCSI disks
-                       $verbose && echo "checking partition type..."
-                       rawdev="`echo \"$rootdev\" | sed 's/.$/'$rawpart'/'`"
-                       part="`echo \"$rootdev\" | sed 's/^.*\(.\)$/\1/'`"
-                       pinfo="`disklabel \"$rawdev\" | sed '1,/^$/d' |
-                               sed -n -e 's/^#.*/#/p' -e \"/^  $part/p\"`"
-                       $verbose && echo "$pinfo" | sed '/^#/d'
-                       case "$pinfo" in
-                       '#'*' '$part:*4.2BSD*)
-                               $verbose && echo "partition OK"
-                               ;;
-                       '#')    echo "$rootdev: no such partition"      >&2
-                               exit 1;;
-                       '')     echo "$rootdev: can't read disklabel"   >&2
-                               exit 1;;
-                       *)      echo "$rootdev: not a BSD filesystem"   >&2
-                               exit 1;;
-                       esac
-                       ;;
-               /*)             # ???
-                       echo "$rootdev: can't install boot to this device" >&2
-                       exit 1;;
-               *)
-                       echo "$rootdev: not in the absolute path"       >&2
-                       exit 1;;
-               esac
-       fi
-elif test ! -f "$rootdev"; then
-       echo "$rootdev: no such file or character special"      >&2
-       exit 1
-fi
-
-# write boot block
-$verbose && echo "writing $boot to $rootdev"
-cmd="cat $boot /dev/null dd bs=$blksz count=$nblock of=$rootdev"
-$verbose && echo "$cmd"
-if $dowrite; then $cmd; else :; fi
+echo "$0: THIS VERSION OF $0 DOES NO ERROR CHECK!"
+echo "$0: Sleeping for 5 seconds; press ^C to abort."
+echo "===> cat $1 /dev/zero | dd ibs=1 count=8192 obs=512 of=$2"
+sleep 5
+cat $1 /dev/zero | dd ibs=1 count=8192 obs=512 of=$2
diff -r 6cb66c1a7192 -r 70996d98f6b9 distrib/x68k/floppies/ramdisk.sysinst/list
--- a/distrib/x68k/floppies/ramdisk.sysinst/list        Thu Aug 31 15:16:43 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/list        Thu Aug 31 15:30:46 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: list,v 1.5 2000/06/18 10:33:20 minoura Exp $
+#      $NetBSD: list,v 1.5.2.1 2000/08/31 15:30:47 minoura Exp $
 
 # copy the crunched binary, link to it, and kill it
 COPY   ${OBJDIR}/ramdiskbin            ramdiskbin
@@ -16,11 +16,13 @@
 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/sleep
 LINK   ramdiskbin                      bin/stty
 LINK   ramdiskbin                      bin/sync
+LINK   ramdiskbin                      bin/test
+LINK   ramdiskbin                      bin/[
 LINK   ramdiskbin                      sbin/cd9660
 LINK   ramdiskbin                      sbin/disklabel
 LINK   ramdiskbin                      sbin/ffs
@@ -43,14 +45,11 @@
 LINK   ramdiskbin                      sbin/ping
 LINK   ramdiskbin                      sbin/ping6
 LINK   ramdiskbin                      sbin/reboot
-LINK   ramdiskbin                      sbin/restore
 LINK   ramdiskbin                      sbin/route
-LINK   ramdiskbin                      sbin/rrestore
 LINK   ramdiskbin                      sbin/rtsol
 LINK   ramdiskbin                      sbin/shutdown
 LINK   ramdiskbin                      sbin/slattach
 LINK   ramdiskbin                      sbin/swapctl
-LINK   ramdiskbin                      sbin/test
 LINK   ramdiskbin                      sbin/umount
 SYMLINK        /bin/cat                usr/bin/chgrp
 SYMLINK        /bin/cat                usr/bin/ftp
@@ -59,9 +58,7 @@
 SYMLINK        /bin/cat                usr/bin/gzip
 SYMLINK        /bin/cat                usr/bin/less
 SYMLINK        /bin/cat                usr/bin/more
-SYMLINK        /bin/cat                usr/bin/sed
 SYMLINK        /bin/cat                usr/bin/tar
-SYMLINK        /bin/cat                usr/bin/tip
 SYMLINK        /bin/cat                usr/mdec/newdisk
 SYMLINK        /bin/cat                usr/sbin/chown
 SYMLINK        /bin/cat                usr/sbin/chroot
diff -r 6cb66c1a7192 -r 70996d98f6b9 distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf
--- a/distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf     Thu Aug 31 15:16:43 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf     Thu Aug 31 15:30:46 2000 +0000
@@ -1,16 +1,16 @@
-#      $NetBSD: ramdiskbin.conf,v 1.3 2000/06/18 10:33:20 minoura Exp $
+#      $NetBSD: ramdiskbin.conf,v 1.3.2.1 2000/08/31 15:30:47 minoura Exp $
 #
 # ramdiskbin.conf - unified binary for the install ramdisk
 #
 
-srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin sys/arch/x68k/stand
+srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/x68k/stand
 
 progs cat chmod chown chroot cp dd df disklabel ed
-progs fsck fsck_ffs ftp gzip ifconfig init less
+progs fsck fsck_ffs ftp gzip ifconfig init more
 progs ln ls memswitch mkdir mknod mount mount_cd9660 mount_ffs mount_msdos
-progs mount_nfs mount_kernfs mt mv newfs ping pwd rcmd reboot restore rm
-progs route sed sh shutdown slattach stty swapctl sync test pax
-progs tip umount ping6 rtsol
+progs mount_nfs mount_kernfs mt mv newfs ping pwd reboot rm
+progs route sh shutdown slattach sleep stty swapctl sync pax test
+progs umount ping6 rtsol
 progs sysinst
 progs newdisk
 
@@ -23,13 +23,16 @@
 special ping srcdir distrib/utils/x_ping
 special route srcdir distrib/utils/x_route
 special sh srcdir distrib/utils/x_sh
+special gzip srcdir distrib/utils/x_gzip
+special more srcdir distrib/utils/more
 special ping6 srcdir distrib/utils/x_ping6
 
 ln pax tar
 ln chown chgrp
 ln gzip gzcat gunzip
-ln less more
+ln more less
 ln sh -sh              # init invokes the shell this way
+ln test [
 ln mount_cd9660 cd9660
 ln mount_ffs ffs
 ln mount_msdos msdos
@@ -38,4 +41,4 @@
 ln reboot halt
 
 # libhack.o is built by Makefile & included Makefile.inc
-libs libhack.o -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm
+libs libhack.o -lz -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm



Home | Main Index | Thread Index | Old Index