uboot-envtools: ath79: update ubootenv partion index for gl-ar300m
authorHuangbin Zhan <zhanhb88@gmail.com>
Wed, 8 Jul 2020 21:01:54 +0000 (05:01 +0800)
committerPetr Štetiar <ynezz@true.cz>
Sat, 11 Jul 2020 11:33:28 +0000 (13:33 +0200)
The block index of u-boot-env changed from mtd1 to mtd3 after upgrading kernel to 5.4.
This patch search the mtd block by label name, work as expect when perform a clean flash.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
package/boot/uboot-envtools/files/ath79

index 5f5a4488616dc8490624e3e702008a9d02f0d122..5cd64f4ffdeef517c5cc2f350cef520e6ab3c29f 100644 (file)
@@ -19,10 +19,6 @@ buffalo,bhr-4grv2|\
 devolo,magic-2-wifi|\
 engenius,ecb1750|\
 etactica,eg200|\
-glinet,gl-ar300m-lite|\
-glinet,gl-ar300m-nand|\
-glinet,gl-ar300m-nor|\
-glinet,gl-ar300m16|\
 glinet,gl-ar750s-nor|\
 glinet,gl-ar750s-nor-nand|\
 librerouter,librerouter-v1|\
@@ -52,6 +48,14 @@ domywifi,dw33d)
 glinet,gl-ar150)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
        ;;
+glinet,gl-ar300m-lite|\
+glinet,gl-ar300m-nand|\
+glinet,gl-ar300m-nor|\
+glinet,gl-ar300m16)
+       idx="$(find_mtd_index u-boot-env)"
+       [ -n "$idx" ] && \
+               ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
+       ;;
 netgear,wndr3700|\
 netgear,wndr3700-v2|\
 netgear,wndrmac-v1)