Omit specifying the secondary bootloader on the installboot command line

for sparc64 systems.  This should fix PR#33987.

Also adapt to the way sparc64 32-bit kernels now report its CPU
architecture -- these still need the sparc64 boot loader, but now
report hw.machine = sparc.  Adapt by testing machdep.cpu_arch
instead.

Hints from martin and mrg.
This commit is contained in:
he 2006-07-12 21:34:45 +00:00
parent 40bedaf4c8
commit 7a66dda031
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: binstall.sh,v 1.14 2005/12/11 12:19:08 christos Exp $
# $NetBSD: binstall.sh,v 1.15 2006/07/12 21:34:45 he Exp $
#
vecho () {
@ -52,7 +52,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
: ${INSTALLBOOT:=/usr/sbin/installboot}
: ${BOOTPROG:=boot}
: ${OFWBOOTBLK:=ofwboot}
if [ "`sysctl -n hw.machine`" = sparc64 ]; then
if [ "`sysctl -n machdep.cpu_arch`" = 9 ]; then
ULTRASPARC=1
else
ULTRASPARC=0
@ -100,12 +100,14 @@ fi
if [ "$ULTRASPARC" = "1" ]; then
machine=sparc64
targ=ofwboot
stage2=""
netboot=ofwboot
BOOTPROG=$OFWBOOTBLK
BOOTXX=${MDEC}/bootblk
else
machine=sparc
targ=boot
stage2=${targ}
netboot=boot.net
BOOTXX=${MDEC}/bootxx
fi
@ -141,8 +143,8 @@ case $WHAT in
$DOIT cp -p -f ${MDEC}/${BOOTPROG} $DEST/$targ
sync; sync; sync
vecho ${INSTALLBOOT} ${VERBOSE:+-v} -m $machine $DEV ${BOOTXX} $targ
$DOIT ${INSTALLBOOT} ${VERBOSE:+-v} -m $machine $DEV ${BOOTXX} $targ
vecho ${INSTALLBOOT} ${VERBOSE:+-v} -m $machine $DEV ${BOOTXX} $stage2
$DOIT ${INSTALLBOOT} ${VERBOSE:+-v} -m $machine $DEV ${BOOTXX} $stage2
;;
"net")