diff options
author | Florian Lohoff <flo@rfc822.org> | 2008-11-30 10:16:58 +0000 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-04-26 15:27:55 +0200 |
commit | b308f65c2554a3cd64246b69f1a691800f104328 (patch) | |
tree | db85576175cbf647f3693f896f87f7e3557c1655 /scripts/arcboot | |
parent | cdacf991017dfc45e8bc16ffd9c70c06ed27db7a (diff) |
Build arcboot.snirm and install it when on SNI RMsnirm
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 |