summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2007-12-04 23:48:04 +0000
committerMatthias Hentges <oe@hentges.net>2007-12-04 23:48:04 +0000
commit8eacfa2b31696d75d60e51e909d64da0999fbf8f (patch)
tree22cf37e20468519f560b6b82d3872b25fb402461 /packages
parentf7cdb8de941c09f7e541dbcbc942bc3bd0afce4a (diff)
zaurus-updater: Try to unb0rk the flashing of Akita kernels. Still needs work
Diffstat (limited to 'packages')
-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