ipq807x: Add Xiaomi AX9000
[openwrt/staging/dedeckeh.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 xiaomi,ax9000)
19 idx="$(find_mtd_index 0:appsblenv)"
20 [ -n "$idx" ] && \
21 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
22 idx2="$(find_mtd_index bdata)"
23 [ -n "$idx2" ] && \
24 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
25 ;;
26 qnap,301w)
27 idx="$(find_mtd_index 0:appsblenv)"
28 [ -n "$idx" ] && \
29 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
30 ;;
31 esac
32
33 config_load ubootenv
34 config_foreach ubootenv_add_app_config
35
36 exit 0