aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-01-29 03:40:15 +0000
committerDaniel Golle <daniel@makrotopia.org>2023-01-29 03:43:58 +0000
commite51a57e1924176afe60cd6e76b7ee4eec3e6f6a2 (patch)
tree79fa72ed5bb8e35027cfca73a3230a7ab462165c /package/boot
parent016a7bd558183dae67e6ed3c29ee82d7b5c2f579 (diff)
downloadupstream-e51a57e1924176afe60cd6e76b7ee4eec3e6f6a2.tar.gz
upstream-e51a57e1924176afe60cd6e76b7ee4eec3e6f6a2.tar.bz2
upstream-e51a57e1924176afe60cd6e76b7ee4eec3e6f6a2.zip
uboot-envtools: mt7622: bpi-r64: fix env selection
Selecting the environment when booting from SD card has been broken by a previous commit. Fix it. Fixes: 84b5b0f88c ("uboot-envtools: mediatek/mt7622: don't rely on mapped rootfs") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/uboot-envtools/files/mediatek_mt76229
1 files changed, 6 insertions, 3 deletions
diff --git a/package/boot/uboot-envtools/files/mediatek_mt7622 b/package/boot/uboot-envtools/files/mediatek_mt7622
index 9ad4c7c1a7..e01dcc4fef 100644
--- a/package/boot/uboot-envtools/files/mediatek_mt7622
+++ b/package/boot/uboot-envtools/files/mediatek_mt7622
@@ -17,13 +17,16 @@ linksys,e8450-ubi)
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
;;
bananapi,bpi-r64)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
+ rootdev="$(cmdline_get_var root)"
+ rootdev="${rootdev##*/}"
+ rootdev="${rootdev%%p[0-9]*}"
+ case "$rootdev" in
+ mmc*)
local envdev=$(find_mmc_part "ubootenv" $rootdev)
ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
;;
- /dev/ubi*)
+ ubi*)
ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
;;