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