bcedfd9adc91ce88ef1e787dd051db7e5e177bfe
[openwrt/staging/wigyori.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 linksys,mx4200v1|\
33 linksys,mx4200v2)
34 idx="$(find_mtd_index u_env)"
35 [ -n "$idx" ] && \
36 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
37 ;;
38 redmi,ax6|\
39 xiaomi,ax3600|\
40 xiaomi,ax9000)
41 idx="$(find_mtd_index 0:appsblenv)"
42 [ -n "$idx" ] && \
43 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
44 idx2="$(find_mtd_index bdata)"
45 [ -n "$idx2" ] && \
46 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
47 ;;
48 prpl,haze)
49 mmcpart="$(find_mmc_part 0:APPSBLENV)"
50 [ -n "$mmcpart" ] && \
51 ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
52 ;;
53 qnap,301w)
54 idx="$(find_mtd_index 0:appsblenv)"
55 [ -n "$idx" ] && \
56 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
57 ;;
58 esac
59
60 config_load ubootenv
61 config_foreach ubootenv_add_app_config
62
63 exit 0