realtek: add support for TP-Link SG2210P
[openwrt/staging/hauke.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-10mp|\
12 d-link,dgs-1210-10p|\
13 d-link,dgs-1210-16|\
14 d-link,dgs-1210-20|\
15 d-link,dgs-1210-28|\
16 zyxel,gs1900-8|\
17 zyxel,gs1900-8hp-v1|\
18 zyxel,gs1900-8hp-v2|\
19 zyxel,gs1900-10hp|\
20 zyxel,gs1900-16|\
21 zyxel,gs1900-24-v1|\
22 zyxel,gs1900-24e|\
23 zyxel,gs1900-24hp-v1|\
24 zyxel,gs1900-24hp-v2)
25 idx="$(find_mtd_index u-boot-env)"
26 [ -n "$idx" ] && \
27 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
28 idx2="$(find_mtd_index u-boot-env2)"
29 [ -n "$idx2" ] && \
30 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
31 ;;
32 tplink,sg2008p-v1|\
33 tplink,sg2210p-v3|\
34 tplink,sg2452p-v4)
35 idx="$(find_mtd_index u-boot-env)"
36 [ -n "$idx" ] && \
37 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x10000"
38 ;;
39 iodata,bsh-g24mb)
40 idx="$(find_mtd_index u-boot-env)"
41 [ -n "$idx" ] && \
42 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
43 idx2="$(find_mtd_index u-boot-env2)"
44 [ -n "$idx2" ] && \
45 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x3800" "0x10000"
46 ;;
47 *)
48 idx="$(find_mtd_index u-boot-env)"
49 [ -n "$idx" ] && \
50 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
51 idx2="$(find_mtd_index u-boot-env2)"
52 [ -n "$idx2" ] && \
53 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
54 ;;
55 esac
56
57 config_load ubootenv
58 config_foreach ubootenv_add_app_config
59
60 exit 0