blob: a91ca826044e2fccb2f3e45dcda9c896ddea18c5 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001[ -e /etc/config/ubootenv ] && exit 0
2
3touch /etc/config/ubootenv
4
5. /lib/uboot-envtools.sh
6. /lib/functions.sh
7
8board=$(board_name)
9
10case "$board" in
11d-link,dgs-1210-16|\
12d-link,dgs-1210-28|\
13d-link,dgs-1210-10p|\
14zyxel,gs1900-8|\
15zyxel,gs1900-8hp-v1|\
16zyxel,gs1900-8hp-v2|\
17zyxel,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 ;;
22*)
23 idx="$(find_mtd_index u-boot-env)"
24 [ -n "$idx" ] && \
25 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
26 ;;
27esac
28
29config_load ubootenv
30config_foreach ubootenv_add_app_config ubootenv
31
32exit 0