blob: 95ad722986ea2f8470fdbf740120e2138ec4808a [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh
2
3echo "Scan all mtd partitions to handle bit-flip:"
4mtdX=$(cat /proc/mtd | sed '1d;s/: .*//')
5for mtd in $mtdX; do
6 name="$(awk '/^'$mtd':/{print gensub(/"/,"","g",$4)}' /proc/mtd)"
7 if [ "$name" = "OTA" ]; then
8 continue
9 fi
10
11 echo "Read $name" > /dev/console
12 dd if=/dev/$mtd of=/dev/null bs=4096 2>/dev/null
13 sleep 1
14done
15