ipq807x: add initial support for prpl Foundation Haze board
[openwrt/openwrt.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 prpl,haze)
39 mmcpart="$(find_mmc_part 0:APPSBLENV)"
40 [ -n "$mmcpart" ] && \
41 ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
42 ;;
43 qnap,301w)
44 idx="$(find_mtd_index 0:appsblenv)"
45 [ -n "$idx" ] && \
46 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
47 ;;
48 esac
49
50 config_load ubootenv
51 config_foreach ubootenv_add_app_config
52
53 exit 0