mediatek: mt7622: don't rely on existing image for sysupgrade
authorDaniel Golle <daniel@makrotopia.org>
Wed, 19 Oct 2022 18:58:12 +0000 (19:58 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 19 Oct 2022 19:05:17 +0000 (20:05 +0100)
Don't reply on mapped rootfs partition but rather just take what ever
has been set to the kernel cmdline root= parameter as a hint to decide
which media to install sysupgrade to on the BananaPi BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

index 1036793145df4abc86580d16abcad527bb0f5e9f..e62eba7ef17f6a452d0e9bb235bd90d40585fe68 100755 (executable)
@@ -6,8 +6,8 @@ platform_do_upgrade() {
 
        case "$board" in
        bananapi,bpi-r64)
-               export_bootdevice
-               export_partdevice rootdev 0
+               local rootdev="$(cmdline_get_var root)"
+               rootdev="${rootdev##*/}"
                case "$rootdev" in
                mmc*)
                        CI_ROOTDEV="$rootdev"