openwrt/package/boot/uboot-tools/uboot-envtools/files/realtek
Shiji Yang ac1ee98c45 uboot-envtools: reorganize the initialization scripts
Reorder device names alphabetically and group together the same configs.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21052
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-09 00:34:22 +01:00

53 lines
1.2 KiB
Plaintext

[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
apresia,aplgs120gtss)
ubootenv_add_mtd "u-boot-env" "0x0" "0x40000" "0x10000"
ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x40000" "0x10000"
;;
d-link,dgs-1210-10mp|\
d-link,dgs-1210-10p|\
d-link,dgs-1210-16|\
d-link,dgs-1210-20|\
d-link,dgs-1210-28|\
zyxel,gs1900-8-a1|\
zyxel,gs1900-8hp-a1|\
zyxel,gs1900-8hp-b1|\
zyxel,gs1900-10hp-a1|\
zyxel,gs1900-16-a1|\
zyxel,gs1900-24-a1|\
zyxel,gs1900-24e-a1|\
zyxel,gs1900-24ep-a1|\
zyxel,gs1900-24hp-a1|\
zyxel,gs1900-24hp-b1|\
zyxel,gs1900-48-a1)
ubootenv_add_mtd "u-boot-env" "0x0" "0x400" "0x10000"
ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"
;;
iodata,bsh-g24mb)
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x3800" "0x10000"
;;
tplink,sg2008p-v1|\
tplink,sg2210p-v3|\
tplink,sg2452p-v4)
ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x10000"
;;
*)
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0