2
0
forked from Ivasoft/openwrt

mediatek: mt7623: prepare for full sysupgrade support on UniElec U7623

An upcoming commit will add a full system image for U7623 which will
contain the MBR partition table and U-Boot too.

That contrasts with the current image which only owns the eMMC from
sector 0xa00 onwards, and must start with a legacy uImage.

Prepare for sysupgrade to the new images, and cope with the fact that
the recovery partition will be /dev/mmcblk0p2 instead of /dev/mmcblk0p1
after the upgrade.

This commit could potentially be backported to 19.07 to allow for direct
sysupgrade to the new image layout.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
David Woodhouse
2020-07-20 21:10:04 +01:00
committed by Chuanhong Guo
parent 7a1eaa446b
commit 29fa5526a2
2 changed files with 125 additions and 96 deletions

View File

@@ -10,7 +10,11 @@ move_config() {
partnum=2
;;
unielec,u7623-02-emmc-512m)
partnum=1
if grep -q root=/dev/mmcblk0p2 /proc/cmdline; then
partnum=1;
else
partnum=2;
fi
;;
*)
return 1