summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2024-01-09 19:54:51 +0000
committerDaniel Golle2024-04-12 00:51:51 +0000
commit5cae98c25d86e078d0632aa25f168df11689f592 (patch)
tree2096f3f8d69d6605a1eb853af3fa9a8b18aea2d9
parent817a1cb2bf09786990f4a5aa7247e42a78e4281f (diff)
downloadopenwrt-5cae98c25d86e078d0632aa25f168df11689f592.tar.gz
mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
The sysupgrade formware of the Puzzle series is a slightly strange dual-boot approach while remaining compatible with Marvell's SDK firmware upgrade binary format -- which happens to be a full-disk image with GPT partition table. Hence that /lib/upgrade/emmc-puzzle.sh script is like an exotic disease which results from those decisions, and as we also want to somehow stay compatible with the IEI-World stock firmware we got to use it in that same way (we are not compatible with the QNAP-branded identical hardware device anyway). Currently, on sysupgrade the result is that one ends up with the old content of rootfs_data (a GPT partition on those devices) as nothing ever wipes or in any way re-creates the filesystem there. As a simple work-around, let's kill the filesystem on rootfs_data so fstools re-formats it on the next boot. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit d4e8653e1e9ec90404d12ea24fb0f8e507b337d5)
-rwxr-xr-xtarget/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
index 5e5c356ed6..9a33b7714c 100755
--- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
+++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
@@ -32,5 +32,7 @@ platform_do_upgrade_emmc() {
v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
+ dd if=/dev/zero of=$(find_mmc_part rootfs_data) bs=512 count=8
+
sleep 1
}