Jelajahi Sumber

uboot-envtools: reorganize the initialization scripts

Reorder device names alphabetically and group together the same configs.

Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21052
Signed-off-by: Hauke Mehrtens <[email protected]>
Shiji Yang 3 minggu lalu
induk
melakukan
ac1ee98c45

+ 2 - 4
package/boot/uboot-tools/uboot-envtools/files/lantiq

@@ -12,15 +12,13 @@ touch /etc/config/ubootenv
 board=$(board_name)
 
 case "$board" in
-bt,homehub-v2b)
+bt,homehub-v2b|\
+siemens,gigaset-sx76x)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
 	;;
 bt,homehub-v3a)
 	ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
 	;;
-siemens,gigaset-sx76x)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
-	;;
 zyxel,p-2812hnu-f1)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
 	;;

+ 13 - 15
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic

@@ -37,6 +37,7 @@ netcore,n60|\
 netcore,n60-pro|\
 netis,nx31|\
 nokia,ea0326gmp|\
+openwrt,one|\
 qihoo,360t7|\
 routerich,ax3000-ubootmod|\
 snr,snr-cpe-ax2|\
@@ -61,6 +62,15 @@ huasifei,wh3000|\
 nradio,c8-668gl)
 	ubootenv_add_mmc "u-boot-env" "" "0x0" "0x80000"
 	;;
+asiarf,ap7986-003|\
+cetron,ct3003|\
+comfast,cf-wr632ax|\
+edgecore,eap111|\
+netgear,wax220|\
+zbtlink,zbt-z8102ax|\
+zbtlink,zbt-z8103ax)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+	;;
 asus,rt-ax59u)
 	ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
 	;;
@@ -100,15 +110,6 @@ comfast,cf-e393ax|\
 iptime,ax3000m)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
 	;;
-asiarf,ap7986-003|\
-cetron,ct3003|\
-comfast,cf-wr632ax|\
-edgecore,eap111|\
-netgear,wax220|\
-zbtlink,zbt-z8102ax|\
-zbtlink,zbt-z8103ax)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
-	;;
 dlink,aquila-pro-ai-m30-a1|\
 dlink,aquila-pro-ai-m60-a1)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
@@ -123,14 +124,14 @@ openembed,som7981)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
 	ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
 	;;
-openwrt,one)
-	ubootenv_add_ubi_default
-	;;
 smartrg,sdg-8733|\
 smartrg,sdg-8733a|\
 smartrg,sdg-8734)
 	ubootenv_add_mmc "u-boot-env" "mmcblk0" "0x0" "0x8000" "0x8000"
 	;;
+teltonika,rutc50)
+	ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
+	;;
 tplink,archer-ax80-v1|\
 tplink,be450)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
@@ -138,9 +139,6 @@ tplink,be450)
 ubnt,unifi-6-plus)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
 	;;
-teltonika,rutc50)
-	ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
-	;;
 xiaomi,mi-router-ax3000t|\
 xiaomi,mi-router-wr30u-stock|\
 xiaomi,redmi-router-ax6000-stock)

+ 4 - 4
package/boot/uboot-tools/uboot-envtools/files/mediatek_mt7622

@@ -20,10 +20,6 @@ case "$board" in
 asiarf,ap7622-wh1)
 	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x10000"
 	;;
-dlink,eagle-pro-ai-m32-a1|\
-dlink,eagle-pro-ai-r32-a1)
-	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x2000" "0x2000"
-	;;
 bananapi,bpi-r64|\
 linksys,e8450-ubi)
 	. /lib/upgrade/fit.sh
@@ -41,6 +37,10 @@ linksys,e8450-ubi)
 buffalo,wsr-2533dhp2)
 	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
 	;;
+dlink,eagle-pro-ai-m32-a1|\
+dlink,eagle-pro-ai-r32-a1)
+	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x2000" "0x2000"
+	;;
 ruijie,rg-ew3200gx-pro)
 	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
 	;;

+ 7 - 7
package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq807x

@@ -15,6 +15,10 @@ zyxel,nbg7815|\
 zyxel,nwa210ax)
 	ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
 	;;
+asus,rt-ax89x|\
+qnap,301w)
+	ubootenv_add_mtd "0:appsblenv" "0x0" "0x20000" "0x20000"
+	;;
 dynalink,dl-wrx36|\
 netgear,rax120v2|\
 netgear,sxr80|\
@@ -42,19 +46,15 @@ linksys,mx8500)
 linksys,mx4300)
 	ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x40000"
 	;;
+prpl,haze)
+	ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x400" "0x100"
+	;;
 redmi,ax6|\
 xiaomi,ax3600|\
 xiaomi,ax9000)
 	ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x20000"
 	ubootenv_add_sys_mtd "bdata" "0x0" "0x10000" "0x20000"
 	;;
-prpl,haze)
-	ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x400" "0x100"
-	;;
-asus,rt-ax89x|\
-qnap,301w)
-	ubootenv_add_mtd "0:appsblenv" "0x0" "0x20000" "0x20000"
-	;;
 spectrum,sax1v1k)
 	ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x40000" "1"
 	;;

+ 57 - 57
package/boot/uboot-tools/uboot-envtools/files/ramips

@@ -36,13 +36,44 @@ plasmacloud,pax1800-lite|\
 yuncore,ax820)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
 	;;
+ampedwireless,ally-00x19k|\
+ampedwireless,ally-r1900k)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
+	;;
 arcadyan,we420223-99|\
 dlink,dir-806a-b1)
 	ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
 	;;
