aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Lohoff <flo@rfc822.org>2008-11-30 10:16:58 +0000
committerGuido G√ľnther <agx@sigxcpu.org>2009-04-26 15:27:55 +0200
commitb308f65c2554a3cd64246b69f1a691800f104328 (patch)
treedb85576175cbf647f3693f896f87f7e3557c1655
parentcdacf991017dfc45e8bc16ffd9c70c06ed27db7a (diff)
Build arcboot.snirm and install it when on SNI RMsnirm
-rwxr-xr-xdebian/rules8
-rw-r--r--scripts/arcboot26
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