75a399208e67ef10d4625aa52d0c207597a35349
[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 idx="$(find_mtd_index u-boot-env)"
19 [ -n "$idx" ] && \
20 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
21 idx2="$(find_mtd_index u-boot-env2)"
22 [ -n "$idx2" ] && \
23 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
24 ;;
25 *)
26 idx="$(find_mtd_index u-boot-env)"
27 [ -n "$idx" ] && \
28 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
29 idx2="$(find_mtd_index u-boot-env2)"
30 [ -n "$idx2" ] && \
31 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
32 ;;
33 esac
34
35 config_load ubootenv
36 config_foreach ubootenv_add_app_config
37
38 exit 0