0185c2c8e6fcae28e90bdcbca47c8eeea6a16652
[openwrt/staging/nbd.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 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 qnap,301w)
40 idx="$(find_mtd_index 0:appsblenv)"
41 [ -n "$idx" ] && \
42 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
43 ;;
44 esac
45
46 config_load ubootenv
47 config_foreach ubootenv_add_app_config
48
49 exit 0