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