From: Daniel Golle Date: Wed, 19 Oct 2022 18:58:12 +0000 (+0100) Subject: mediatek: mt7622: don't rely on existing image for sysupgrade X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d640cbac0e76e3638504cb6b239886e8ff75018f;p=openwrt%2Fstaging%2Fnbd.git mediatek: mt7622: don't rely on existing image for sysupgrade 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 --- diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index 1036793145..e62eba7ef1 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -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"