aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2017-05-13 14:21:58 +0200
committerAndrea Adami <andrea.adami@gmail.com>2017-05-14 01:32:35 +0200
commit868620e157d1e26f4755f01120aecd69c985c396 (patch)
tree2b5c031768f38c2603ba3b4345d3611d6c8d7db8
parentf52935969ea515ec6f6b30fd87288fe1b9c33998 (diff)
downloadmeta-handheld-868620e157d1e26f4755f01120aecd69c985c396.tar.gz
meta-handheld-868620e157d1e26f4755f01120aecd69c985c396.tar.bz2
meta-handheld-868620e157d1e26f4755f01120aecd69c985c396.zip
zaurus-updater: support flashing of Cacko's mainte_fix.bin
Only for 128M clamshell models. This is necessary if you want to change rootfs size over 64 MB. It is flashed in the first 256k of the nand and overwrites the first 64k of the Parameter Area (AdjValue, BootFlag, Version, Clock). Version is included so verchg is not necessary. Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
-rw-r--r--recipes-bsp/zaurus-utils/zaurus-updater/updater.sh36
1 files changed, 35 insertions, 1 deletions
diff --git a/recipes-bsp/zaurus-utils/zaurus-updater/updater.sh b/recipes-bsp/zaurus-utils/zaurus-updater/updater.sh
index d724a48..f638420 100644
--- a/recipes-bsp/zaurus-utils/zaurus-updater/updater.sh
+++ b/recipes-bsp/zaurus-utils/zaurus-updater/updater.sh
@@ -63,6 +63,7 @@ TMPPATH=/tmp/update
TMPDATA=$TMPPATH/tmpdata.bin
TMPHEAD=$TMPPATH/tmphead.bin
+FLASHED_MAINTE=0
FLASHED_KERNEL=0
FLASHED_ROOTFS=0
FLASHED_HOMEFS=0
@@ -362,6 +363,29 @@ update_uboot() {
fi
}
+mainte_fix()
+{
+# binaries taken from Cacko 1.23 installer
+case "$MODEL" in
+ SL-C760|SL-C860|SL-C1000|SL-C3100|SL-C3200)
+ echo -n 'Flashing Mainte fix for 128M flash...'
+ if ( /sbin/nandlogical $LOGOCAL_MTD WRITE 0x00, 327680, $TARGETFILE ) > /dev/null 2>&1
+ then
+ echo 'done'
+ # unnecessary fix for FSRW end addr / size ? (kernel parser sharpslpart ignores it)
+ # OUTFILE=$TMPPATH/128M_fix.bin
+ # printf '\x08' > $OUTFILE
+ # /sbin/nandlogical $LOGOCAL_MTD WRITE 0x60027, 1, $OUTFILE > /dev/null 2>&1
+ # /sbin/nandlogical $LOGOCAL_MTD WRITE 0x64027, 1, $OUTFILE > /dev/null 2>&1
+ # rm -f $OUTFILE > /dev/null 2>&1
+ exit 0
+ fi
+ ;;
+ *)
+ ;;
+esac
+}
+
### Check model ###
/sbin/writerominfo
MODEL=`cat /proc/deviceinfo/product`
@@ -403,7 +427,8 @@ mkdir -p $TMPPATH > /dev/null 2>&1
cd $DATAPATH/
for TARGETFILE in u-boot.bin U-BOOT.BIN zimage zImage zImage.bin zimage.bin ZIMAGE ZIMAGE.BIN \
- initrd.bin INITRD.BIN hdimage1.tgz HDIMAGE1.TGZ home.bin HOME.BIN
+ initrd.bin INITRD.BIN hdimage1.tgz HDIMAGE1.TGZ home.bin HOME.BIN \
+ mainte_fix.bin MAINTE_FIX.BIN
do
if [ ! -e $TARGETFILE ]
then
@@ -498,6 +523,15 @@ do
fi
;;
+ mainte_fix.bin)
+ echo 'Mainte fix for models with 128M flash'
+ if [ $FLASHED_MAINTE != 1 ]
+ then
+ mainte_fix
+ FLASHED_MAINTE="1"
+ fi
+ ;;
+
*)
;;
esac