]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uboot-envtools: use ubootenv_add_mtd function 19967/head
authorPaweł Owoc <frut3k7@gmail.com>
Sat, 6 Sep 2025 17:45:58 +0000 (19:45 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 11 Sep 2025 21:02:12 +0000 (23:02 +0200)
Use ubootenv_add_mtd function for:
- Teltonika RUTC50
- Yuncore AX830

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19967
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq50xx

index 0a5c6004de9350a1b4cea0160849c1a66b411cae..8f75c8591597fdea7a9725a20cfa1f19774608d6 100644 (file)
@@ -129,8 +129,7 @@ ubnt,unifi-6-plus)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
        ;;
 teltonika,rutc50)
-       local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
-       ubootenv_add_uci_config "$envdev" "0x0" "0x10000" "0x10000"
+       ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
        ;;
 xiaomi,mi-router-ax3000t|\
 xiaomi,mi-router-wr30u-stock|\
index 3e590228d61f36f2c059e4103bfb9e297f485bbf..c73507423bf6513d2ca5cf1b72369f5ff579d17d 100644 (file)
@@ -26,9 +26,7 @@ xiaomi,ax6000)
        ubootenv_add_sys_mtd "bdata" "0x0" "0x10000" "0x20000"
        ;;
 yuncore,ax830)
-       idx="$(find_mtd_index 0:APPSBLENV)"
-       [ -n "$idx" ] && \
-               ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
+       ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x10000" "0x10000"
        ;;
 esac