diff options
Diffstat (limited to 'openembedded/packages/zaurus-updater')
-rwxr-xr-x | openembedded/packages/zaurus-updater/spitz/updater.sh | 26 | ||||
-rw-r--r-- | openembedded/packages/zaurus-updater/zaurus-updater.bb | 11 |
2 files changed, 33 insertions, 4 deletions
diff --git a/openembedded/packages/zaurus-updater/spitz/updater.sh b/openembedded/packages/zaurus-updater/spitz/updater.sh index 73aa12c9a..07d81b1bd 100755 --- a/openembedded/packages/zaurus-updater/spitz/updater.sh +++ b/openembedded/packages/zaurus-updater/spitz/updater.sh @@ -44,7 +44,6 @@ Cleanup(){ rm -f $VTMPNAME > /dev/null 2>&1 rm -f $MTMPNAME > /dev/null 2>&1 rm $CTRLPATH/* > /dev/null 2>&1 - rm $DATAPATH/* > /dev/null 2>&1 exit $1 } trap 'Cleanup 1' 1 15 @@ -82,7 +81,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 +91,23 @@ then done fi +### Check that we have a valid tar +for TARNAME in gnu-tar GNU-TAR +do + if [ -e $DATAPATH/$TARNAME ] + then + TARBIN=$DATAPATH/$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 +259,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 diff --git a/openembedded/packages/zaurus-updater/zaurus-updater.bb b/openembedded/packages/zaurus-updater/zaurus-updater.bb index c4db1055d..7707e48ee 100644 --- a/openembedded/packages/zaurus-updater/zaurus-updater.bb +++ b/openembedded/packages/zaurus-updater/zaurus-updater.bb @@ -3,7 +3,8 @@ DEPENDS = "encdec-updater-native" LICENSE = "zaurus-updater" PR = "r2" -SRC_URI = "file://updater.sh" +SRC_URI = "file://updater.sh \ + file://gnu-tar.gz" S = "${WORKDIR}" do_compile() { @@ -13,6 +14,14 @@ do_compile() { do_deploy() { install -d ${DEPLOY_DIR}/images/ install -m 0755 updater.sh ${DEPLOY_DIR}/images/updater.sh.${MACHINE} + + case ${MACHINE} in + spitz | borzoi ) + install -m 0755 gnu-tar ${DEPLOY_DIR}/images/gnu-tar + ;; + *) + ;; + esac } addtask deploy before do_build after do_compile |