uboot-envtools: add support for ZyXEL GS-1900-8HP v1 and v2
[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-8hp-v1|\
15 zyxel,gs1900-8hp-v2|\
16 zyxel,gs1900-10hp)
17 idx="$(find_mtd_index u-boot-env)"
18 [ -n "$idx" ] && \
19 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
20 ;;
21 *)
22 idx="$(find_mtd_index u-boot-env)"
23 [ -n "$idx" ] && \
24 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
25 ;;
26 esac
27
28 config_load ubootenv
29 config_foreach ubootenv_add_app_config ubootenv
30
31 exit 0