Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/sparc/stand/binstall pull up 1.5, 1.6, 1.7. a...
details: https://anonhg.NetBSD.org/src/rev/8ba8ba6ef1c4
branches: netbsd-1-5
changeset: 489243:8ba8ba6ef1c4
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Aug 26 00:08:45 2000 +0000
description:
pull up 1.5, 1.6, 1.7. approved by thorpej:
1.5
>add sparc64 support.
1.6
>remove some ".sparc64" file suffixes that are not necessary.
1.7
>fix ultrasparc support.
diffstat:
sys/arch/sparc/stand/binstall/binstall.sh | 45 ++++++++++++++++++++++++------
1 files changed, 35 insertions(+), 10 deletions(-)
diffs (109 lines):
diff -r 411e425e5fdd -r 8ba8ba6ef1c4 sys/arch/sparc/stand/binstall/binstall.sh
--- a/sys/arch/sparc/stand/binstall/binstall.sh Sat Aug 26 00:05:15 2000 +0000
+++ b/sys/arch/sparc/stand/binstall/binstall.sh Sat Aug 26 00:08:45 2000 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: binstall.sh,v 1.4 2000/02/15 16:15:07 pk Exp $
+# $NetBSD: binstall.sh,v 1.4.4.1 2000/08/26 00:08:45 mrg Exp $
#
vecho () {
@@ -11,7 +11,7 @@
}
Usage () {
- echo "Usage: $0 [-hvt] [-m<path>] net|ffs directory"
+ echo "Usage: $0 [-hvtuU] [-m<path>] net|ffs directory"
exit 1
}
@@ -24,6 +24,8 @@
echo "the appropriate filesystem partition."
echo "Options:"
echo " -h - display this message"
+ echo " -u - install sparc64 (UltraSPARC) boot block"
+ echo " -U - install sparc boot block"
echo " -b<bootprog> - second-stage boot program to install"
echo " -m<path> - Look for boot programs in <path> (default: /usr/mdec)"
echo " -v - verbose mode"
@@ -40,12 +42,18 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
MDEC=${MDEC:-/usr/mdec}
BOOTPROG=${BOOTPROG:-boot}
+OFWBOOT=${OFWBOOTBLK:-ofwboot}
+if [ "`sysctl -n hw.machine`" = sparc64 ]; then
+ ULTRASPARC=1
+else
+ ULTRASPARC=0
+fi
if [ "`sysctl -n kern.securelevel`" -gt 0 ]; then
Secure
fi
-set -- `getopt "b:hm:tv" "$@"`
+set -- `getopt "b:hm:tvuU" "$@"`
if [ $? -gt 0 ]; then
Usage
fi
@@ -54,7 +62,9 @@
do
case $1 in
-h) Help; shift ;;
- -b) BOOTPROG=$2; shift 2 ;;
+ -u) ULTRASPARC=1; shift ;;
+ -U) ULTRASPARC=0; shift ;;
+ -b) BOOTPROG=$2; OFWBOOT=$2; shift 2 ;;
-m) MDEC=$2; shift 2 ;;
-t) TEST=1; VERBOSE=1; shift ;;
-v) VERBOSE=1; shift ;;
@@ -76,8 +86,18 @@
Usage
fi
+SKIP=0
-SKIP=0
+if [ "$ULTRASPARC" = "1" ]; then
+ targ=ofwboot
+ netboot=ofwboot.net
+ nettarg=boot.sparc.netbsd
+ BOOTPROG=$OFWBOOT
+else
+ targ=boot
+ netboot=boot.net
+ nettarg=boot.sparc64.netbsd
+fi
case $WHAT in
"ffs")
@@ -100,19 +120,24 @@
echo "Cannot find \"$DEST\" in mount table"
exit 1
fi
- TARGET=$DEST/boot
+ TARGET=$DEST/$targ
vecho Boot device: $DEV
vecho Target: $TARGET
$DOIT dd if=${MDEC}/${BOOTPROG} of=$TARGET bs=32 skip=$SKIP
sync; sync; sync
- vecho ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV
- $DOIT ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV
+ if [ "$ULTRASPARC" = "1" ]; then
+ vecho ${MDEC}/installboot -u ${VERBOSE:+-v} ${MDEC}/bootblk $DEV
+ $DOIT ${MDEC}/installboot -u ${VERBOSE:+-v} ${MDEC}/bootblk $DEV
+ else
+ vecho ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV
+ $DOIT ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV
+ fi
;;
"net")
- TARGET=$DEST/boot.sparc.netbsd
+ TARGET=$DEST/$nettarg
vecho Target: $TARGET
- cp -f ${MDEC}/boot.net $TARGET
+ $DOIT cp -f ${MDEC}/$netboot $TARGET
;;
*)
Home |
Main Index |
Thread Index |
Old Index