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