mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
cc00e22029
TP-Link TL-XDR608x comes with locked vendor loader. Add U-Boot build for replacement loader for both TL-XDR6086 and TL-XDR6088. The only difference at U-Boot level is the different filename requested via TFTP, matching the corresponding OpenWrt build artifacts for each device. The TP-Link TL-XDR4288 has the same hardware as the TP-Link TL-XDR6088 except for the wireless part. Also create a uboot for the TP-Link TL-XDR4288. Signed-off-by: Daniel Golle <daniel@makrotopia.org> [rebase to uboot 23.04, correct led and button] Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
61 lines
1.7 KiB
Plaintext
61 lines
1.7 KiB
Plaintext
#
|
|
# Copyright (C) 2021 OpenWrt.org
|
|
#
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
. /lib/uboot-envtools.sh
|
|
. /lib/functions.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
bananapi,bpi-r3)
|
|
rootdev="$(cmdline_get_var root)"
|
|
rootdev="${rootdev##*/}"
|
|
rootdev="${rootdev%%p[0-9]*}"
|
|
case "$rootdev" in
|
|
mmc*)
|
|
local envdev=$(find_mmc_part "ubootenv" $rootdev)
|
|
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
|
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
|
;;
|
|
mtd*)
|
|
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
|
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
|
ubootenv_add_uci_config "$envdev" "0x20000" "0x20000" "0x20000" "1"
|
|
;;
|
|
ubi*)
|
|
. /lib/upgrade/nand.sh
|
|
local envubi=$(nand_find_ubi ubi)
|
|
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
|
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
|
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
|
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
|
;;
|
|
esac
|
|
;;
|
|
xiaomi,redmi-router-ax6000-stock)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
|
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
|
;;
|
|
tplink,tl-xdr4288|\
|
|
tplink,tl-xdr6086|\
|
|
tplink,tl-xdr6088|\
|
|
xiaomi,redmi-router-ax6000-ubootmod)
|
|
. /lib/upgrade/nand.sh
|
|
local envubi=$(nand_find_ubi ubi)
|
|
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
|
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
|
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
|
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config
|
|
|
|
exit 0
|