diff options
author | David Woodhouse <dwmw2@infradead.org> | 2020-07-20 21:10:04 +0100 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2020-07-26 16:42:36 +0800 |
commit | 29fa5526a2ba5882cf0159b03998e29194c1f190 (patch) | |
tree | 8c46e470fa3b38a6bff1f983987964c0a6ec94e1 /target/linux/mediatek/mt7623/base-files/lib/preinit | |
parent | 7a1eaa446b07ebf516a43db609ccbf169baadcae (diff) | |
download | upstream-29fa5526a2ba5882cf0159b03998e29194c1f190.tar.gz upstream-29fa5526a2ba5882cf0159b03998e29194c1f190.tar.bz2 upstream-29fa5526a2ba5882cf0159b03998e29194c1f190.zip |
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>
Diffstat (limited to 'target/linux/mediatek/mt7623/base-files/lib/preinit')
-rw-r--r-- | target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config index cbb6c604c8..f47894c0fd 100644 --- a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config +++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config @@ -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 |