diff options
Diffstat (limited to 'scripts/arcboot')
-rw-r--r-- | scripts/arcboot | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/arcboot b/scripts/arcboot index 6fe5623..344444d 100644 --- a/scripts/arcboot +++ b/scripts/arcboot @@ -4,10 +4,24 @@ DVHTOOL=/usr/sbin/dvhtool ARCBOOT_IMG=/usr/lib/arcboot/arcboot.ip22 ARCBOOT_CONF=/etc/arcboot.conf -# Use the ip32 image if we're on an O2 -if grep -E -qs '^system type[[:space:]]*: SGI (IP32|O2)' /proc/cpuinfo; then - ARCBOOT_IMG=/usr/lib/arcboot/arcboot.ip32 -fi +# system type : RM200-C40 +SYSTYPE=`sed -ne '/^system type/ { s/.*: //; p; }' </proc/cpuinfo` + +case "$SYSTYPE" in + SGI\ IP32*|SGI\ O2*) + ARCBOOT_IMG=/usr/lib/arcboot/arcboot.ip32 + VHNAME=arcboot + ;; + RM*) + # We make it aboot as the SNI RM environment in the prom is + # limited to very little chars so we need to make it shorter + ARCBOOT_IMG=/usr/lib/arcboot/arcboot.snirm + VHNAME=aboot + ;; + *) + ARCBOOT_IMG=/usr/lib/arcboot/arcboot.ip22 + VHNAME=arcboot +esac if [ ! -r $ARCBOOT_CONF ]; then echo "No $ARCBOOT_CONF - giving up!" @@ -24,8 +38,8 @@ if [ -z "$1" ]; then exit 1 fi -echo -n "Putting `basename $ARCBOOT_IMG` into the volume header of $1..." -$DVHTOOL -d $1 --unix-to-vh $ARCBOOT_IMG arcboot +echo -n "Putting `basename $ARCBOOT_IMG` into the volume header of $1 as $VHNAME ..." +$DVHTOOL -d $1 --unix-to-vh $ARCBOOT_IMG $VHNAME echo "done." # check if the "image=" lines in $ARCBOOT_IMG refer to valid ELF images |