summaryrefslogtreecommitdiff
path: root/packages/zaurus-updater
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
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')
-rw-r--r--packages/zaurus-updater/files/gnu-tar.gzbin0 -> 242146 bytes
-rwxr-xr-xpackages/zaurus-updater/spitz/updater.sh25
-rw-r--r--packages/zaurus-updater/zaurus-updater.bb11
3 files changed, 33 insertions, 3 deletions
diff --git a/packages/zaurus-updater/files/gnu-tar.gz b/packages/zaurus-updater/files/gnu-tar.gz
new file mode 100644
index 0000000000..93d1a43704
--- /dev/null
+++ b/packages/zaurus-updater/files/gnu-tar.gz
Binary files differ
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
diff --git a/packages/zaurus-updater/zaurus-updater.bb b/packages/zaurus-updater/zaurus-updater.bb
index c4db1055d5..7707e48eeb 100644
--- a/packages/zaurus-updater/zaurus-updater.bb
+++ b/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