-ampedwireless,ally-00x19k|\
-ampedwireless,ally-r1900k)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
+asus,rt-ax53u|\
+asus,rt-ax54|\
+asus,4g-ax56|\
+belkin,rt1800|\
+elecom,wrc-x1800gs|\
+h3c,tx1800-plus|\
+h3c,tx1801-plus|\
+h3c,tx1806|\
+iptime,ax2002m|\
+iptime,ax2004m|\
+jcg,q20|\
+linksys,e7350|\
+netgear,eax12|\
+netgear,wax202|\
+netis,n6|\
+zyxel,wsm20)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+	;;
+beeline,smartbox-flash|\
+iptime,t5004|\
+linksys,ea6350-v4|\
+linksys,ea7300-v1|\
+linksys,ea7300-v2|\
+linksys,ea7500-v2|\
+linksys,ea8100-v1|\
+linksys,ea8100-v2|\
+mts,wg430223|\
+ubnt,edgerouter-x|\
+ubnt,edgerouter-x-sfp)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
 	;;
 beeline,smartbox-giga|\
 beeline,smartbox-turbo|\
@@ -57,6 +88,12 @@ tplink,ec330-g5u-v1|\
 wifire,s1500-nbn)
 	ubootenv_add_mtd "u-boot-env" "0x0" "0x1000" "0x20000"
 	;;
+bolt,arion|\
+xiaomi,mi-router-cr6606|\
+xiaomi,mi-router-cr6608|\
+xiaomi,mi-router-cr6609)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
+	;;
 buffalo,wsr-1166dhp|\
 buffalo,wsr-600dhp|\
 kroks,kndrt31r16|\
@@ -70,23 +107,10 @@ zbtlink,zbt-wg2626|\
 zte,mf283plus)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
 	;;
-asus,rt-ax53u|\
-asus,rt-ax54|\
-asus,4g-ax56|\
-belkin,rt1800|\
-elecom,wrc-x1800gs|\
-h3c,tx1800-plus|\
-h3c,tx1801-plus|\
-h3c,tx1806|\
-iptime,ax2002m|\
-iptime,ax2004m|\
-jcg,q20|\
-linksys,e7350|\
-netgear,eax12|\
-netgear,wax202|\
-netis,n6|\
-zyxel,wsm20)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+dna,valokuitu-plus-ex400|\
+genexis,pulse-ex400)
+	ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+	ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
 	;;
 haier,har-20s2u1|\
 sim,simax1800t|\
@@ -98,27 +122,22 @@ hootoo,ht-tm05|\
 ravpower,rp-wd03)
 	ubootenv_add_mtd "u-boot-env" "0x4000" "0x1000" "0x1000"
 	;;
-beeline,smartbox-flash|\
-iptime,t5004|\
-linksys,ea6350-v4|\
-linksys,ea7300-v1|\
-linksys,ea7300-v2|\
-linksys,ea7500-v2|\
-linksys,ea8100-v1|\
-linksys,ea8100-v2|\
-mts,wg430223|\
-ubnt,edgerouter-x|\
-ubnt,edgerouter-x-sfp)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+netgear,wax214v2)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+	ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
 	;;
 snr,snr-cpe-me1|\
 snr,snr-cpe-me2-sfp|\
 snr,cpe-w4n-mt)
 	ubootenv_add_mtd "uboot-env" "0x0" "0x1000" "0x1000"
 	;;
-xiaomi,miwifi-mini)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
-	ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
+xiaomi,mi-router-3-pro|\
+xiaomi,mi-router-3g|\
+xiaomi,mi-router-4|\
+xiaomi,mi-router-ac2100|\
+xiaomi,redmi-router-ac2100)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+	ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
 	;;
 xiaomi,mi-router-3g-v2|\
 xiaomi,mi-router-4a-gigabit|\
@@ -126,13 +145,9 @@ xiaomi,miwifi-3c)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
 	ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
 	;;
-xiaomi,mi-router-3g|\
-xiaomi,mi-router-3-pro|\
-xiaomi,mi-router-4|\
-xiaomi,mi-router-ac2100|\
-xiaomi,redmi-router-ac2100)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
-	ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
+xiaomi,miwifi-mini)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
+	ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
 	;;
 zyxel,lte3301-plus)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
@@ -142,21 +157,6 @@ zyxel,lte7490-m904|\
 zyxel,nr7101)
 	ubootenv_add_mtd "Config" "0x0" "0x1000" "0x80000"
 	;;
-bolt,arion|\
-xiaomi,mi-router-cr6606|\
-xiaomi,mi-router-cr6608|\
-xiaomi,mi-router-cr6609)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
-	;;
-dna,valokuitu-plus-ex400|\
-genexis,pulse-ex400)
-	ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
-	ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
-	;;
-netgear,wax214v2)
-	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
-	ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
-	;;
 esac
 
 config_load ubootenv

+ 4 - 4
package/boot/uboot-tools/uboot-envtools/files/realtek

@@ -31,15 +31,15 @@ zyxel,gs1900-48-a1)
 	ubootenv_add_mtd "u-boot-env" "0x0" "0x400" "0x10000"
 	ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"
 	;;
+iodata,bsh-g24mb)
+	ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
+	ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x3800" "0x10000"
+	;;
 tplink,sg2008p-v1|\
 tplink,sg2210p-v3|\
 tplink,sg2452p-v4)
 	ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x10000"
 	;;
-iodata,bsh-g24mb)
-	ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
-	ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x3800" "0x10000"
-	;;
 *)
 	ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
 	ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"