ipq807x: add support for Netgear RAX120v2
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / qualcommax_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 netgear,rax120v2|\
13 netgear,wax218)
14 idx="$(find_mtd_index 0:appsblenv)"
15 [ -n "$idx" ] && \
16 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
17 ;;
18 compex,wpq873|\
19 edgecore,eap102|\
20 zyxel,nbg7815)
21 idx="$(find_mtd_index 0:appsblenv)"
22 [ -n "$idx" ] && \
23 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
24 ;;
25 edimax,cax1800)
26 idx="$(find_mtd_index 0:appsblenv)"
27 [ -n "$idx" ] && \
28 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
29 ;;
30 redmi,ax6|\
31 xiaomi,ax3600|\
32 xiaomi,ax9000)
33 idx="$(find_mtd_index 0:appsblenv)"
34 [ -n "$idx" ] && \
35 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
36 idx2="$(find_mtd_index bdata)"
37 [ -n "$idx2" ] && \
38 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
39 ;;
40 prpl,haze)
41 mmcpart="$(find_mmc_part 0:APPSBLENV)"
42 [ -n "$mmcpart" ] && \
43 ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
44 ;;
45 qnap,301w)
46 idx="$(find_mtd_index 0:appsblenv)"
47 [ -n "$idx" ] && \
48 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
49 ;;
50 esac
51
52 config_load ubootenv
53 config_foreach ubootenv_add_app_config
54
55 exit 0