diff options
author | Koen Kooi <koen@openembedded.org> | 2007-12-11 09:42:16 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2007-12-11 09:42:16 +0000 |
commit | 7bcf4828673040af5022534981de6416f5884cff (patch) | |
tree | 18ab00a9b6f1ce29fa7b613662e256785fb59781 /packages/zaurus-updater/akita/updater.sh | |
parent | 84b2b31930881004a73267cf24fe6fe701e0f8a8 (diff) | |
parent | 78c32ad25a3883dc7a127a36673890225f9f54f2 (diff) |
propagate from branch 'org.openembedded.dev' (head acccc4840b95c279164a3eeacf893200164bdc65)
to branch 'org.openembedded.dev.avr32' (head 4a915ee0a28076c53049330f3f2e58c7b85ef7a8)
Diffstat (limited to 'packages/zaurus-updater/akita/updater.sh')
-rw-r--r-- | packages/zaurus-updater/akita/updater.sh | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/packages/zaurus-updater/akita/updater.sh b/packages/zaurus-updater/akita/updater.sh index 5399e5254e..ad2c27b012 100644 --- a/packages/zaurus-updater/akita/updater.sh +++ b/packages/zaurus-updater/akita/updater.sh @@ -181,53 +181,53 @@ do /sbin/verchg -v $VTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1 /sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1 - if [ "$MODEL" = "SL-C1000" ] && [ $TARGETTYPE = Kernel ]; then - 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 - #loop - else - 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 - #echo 'ADDR='$ADDR - #echo 'SIZE='$TMPSIZE - #echo 'TMPDATA='$TMPDATA - 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; + if [ "$MODEL" = "SL-C1000" ] && [ $TARGETTYPE = Kernel ]; then + 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 + #loop + else + 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 + #echo 'ADDR='$ADDR + #echo 'SIZE='$TMPSIZE + #echo 'TMPDATA='$TMPDATA + 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 + fi echo '' |