rockchip: reorder nanopc t6 patches
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / qualcommax_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,rax120v2|\
13 netgear,wax218|\
14 netgear,wax620|\
15 netgear,wax630)
16 idx="$(find_mtd_index 0:appsblenv)"
17 [ -n "$idx" ] && \
18 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
19 ;;
20 compex,wpq873|\
21 edgecore,eap102|\
22 zyxel,nbg7815)
23 idx="$(find_mtd_index 0:appsblenv)"
24 [ -n "$idx" ] && \
25 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
26 ;;
27 edimax,cax1800)
28 idx="$(find_mtd_index 0:appsblenv)"
29 [ -n "$idx" ] && \
30 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
31 ;;
32 linksys,mx4200v1|\
33 linksys,mx4200v2|\
34 linksys,mx5300|\
35 linksys,mx8500)
36 idx="$(find_mtd_index u_env)"
37 [ -n "$idx" ] && \
38 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
39 ;;
40 netgear,sxr80|\
41 netgear,sxs80)
42 idx="$(find_mtd_index 0:appsblenv)"
43 [ -n "$idx" ] && \
44 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
45 ;;
46 redmi,ax6|\
47 xiaomi,ax3600|\
48 xiaomi,ax9000)
49 idx="$(find_mtd_index 0:appsblenv)"
50 [ -n "$idx" ] && \
51 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
52 idx2="$(find_mtd_index bdata)"
53 [ -n "$idx2" ] && \
54 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
55 ;;
56 prpl,haze)
57 mmcpart="$(find_mmc_part 0:APPSBLENV)"
58 [ -n "$mmcpart" ] && \
59 ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
60 ;;
61 qnap,301w)
62 idx="$(find_mtd_index 0:appsblenv)"
63 [ -n "$idx" ] && \
64 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
65 ;;
66 spectrum,sax1v1k)
67 mmcpart="$(find_mmc_part 0:APPSBLENV)"
68 [ -n "$mmcpart" ] && \
69 ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x40000" "1"
70 ;;
71 esac
72
73 config_load ubootenv
74 config_foreach ubootenv_add_app_config
75
76 exit 0