summaryrefslogtreecommitdiff
path: root/packages/zaurus-updater/spitz
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2005-09-11 19:29:12 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-09-11 19:29:12 +0000
commit5bab83c6066bec5243b74e0842d6017e345fa141 (patch)
tree18f1e0be615b0971b7cf21036118e5c713135361 /packages/zaurus-updater/spitz
parent39c4dfc4f4d95abef3a32cb4197a693d2789b410 (diff)
zaurus-updater: The tar utility found on the Sharp inbuilt root filesystems used for reflashing the devices has bugs, one being that it won't create device files. We therefore need an external sane tar binary to successfully extract the root filesystem onto the device. This adds such a binary for spitz and borzoi.
Diffstat (limited to 'packages/zaurus-updater/spitz')
-rwxr-xr-xpackages/zaurus-updater/spitz/updater.sh25
1 files changed, 23 insertions, 2 deletions
diff --git a/packages/zaurus-updater/spitz/updater.sh b/packages/zaurus-updater/spitz/updater.sh
index 73aa12c9a7..a0483a1371 100755
--- a/packages/zaurus-updater/spitz/updater.sh
+++ b/packages/zaurus-updater/spitz/updater.sh
@@ -82,7 +82,7 @@ fi
### Check model ###
/sbin/writerominfo
MODEL=`cat /proc/deviceinfo/product`
-if [ "$MODEL" != "SL-C3000" ]
+if [ "$MODEL" != "SL-C3000" ] && [ "$MODEL" != "SL-C3100" ]
then
echo 'MODEL:'$MODEL
echo 'ERROR:Invalid model!'
@@ -92,6 +92,23 @@ then
done
fi
+### Check that we have a valid tar
+for TARNAME in gnu-tar GNU-TAR
+do
+ if [ -e /mnt/cf/$TARNAME ]
+ then
+ TARBIN=/mnt/cf/$TARNAME
+ fi
+done
+
+if [ ! -e $TARBIN ]; then
+ echo 'Please place a valid copy of tar as "gnu-tar" on your card'
+ echo 'Please reset'
+ while true
+ do
+ done
+fi
+
mkdir -p $TMPPATH > /dev/null 2>&1
cd $DATAPATH/
@@ -243,13 +260,17 @@ do
cd /hdd1
echo 'Now extracting...'
- gzip -dc $DATAPATH/$TARGETFILE | tar xf -
+ gzip -dc $DATAPATH/$TARGETFILE | $TARBIN xf -
if [ "$?" != "0" ]; then
echo "Error!"
exit "$?"
fi
echo 'Success!'
+
+ #This can be useful for debugging
+ #/bin/sh -i
+
# remount as RO
cd /
umount /hdd1