blob: 95ad722986ea2f8470fdbf740120e2138ec4808a [file] [log] [blame]
#!/bin/sh
echo "Scan all mtd partitions to handle bit-flip:"
mtdX=$(cat /proc/mtd | sed '1d;s/: .*//')
for mtd in $mtdX; do
name="$(awk '/^'$mtd':/{print gensub(/"/,"","g",$4)}' /proc/mtd)"
if [ "$name" = "OTA" ]; then
continue
fi
echo "Read $name" > /dev/console
dd if=/dev/$mtd of=/dev/null bs=4096 2>/dev/null
sleep 1
done