diff options
-rwxr-xr-x | debian/rules | 8 | ||||
-rw-r--r-- | scripts/arcboot | 26 |
2 files changed, 27 insertions, 7 deletions
diff --git a/debian/rules b/debian/rules index ed88571..8975897 100755 --- a/debian/rules +++ b/debian/rules @@ -52,6 +52,11 @@ build-stamp: cp tip22/ld.script ld.script.IP22 cp tip22/tftpload.o tftpload.IP22.o + $(MAKE) clean-subarch-dep + $(MAKE) SUBARCH=SNIRM build-subarch-dep + + cp ext2load/ext2load arcboot.snirm + touch build-stamp clean: @@ -60,7 +65,7 @@ clean: # Add here commands to clean up after the build process. $(MAKE) clean - rm -f arcboot.ip22 arcboot.ip32 + rm -f arcboot.ip22 arcboot.ip32 arcboot.snirm rm -f ld.script.IP22 ld.ramdisk.script.IP22 ld.kernel.script.IP22 tftpload.IP22.o rm -f ld.script.IP32 ld.ramdisk.script.IP32 ld.kernel.script.IP32 tftpload.IP32.o @@ -75,6 +80,7 @@ install: build # install arcboot into debian/arcboot install -m 644 arcboot.ip32 ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.ip32 install -m 644 arcboot.ip22 ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.ip22 + install -m 644 arcboot.snirm ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.snirm install -m 755 scripts/arcboot ${PREFIX_ARCB}/${BIN_ARCB}/arcboot install -m 644 tftpload.IP32.o ${PREFIX_TIP22}/${LIB_TIP22}/tftpload.IP32.o 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 |