uboot-envtools: add support for the realtek target
[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-10hp)
15 idx="$(find_mtd_index u-boot-env)"
16 [ -n "$idx" ] && \
17 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
18 ;;
19 *)
20 idx="$(find_mtd_index u-boot-env)"
21 [ -n "$idx" ] && \
22 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
23 ;;
24 esac
25
26 config_load ubootenv
27 config_foreach ubootenv_add_app_config ubootenv
28
29 exit 0