[LEDE-DEV] [PATCH] ar71xx: add support for TP-Link TL-WDR7500v6
Piotr Dymacz
pepe2k at gmail.com
Sun Nov 5 14:22:20 PST 2017
Hello Karol,
Thank you for your patch but it seems that it got whitespace mangled and
tabs were replaced with spaces. Please, send v2 using git send-email.
Also, please see my comments inline, below.
On 30.10.2017 20:32, Bizon wrote:
> Add support for TP-Link TL-WDR7500 V6.
>
> Specifications:
> - WiSoC: QCA9563 - 3x3 2.4GHz
> - Radio2: QCA9880 - 3x3 5GHz
> - RAM: 64MB DDR2
> - Storage: 8MB NOR SPI flash, can be replaced with 16M
> - Switch: RTL8367S, now unmanaged
> - Ethernet: 5x1G
> - Misc: 2x button, 2x LED
Please, include in commit message how to install LEDE on this device as
described under "commit description" section on [1].
>
> Signed-off-by: Karol Bizewski <bizongod at gmail.com>
> ---
> package/boot/uboot-envtools/files/ar71xx | 2 ++
> target/linux/ar71xx/base-files/etc/board.d/02_network | 2 ++
> target/linux/ar71xx/base-files/etc/diag.sh | 4 ++++
> .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 5 +++++
> target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 ++++++
> target/linux/ar71xx/config-4.4 | 1 +
> target/linux/ar71xx/config-4.9 | 1 +
> .../linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++++++++++
> target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 +
> target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 +
> target/linux/ar71xx/image/generic.mk | 17 +++++++++++++++++
> .../files/arch/mips/ath79/mach-tl-wdr7500-v6.c | 112
> +++++++++++++++++++++
> 12 files changed, 162 insertions(+)
> create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr7500-v6.c
>
> diff --git a/package/boot/uboot-envtools/files/ar71xx
> b/package/boot/uboot-envtools/files/ar71xx
> index 0bdb6de..789c317 100644
> --- a/package/boot/uboot-envtools/files/ar71xx
> +++ b/package/boot/uboot-envtools/files/ar71xx
> @@ -46,6 +46,8 @@ om5p-acv2|\
> om5p-an|\
> sr3200|\
> tube2h|\
> +tl-wdr7500-v6|\
> +tl-wdr7500-v6-16M|\
Please, drop this "tl-wdr7500-v6-16M" thing. As far as I understand,
this is only your custom hardware modification and the default/factory
version comes with just 8 MB of FLASH.
And I really don't think this device has a writable U-Boot environment
in a separate sector. Please, provide some explanation.
> wndr3700|\
> xd3200)
> ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index d838352..6cdd2fe 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -122,6 +122,8 @@ ar71xx_setup_interfaces()
> tl-wa901nd-v2|\
> tl-wa901nd-v3|\
> tl-wa901nd-v4|\
> + tl-wdr7500-v6|\
> + tl-wdr7500-v6-16M|\
> tl-wr703n|\
> tl-wr802n-v1|\
> tl-wr802n-v2|\
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index ade726f..f0ec9e6 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -20,6 +20,10 @@ get_status_led() {
> all0305)
> status_led="eap7660d:green:ds4"
> ;;
> + tl-wdr7500-v6|\
> + tl-wdr7500-v6-16M)
> + status_led="$board:blue:system"
> + ;;
> antminer-s1|\
> antminer-s3|\
> antminer-r1|\
> diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 85a2a63..bd0cf2e 100644
> --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -98,6 +98,11 @@ case "$FIRMWARE" in
> rb-952ui-5ac2nd)
> ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
> ;;
> + tl-wdr7500-v6|\
> + tl-wdr7500-v6-16M)
> + ath10kcal_extract "art" 8192 2116
> + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +2)
> + ;;
> re450|\
> tl-wr902ac-v1)
> ath10kcal_extract "art" 20480 2116
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 835ced6..dbf132b 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -1109,6 +1109,12 @@ ar71xx_board_detect() {
> *"TL-WDR6500 v2")
> name="tl-wdr6500-v2"
> ;;
> + *"TL-WDR7500 v6")
> + local size="$(mtd_get_part_size 'firmware')"
> +
> + [ "$size" = "8060928" ] && name="tl-wdr7500-v6"
> + [ "$size" = "16449536" ] && name="tl-wdr7500-v6-16M"
As above.
Please don't include support for custom modified hardware.
[snip]
> diff --git a/target/linux/ar71xx/image/generic.mk
> b/target/linux/ar71xx/image/generic.mk
> index 6f5a701..39be043 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -713,6 +713,23 @@ define Device/tellstick-znet-lite
> endef
> TARGET_DEVICES += tellstick-znet-lite
>
> +define Device/tl-wdr7500-v6
> + DEVICE_TITLE := TP-LINK WDR7500 v6
> + DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
> + BOARDNAME := TL-WDR7500-V6
> + IMAGE_SIZE := 7872k
> + MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),7872k(firmware),64k(art)ro
This is definitely not a correct mtd organization for this device.
Based on bootlogs found on OpenWrt forum [2], it should look more or
less like:
[ 0.290000] 0x000000000000-0x00000001d800 : "factory_boot"
[ 0.310000] 0x00000001d800-0x00000001e000 : "factory_info"
[ 0.310000] 0x00000001e000-0x000000020000 : "art"
[ 0.320000] 0x000000020000-0x000000030000 : "config"
[ 0.330000] 0x000000030000-0x000000040000 : "normal_boot"
[ 0.330000] 0x000000040000-0x00000014027c : "kernel"
[ 0.350000] 0x00000014027c-0x0000006b0000 : "rootfs"
[ 0.380000] 0x0000006b0000-0x000000800000 : "rootfs_data"
[ 0.380000] 0x000000040000-0x000000800000 : "firmware"
> +endef
> +TARGET_DEVICES += tl-wdr7500-v6
We have a separate place for TP-Link devices, please use
image/tp-link.mk file instead.
[snip]
[1] https://lede-project.org/submitting-patches
[2] https://forum.openwrt.org/viewtopic.php?pid=358852#p358852
--
Cheers,
Piotr
More information about the Lede-dev
mailing list