9836462a92ab3d72e5ba36e00d6859d9d6fd6a76
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / realtek
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 d-link,dgs-1210-16|\
12 d-link,dgs-1210-28|\
13 d-link,dgs-1210-10p|\
14 zyxel,gs1900-8|\
15 zyxel,gs1900-8hp-v1|\
16 zyxel,gs1900-8hp-v2|\
17 zyxel,gs1900-10hp|\
18 zyxel,gs1900-24-v1|\
19 zyxel,gs1900-24hp-v2)
20 idx="$(find_mtd_index u-boot-env)"
21 [ -n "$idx" ] && \
22 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
23 idx2="$(find_mtd_index u-boot-env2)"
24 [ -n "$idx2" ] && \
25 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
26 ;;
27 iodata,bsh-g24mb)
28 idx="$(find_mtd_index u-boot-env)"
29 [ -n "$idx" ] && \
30 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
31 idx2="$(find_mtd_index u-boot-env2)"
32 [ -n "$idx2" ] && \
33 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x3800" "0x10000"
34 ;;
35 *)
36 idx="$(find_mtd_index u-boot-env)"
37 [ -n "$idx" ] && \
38 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
39 idx2="$(find_mtd_index u-boot-env2)"
40 [ -n "$idx2" ] && \
41 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
42 ;;
43 esac
44
45 config_load ubootenv
46 config_foreach ubootenv_add_app_config
47
48 exit 0