[no ci] Overlay: update init (#1546)

pull/1549/head
viktorxda 2024-09-13 21:09:42 +02:00 committed by GitHub
parent e270b5b1bf
commit 85e10502ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ if ! grep -q 'root=.*nfs\|mmcblk\|ram' /proc/cmdline; then
mtdblkdev=$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd | sed 's/mtd/mtdblock/')
mtdchrdev=$(grep 'rootfs_data' /proc/mtd | cut -d: -f1)
if ! mount -t jffs2 /dev/$mtdblkdev /overlay || dmesg | grep -q "jffs2.*: Magic bitmask.*not found"; then
mountpoint -q /overlay && umount /overlay
echo "Formatting flash..."
grep -q 'nand' /proc/cmdline || jffs2="-j"
flash_eraseall $jffs2 /dev/$mtdchrdev