summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2007-12-05 00:13:30 +0000
committerMichael Lauer <mickey@vanille-media.de>2007-12-05 00:13:30 +0000
commite6b68ae095a61a271a1191e4fc0945042bc4a754 (patch)
tree553ea71392dee2a7dc1572407bb8338dda7e716a
parentdc54a3030e02d338c5ba84e68aaf604a0bcda65f (diff)
parent8eacfa2b31696d75d60e51e909d64da0999fbf8f (diff)
merge of 'bf13c465f9f4c46132e74d7e9b93c2d1feb84ac6'
and 'c44db3b9dd388ba7d6071532d6536625c571b3bd'
-rw-r--r--packages/zaurus-updater/zaurus-updater.bb2
-rw-r--r--packages/zaurus-updater/zaurus-updater/updater.sh82
2 files changed, 49 insertions, 35 deletions
diff --git a/packages/zaurus-updater/zaurus-updater.bb b/packages/zaurus-updater/zaurus-updater.bb
index ee4c85e646..cb52c55530 100644
--- a/packages/zaurus-updater/zaurus-updater.bb
+++ b/packages/zaurus-updater/zaurus-updater.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Encrypted shellscript for the Zaurus ROM update"
DEPENDS = "encdec-updater-native"
LICENSE = "zaurus-updater"
-PR = "r13"
+PR = "r14"
PACKAGES = ""
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/zaurus-updater/zaurus-updater/updater.sh b/packages/zaurus-updater/zaurus-updater/updater.sh
index 709cbbc9a9..178fcee8f5 100644
--- a/packages/zaurus-updater/zaurus-updater/updater.sh
+++ b/packages/zaurus-updater/zaurus-updater/updater.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-
#
# One updater.sh to rule them all
#
@@ -22,10 +21,14 @@
#
# 2007.11.23 Koen Kooi
# - consistent error messages
-## - fix flashing from case sensitive filesystem (e.g. ext2)
+# - fix flashing from case sensitive filesystem (e.g. ext2)
+#
# 2007.11.23 Matthias 'CoreDump' Hentges
# - Always treat MTD_PART_SIZE as HEX when comparing sizes
# - Thanks to ZeroChaos for debugging
+#
+# 2007.12.04 Matthias 'CoreDump' Hentges
+# - Unb0rk flashing of Akita kernels
DATAPATH=$1
TMPPATH=/tmp/update
@@ -190,42 +193,53 @@ do_flashing()
/sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MTD_PART_SIZE > /dev/null 2>&1
fi
- #loop
- while [ $DATAPOS -lt $DATASIZE ]
- do
- #data create
- bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
- TMPSIZE=`wc -c $TMPDATA`
- TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
- DATAPOS=`expr $DATAPOS + $TMPSIZE`
-
- #handle data file
- if [ $ISLOGICAL = 0 ]
- then
- next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
- if [ "$next_addr" = "" ]; then
- echo "Error: flash write"
- rm $TMPDATA > /dev/null 2>&1
- RESULT=3
- break;
+ # Looks like Akita is quite unique when it comes to kernel flashing
+
+ if [ "$ZAURUS" = "akita" ] && [ $FLASH_TYPE = kernel ]; then
+ echo "Note: Flashing Akita kernel"
+ echo $TARGETFILE':'$DATASIZE'bytes'
+ echo ' ' > /tmp/data
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0x60100 16 /tmp/data > /dev/null 2>&1
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0xe0000 $DATASIZE $TARGETFILE > /dev/null 2>&1
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0x21bff0 16 /tmp/data > /dev/null 2>&1
+ echo "Kernel: Finished"
+ else
+ #loop
+ while [ $DATAPOS -lt $DATASIZE ]
+ do
+ #data create
+ bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
+ TMPSIZE=`wc -c $TMPDATA`
+ TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
+ DATAPOS=`expr $DATAPOS + $TMPSIZE`
+
+ #handle data file
+ if [ $ISLOGICAL = 0 ]
+ then
+ next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
+ if [ "$next_addr" = "" ]; then
+ echo "Error: flash write"
+ rm $TMPDATA > /dev/null 2>&1
+ RESULT=3
+ break;
+ fi
+ ADDR=$next_addr
+ else
+ /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
+ ADDR=`expr $ADDR + $TMPSIZE`
fi
- ADDR=$next_addr
- else
- /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
- ADDR=`expr $ADDR + $TMPSIZE`
- fi
- rm $TMPDATA > /dev/null 2>&1
+ rm $TMPDATA > /dev/null 2>&1
- #progress
- SPNUM=0
- while [ $SPNUM -lt $PROGSTEP ]
- do
- echo -n '.'
- SPNUM=`expr $SPNUM + 1`
+ #progress
+ SPNUM=0
+ while [ $SPNUM -lt $PROGSTEP ]
+ do
+ echo -n '.'
+ SPNUM=`expr $SPNUM + 1`
+ done
done
- done
-
+ fi
echo ''
#finish