ipq807x: add Edgecore EAP102
[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 edgecore,eap102)
12 idx="$(find_mtd_index 0:appsblenv)"
13 [ -n "$idx" ] && \
14 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
15 ;;
16 edimax,cax1800)
17 idx="$(find_mtd_index 0:appsblenv)"
18 [ -n "$idx" ] && \
19 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
20 ;;
21 redmi,ax6|\
22 xiaomi,ax3600|\
23 xiaomi,ax9000)
24 idx="$(find_mtd_index 0:appsblenv)"
25 [ -n "$idx" ] && \
26 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
27 idx2="$(find_mtd_index bdata)"
28 [ -n "$idx2" ] && \
29 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
30 ;;
31 qnap,301w)
32 idx="$(find_mtd_index 0:appsblenv)"
33 [ -n "$idx" ] && \
34 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
35 ;;
36 esac
37
38 config_load ubootenv
39 config_foreach ubootenv_add_app_config
40
41 exit 0