aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-10-18 19:47:25 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-10-18 20:08:47 +0100
commitde94587e709e6d8ddaca4fe534e776d2e87437df (patch)
treee277b2e7203ec58883b77c473e91e53de2cf938a
parent2c6b212a2f03f98eb94fe1a3b9abc693e27eacb8 (diff)
downloadupstream-de94587e709e6d8ddaca4fe534e776d2e87437df.tar.gz
upstream-de94587e709e6d8ddaca4fe534e776d2e87437df.tar.bz2
upstream-de94587e709e6d8ddaca4fe534e776d2e87437df.zip
mediatek: filogic: don't rely on image preset in flash or sysupgrade
Instead of trying to figure out the actual root device, just use the kernel 'root' cmdline parameter as a hint to decide which device to flash to. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rwxr-xr-xtarget/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh17
1 files changed, 6 insertions, 11 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 811e5133f2..a9327ae282 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -2,23 +2,20 @@ REQUIRE_IMAGE_METADATA=1
platform_do_upgrade() {
local board=$(board_name)
- local file_type=$(identify $1)
case "$board" in
bananapi,bpi-r3)
- export_bootdevice
- export_partdevice rootdev 0
- case "$rootdev" in
- mmc*)
+ case "$(cmdline_get_var root)" in
+ /dev/mmc*)
CI_ROOTDEV="$rootdev"
CI_KERNPART="production"
emmc_do_upgrade "$1"
;;
- mtdblock*)
+ /dev/mtdblock*)
PART_NAME="fit"
default_do_upgrade "$1"
;;
- ubiblock*)
+ /dev/ubiblock*)
CI_KERNPART="fit"
nand_do_upgrade "$1"
;;
@@ -58,10 +55,8 @@ platform_check_image() {
platform_copy_config() {
case "$(board_name)" in
bananapi,bpi-r3)
- export_bootdevice
- export_partdevice rootdev 0
- case "$rootdev" in
- mmc*)
+ case "$(cmdline_get_var root)" in
+ /dev/mmc*)
emmc_copy_config
;;
esac