ipq807x: add Dynalink DL-WRX36
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / ipq807x
1 [ -e /etc/config/ubootenv ] && exit 0
2
3 touch /etc/config/ubootenv
4
5 . /lib/uboot-envtools.sh
6 . /lib/functions.sh
7
8 board=$(board_name)
9
10 case "$board" in
11 dynalink,dl-wrx36)
12 idx="$(find_mtd_index 0:appsblenv)"
13 [ -n "$idx" ] && \
14 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
15 ;;
16 edgecore,eap102)
17 idx="$(find_mtd_index 0:appsblenv)"
18 [ -n "$idx" ] && \
19 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
20 ;;
21 edimax,cax1800)
22 idx="$(find_mtd_index 0:appsblenv)"
23 [ -n "$idx" ] && \
24 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
25 ;;
26 redmi,ax6|\
27 xiaomi,ax3600|\
28 xiaomi,ax9000)
29 idx="$(find_mtd_index 0:appsblenv)"
30 [ -n "$idx" ] && \
31 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
32 idx2="$(find_mtd_index bdata)"
33 [ -n "$idx2" ] && \
34 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
35 ;;
36 qnap,301w)
37 idx="$(find_mtd_index 0:appsblenv)"
38 [ -n "$idx" ] && \
39 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
40 ;;
41 esac
42
43 config_load ubootenv
44 config_foreach ubootenv_add_app_config
45
46 exit 0