找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 26162|回复: 110

TP-LINK WDR6500 V5/V6 OPENWRT R9 完美支持5G

  [复制链接]
本帖最后由 huah0235 于 2020-1-1 08:53 编辑

2020.1.1 跨年更新lean大雕的最新版R9.12固件,下载地址在下面!


前些天捡了一台WDR6500V5,(QCA9561+ 64M ddr2+8M SPI)更换16mSPI闪存,硬改了128MB内存。刷入h大的wdr6500v2 breed 链接:https://www.right.com.cn/forum/thread-161906-1-1.html ,然后使用大雕的R9 openwrt源码尝试编译对应固件,发现OPENWRT并没有支持V5版的设备,只有WDR6500V2,抱着试一试的态度,编译完成在breed刷入,启动正常,然而没有无线。

众所周知,高通的机器需要刷入ART才能使用无线。编程器读取原厂8Mspi,打开winhex寻找ART。此时,遇到了第一个坑:原厂8M闪存一般ART都放置在最后64kb,但这个机器最后64kb并没有ART。经过爬帖和比对,最终确定此机型的ART十六进制地址:1B000-2AFFF。理论上相似方案的机型通用。


breed刷好了ART,设置好了MAC地址,本以为能正常使用,谁知2.4G有了,5G仍消失不见。第二个坑出现了:经过对比拆机图,发现WDR6500 V1-V4使用的5G方案为QCA9882,但V5以后是QCA9886。芯片不同,故编译v2的固件无法使用5G。在论坛内搜索了半天,https://www.right.com.cn/forum/f ... =251818&ordertype=1,这篇帖子提到了Wouldchar大神对此机器做过适配,特别感谢@WouldChar 大神的源码。GITHUB链接:https://github.com/WouldChar/lede_source。但是,我在虚拟机下编译,发现此源码编译到bash就报错退出,简单修改无效,可能是链接缺接口。
看了一下此源码是两年前提交的,很多东西都与现在不同 。
于是参考上个源码在大雕的 openwrt R9 (GITHUB链接:https://github.com/coolsnowwolf/lede)上做了一下适配。

目前2.4G、5G均正常,支持了大雕固件的丰富功能,带去广告和不可描述的功能。放出固件,art和所需工具。刷机方法我使用的是直接编程器将breed刷入SPI。也许有更好的方法可以实现免拆机,若有需要请自行研究







GITHUB源码地址https://github.com/huah0235/lede 需要的可以git clone下来自己编译。个性化添加各种功能2019.6.29更新:本源码已与lean大雕的源码合并,直接下载大雕的源码即可编译

固件及所需breed下载地址:链接: https://pan.baidu.com/s/1tQ9ow1cgc-mfLD-KcAtYlQ 提取码: 5vk3


2020.1.1源自大雕最新源码的OPENWRT固件下载地址:链接:https://pan.baidu.com/s/1Iamot0I8wpW1BHWKI3OL5Q 提取码:aysj









本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 4恩山币 +5 收起 理由
无所不*** + 1 一看就是觉得高端、大气、上档次!
cbm*** + 1 强大的恩山!(以下重复1万次)
coru*** + 1 强大的恩山!(以下重复1万次)
safe*** + 2 感谢楼主对论坛的贡献!!!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
有类似的方案就比较好弄
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

厉害厉害厉害
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

分享楼主的源码,有相同相似配置机器,也都可以刷
tl-wdr5600-v3.c
  1. /*
  2. *  TP-LINK TL-WDR5600 v3 board support
  3. *
  4. *  Copyright (C) 2018 Kerwin Lee <kerwin.lee@yandex.com>
  5. *
  6. *  This program is free software; you can redistribute it and/or modify it
  7. *  under the terms of the GNU General Public License version 2 as published
  8. *  by the Free Software Foundation.
  9. */
  10. #include <linux/pci.h>
  11. #include <linux/gpio.h>
  12. #include <linux/platform_device.h>

  13. #include <asm/mach-ath79/ath79.h>
  14. #include <asm/mach-ath79/ar71xx_regs.h>

  15. #include "common.h"
  16. #include "dev-eth.h"
  17. #include "dev-ap9x-pci.h"
  18. #include "dev-gpio-buttons.h"
  19. #include "dev-leds-gpio.h"
  20. #include "dev-m25p80.h"
  21. #include "dev-wmac.h"
  22. #include "machtypes.h"
  23. #include "pci.h"

  24. #define TL_WR940N_V4_GPIO_LED_WAN                19
  25. #define TL_WR940N_V4_GPIO_LED_WAN_RED                18
  26. #define TL_WR940N_V4_GPIO_LED_LAN4                14
  27. #define TL_WR940N_V4_GPIO_LED_LAN3                15
  28. #define TL_WR940N_V4_GPIO_LED_LAN2                16
  29. #define TL_WR940N_V4_GPIO_LED_LAN1                17
  30. #define TL_WR940N_V4_GPIO_LED_WLAN                13
  31. #define TL_WR940N_V4_GPIO_LED_SYSTEM                21

  32. #define TL_WR940N_V4_GPIO_BTN_RESET                1
  33. #define TL_WR940N_V4_GPIO_BTN_RFKILL                2

  34. #define TL_WR940N_KEYS_POLL_INTERVAL                20
  35. #define TL_WR940N_KEYS_DEBOUNCE_INTERVAL        (3 * TL_WR940N_KEYS_POLL_INTERVAL)

  36. static const char *tl_wr940n_part_probes[] = {
  37.         "tp-link-64k",
  38.         NULL,
  39. };

  40. static struct flash_platform_data tl_wr940n_flash_data = {
  41.         .part_probes        = tl_wr940n_part_probes,
  42. };

  43. static struct gpio_led tl_wr940n_v6_leds_gpio[] __initdata = {
  44.         {
  45.                 .name                = "tp-link:blue:wan",
  46.                 .gpio                = TL_WR940N_V4_GPIO_LED_WAN,
  47.                 .active_low        = 1,
  48.         }, {
  49.                 .name                = "tp-link:red:wan",
  50.                 .gpio                = TL_WR940N_V4_GPIO_LED_WAN_RED,
  51.                 .active_low        = 1,
  52.         }, {
  53.                 .name                = "tp-link:blue:lan1",
  54.                 .gpio                = TL_WR940N_V4_GPIO_LED_LAN1,
  55.                 .active_low        = 0,
  56.         }, {
  57.                 .name                = "tp-link:blue:lan2",
  58.                 .gpio                = TL_WR940N_V4_GPIO_LED_LAN2,
  59.                 .active_low        = 0,
  60.         }, {
  61.                 .name                = "tp-link:blue:lan3",
  62.                 .gpio                = TL_WR940N_V4_GPIO_LED_LAN3,
  63.                 .active_low        = 0,
  64.         }, {
  65.                 .name                = "tp-link:blue:lan4",
  66.                 .gpio                = TL_WR940N_V4_GPIO_LED_LAN4,
  67.                 .active_low        = 0,
  68.         }, {
  69.                 .name                = "tp-link:blue:wlan",
  70.                 .gpio                = TL_WR940N_V4_GPIO_LED_WLAN,
  71.                 .active_low        = 1,
  72.         }, {
  73.                 .name                = "tp-link:blue:system",
  74.                 .gpio                = TL_WR940N_V4_GPIO_LED_SYSTEM,
  75.                 .active_low        = 1,
  76.         },
  77. };

  78. static struct gpio_keys_button tl_wr940n_v4_gpio_keys[] __initdata = {
  79.         {
  80.                 .desc                = "Reset button",
  81.                 .type                = EV_KEY,
  82.                 .code                = KEY_RESTART,
  83.                 .debounce_interval = TL_WR940N_KEYS_DEBOUNCE_INTERVAL,
  84.                 .gpio                = TL_WR940N_V4_GPIO_BTN_RESET,
  85.                 .active_low        = 1,
  86.         },
  87. };

  88. static void __init tl_wdr5600_setup(void)
  89. {
  90.         u8 *mac = (u8 *) KSEG1ADDR(0x1fff080d);
  91.         u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);

  92.         ath79_register_m25p80(&tl_wr940n_flash_data);

  93.         ath79_register_mdio(1, 0x0);

  94.         ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
  95.         ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);

  96.         /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
  97.         ath79_setup_ar933x_phy4_switch(false, false);

  98.         /* GMAC0 is connected to the PHY0 of the internal switch, GE0 */
  99.         ath79_switch_data.phy4_mii_en = 1;
  100.         ath79_switch_data.phy_poll_mask = BIT(4);
  101.         ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  102.         ath79_eth0_data.phy_mask = BIT(4);
  103.         ath79_register_eth(0);

  104.         /* GMAC1 is connected to the internal switch, GE1 */
  105.         ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
  106.         ath79_register_eth(1);

  107.         ath79_register_wmac(art + 0x1000, mac);
  108.         ap91_pci_init(art + 0x2000, NULL);
  109. }

  110. static void __init tl_wdr5600_v3_setup(void)
  111. {
  112.         tl_wdr5600_setup();

  113.         ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr940n_v6_leds_gpio),
  114.                                  tl_wr940n_v6_leds_gpio);

  115.         ath79_register_gpio_keys_polled(-1, TL_WR940N_KEYS_POLL_INTERVAL,
  116.                                         ARRAY_SIZE(tl_wr940n_v4_gpio_keys),
  117.                                         tl_wr940n_v4_gpio_keys);
  118. }

  119. MIPS_MACHINE(ATH79_MACH_TL_WDR5600_V3, "TL-WDR5600-v3", "TP-LINK TL-WDR5600 v3", tl_wdr5600_v3_setup);
