OSDN Git Service

realtek: add support for ZyXEL GS1900-16
[immortalwrt/immortalwrt.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-16|\
19 zyxel,gs1900-24-v1|\
20 zyxel,gs1900-24hp-v1|\
21 zyxel,gs1900-24hp-v2)
22         idx="$(find_mtd_index u-boot-env)"
23         [ -n "$idx" ] && \
24                 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000"
25         idx2="$(find_mtd_index u-boot-env2)"
26         [ -n "$idx2" ] && \
27                 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
28         ;;
29 iodata,bsh-g24mb)
30         idx="$(find_mtd_index u-boot-env)"
31         [ -n "$idx" ] && \
32                 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
33         idx2="$(find_mtd_index u-boot-env2)"
34         [ -n "$idx2" ] && \
35                 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x3800" "0x10000"
36         ;;
37 *)
38         idx="$(find_mtd_index u-boot-env)"
39         [ -n "$idx" ] && \
40                 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
41         idx2="$(find_mtd_index u-boot-env2)"
42         [ -n "$idx2" ] && \
43                 ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000"
44         ;;
45 esac
46
47 config_load ubootenv
48 config_foreach ubootenv_add_app_config
49
50 exit 0