mediatek: mt7622: fix sysupgrade on MMC on BPi-R64
authorDaniel Golle <daniel@makrotopia.org>
Mon, 16 Jan 2023 21:00:41 +0000 (21:00 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 16 Jan 2023 22:04:44 +0000 (22:04 +0000)
A previous attempt to simplify things went wrong and now sysupgrade
is broken on this device. Fix that.

Fixes: d640cbac0e ("mediatek: mt7622: don't rely on existing image for sysupgrade")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

index e62eba7ef17f6a452d0e9bb235bd90d40585fe68..d3d503dd1eff4e9b2b9f36277986fbce9209242c 100755 (executable)
@@ -8,6 +8,7 @@ platform_do_upgrade() {
        bananapi,bpi-r64)
                local rootdev="$(cmdline_get_var root)"
                rootdev="${rootdev##*/}"
+               rootdev="${rootdev%p[0-9]*}"
                case "$rootdev" in
                mmc*)
                        CI_ROOTDEV="$rootdev"