ca331f10322fb63160483d1cdf8aaee2ebdb9be1
[openwrt/staging/jow.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 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 edgecore,eap102|\
18 zyxel,nbg7815)
19 idx="$(find_mtd_index 0:appsblenv)"
20 [ -n "$idx" ] && \
21 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
22 ;;
23 edimax,cax1800)
24 idx="$(find_mtd_index 0:appsblenv)"
25 [ -n "$idx" ] && \
26 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
27 ;;
28 redmi,ax6|\
29 xiaomi,ax3600|\
30 xiaomi,ax9000)
31 idx="$(find_mtd_index 0:appsblenv)"
32 [ -n "$idx" ] && \
33 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
34 idx2="$(find_mtd_index bdata)"
35 [ -n "$idx2" ] && \
36 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
37 ;;
38 qnap,301w)
39 idx="$(find_mtd_index 0:appsblenv)"
40 [ -n "$idx" ] && \
41 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
42 ;;
43 esac
44
45 config_load ubootenv
46 config_foreach ubootenv_add_app_config
47
48 exit 0