if [ -e u-boot.bin ]
then
size=`stat -c %s u-boot.bin`
- dd if=/dev/mtdblock1 of=u-boot.bin.flashed bs=$size count=1
+ nanddump --omitoob --omitbad -q -l $size -f u-boot.bin.flashed /dev/mtd1ro
if ! cmp u-boot.bin u-boot.bin.flashed
then
flash_eraseall /dev/mtd1
log "u-boot is missing, skipped."
fi
-if ! cmp /dev/mtdblock2 /usr/local/erasednandblk
+nanddump --omitoob --omitbad -q -f mtd2dump /dev/mtd2ro
+if ! cmp mtd2dump /usr/local/erasednandblk
then
flash_eraseall /dev/mtd2
status_uboot_env="cleared"