summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7623
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2024-02-25 21:12:10 +0000
committerDaniel Golle <daniel@makrotopia.org>2024-02-26 01:29:22 +0000
commiteab44ec7ea042a4d1adf5e2bf76736fb4df69063 (patch)
treeee5be754abee0b13ef2f12ae119dd8de623203b6 /target/linux/mediatek/mt7623
parentfc865eb3ae0369a966490ec5e8a3991d4553eb40 (diff)
downloadopenwrt-eab44ec7ea042a4d1adf5e2bf76736fb4df69063.tar.gz
openwrt-eab44ec7ea042a4d1adf5e2bf76736fb4df69063.tar.bz2
openwrt-eab44ec7ea042a4d1adf5e2bf76736fb4df69063.zip
mediatek: drop platform_get_bootdev
Now that we got fitblk_get_bootdev in /lib/upgrade/common.sh we don't need platform_get_bootdev in each of the subtargets any longer. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek/mt7623')
-rwxr-xr-xtarget/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh17
1 files changed, 1 insertions, 16 deletions
diff --git a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
index 98f76ff49f..9cfb15cf3d 100755
--- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
@@ -1,20 +1,5 @@
REQUIRE_IMAGE_METADATA=1
-platform_get_bootdev() {
- local rootdisk="$(cat /sys/firmware/devicetree/base/chosen/rootdisk)"
- local handle bootdev
- for handle in /sys/class/block/*/of_node/phandle /sys/class/block/*/device/of_node/phandle; do
- [ ! -e "$handle" ] && continue
- if [ "$rootdisk" = "$(cat $handle)" ]; then
- bootdev="${handle%/of_node/phandle}"
- bootdev="${bootdev%/device}"
- bootdev="${bootdev#/sys/class/block/}"
- echo "$bootdev"
- break
- fi
- done
-}
-
# Legacy full system upgrade including preloader for MediaTek SoCs on eMMC or SD
legacy_mtk_mmc_full_upgrade() {
local diskdev partdev diff oldrecovery
@@ -100,7 +85,7 @@ platform_do_upgrade() {
unielec,u7623-02)
[ -e /dev/fit0 ] && fitblk /dev/fit0
[ -e /dev/fitrw ] && fitblk /dev/fitrw
- bootdev="$(platform_get_bootdev)"
+ bootdev="$(fitblk_get_bootdev)"
EMMC_KERN_DEV="/dev/$bootdev"
emmc_do_upgrade "$1"
;;