复制代码

点评

大神下午好。WDR5600V3也是同配置?LED GPIO还有网口能对应吗  详情 回复 发表于 2019-6-28 16:21
我把github放出来  详情 回复 发表于 2019-6-28 16:16
我把github放出来  详情 回复 发表于 2019-6-28 16:15
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
hello_limin 发表于 2019-6-28 15:41
分享楼主的源码,有相同相似配置机器,也都可以刷

我把github放出来
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 huah0235 于 2019-6-28 16:19 编辑
hello_limin 发表于 2019-6-28 15:41
分享楼主的源码,有相同相似配置机器,也都可以刷

https://github.com/huah0235/lede
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
hello_limin 发表于 2019-6-28 15:41
分享楼主的源码,有相同相似配置机器,也都可以刷

大神下午好。WDR5600V3也是同配置?LED GPIO还有网口能对应吗

点评

[attachimg]295164[/attachimg]  详情 回复 发表于 2019-6-28 17:07
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

huah0235 发表于 2019-6-28 16:21
大神下午好。WDR5600V3也是同配置?LED GPIO还有网口能对应吗


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

我给大雕的R9源码提了pull request,看看能不能合  详情 回复 发表于 2019-6-28 18:17
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层

我给大雕的R9源码提了pull request,看看能不能合
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

楼主厉害,原机内存64MB的,可用么?

点评

可用的,直接刷  详情 回复 发表于 2019-6-28 22:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

感谢分享,学习了。什么时候才能见到有大神捣鼓tp-wdr7800千兆版,好让我学着弄一下我的机器
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
corundum 发表于 2019-6-28 18:37
楼主厉害,原机内存64MB的,可用么?

可用的,直接刷
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

已经收藏,谢谢分享~~~~~~~!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

经典好贴, 值得大家学习, 楼主加油~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

好东西啊,支持
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-29 16:25

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表