aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-01-16 21:02:00 +0000
committerDaniel Golle <daniel@makrotopia.org>2023-01-16 22:04:55 +0000
commitab3c9ccb615032d18b2395ca2d68523fc1565dc3 (patch)
treeddb185f401e25a83e5a21a4799e2b99c24d77390
parent86a2dae29a7391f83a0b8d2f85828f72c834b17e (diff)
downloadupstream-ab3c9ccb615032d18b2395ca2d68523fc1565dc3.tar.gz
upstream-ab3c9ccb615032d18b2395ca2d68523fc1565dc3.tar.bz2
upstream-ab3c9ccb615032d18b2395ca2d68523fc1565dc3.zip
mediatek: filogic: fix sysupgrade on MMC on the BPi-R3
A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rwxr-xr-xtarget/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index c2808bc736..93b202218a 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -43,17 +43,20 @@ platform_do_upgrade() {
case "$board" in
bananapi,bpi-r3)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
+ local rootdev="$(cmdline_get_var root)"
+ rootdev="${rootdev##*/}"
+ rootdev="${rootdev%p[0-9]*}"
+ case "$rootdev" in
+ mmc*)
CI_ROOTDEV="$rootdev"
CI_KERNPART="production"
emmc_do_upgrade "$1"
;;
- /dev/mtdblock*)
+ mtdblock*)
PART_NAME="fit"
default_do_upgrade "$1"
;;
- /dev/ubiblock*)
+ ubiblock*)
CI_KERNPART="fit"
nand_do_upgrade "$1"
;;