找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 11979|回复: 45

发自用的固件wr841-v9、wr2041nd-v2

[复制链接]
本帖最后由 wonathan 于 2017-11-30 08:36 编辑

841v9  链接: https://pan.baidu.com/s/1gfb9Yj5 密码: a8nu


wr2041nd-v2  (941n/nd v7也可用)链接: https://pan.baidu.com/s/1bo26nPd 密码: y7xn

密码为:password



在此感谢大雕开放源码,如大家需要可自行编译。
https://github.com/coolsnowwolf/lede

readme中有教程。自行折腾思考。

本帖子中包含更多资源

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

×

评分

参与人数 1恩山币 +1 收起 理由
skyf*** + 1 强大的恩山!(以下重复1万次)

查看全部评分

厉害了,字数补丁
回复

使用道具 举报

能帮忙编译一份  TP-LINK TL-WR881N v1 的固件么?

8M的就够用啦 谢谢喽

相关的源码见下面,

  1. /*
  2. *  TP-LINK TL-WR881N v1 board support
  3. *
  4. *  Copyright (C) 2016 Alexander Wang <limin2016@yahoo.com>
  5. *  Copyright (C) 2015 Weijie Gao <hackpacsal@gmail.com>
  6. *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
  7. *
  8. *  This program is free software; you can redistribute it and/or modify it
  9. *  under the terms of the GNU General Public License version 2 as published
  10. *  by the Free Software Foundation.
  11. */

  12. #include <linux/pci.h>
  13. #include <linux/phy.h>
  14. #include <linux/gpio.h>
  15. #include <linux/delay.h>
  16. #include <linux/mtd/mtd.h>
  17. #include <linux/mtd/partitions.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/ath9k_platform.h>
  20. #include <linux/ar8216_platform.h>

  21. #include <asm/mach-ath79/ath79.h>
  22. #include <asm/mach-ath79/ar71xx_regs.h>

  23. #include "pci.h"
  24. #include "common.h"
  25. #include "dev-ap9x-pci.h"
  26. #include "dev-eth.h"
  27. #include "dev-gpio-buttons.h"
  28. #include "dev-leds-gpio.h"
  29. #include "dev-m25p80.h"
  30. #include "dev-spi.h"
  31. #include "dev-wmac.h"
  32. #include "machtypes.h"

  33. #define WR881NV1_GPIO_LED_WLAN  12
  34. #define WR881NV1_GPIO_LED_SYSTEM  19
  35. #define WR881NV1_GPIO_LED_WPS 15

  36. #define WR881NV1_GPIO_BTN_RESET 16

  37. #define WR881NV1_KEYS_POLL_INTERVAL 20        /* msecs */
  38. #define WR881NV1_KEYS_DEBOUNCE_INTERVAL (3 * WR881NV1_KEYS_POLL_INTERVAL)

  39. #define ATH_MII_MGMT_CMD  0x24
  40. #define ATH_MGMT_CMD_READ 0x1

  41. #define ATH_MII_MGMT_ADDRESS  0x28
  42. #define ATH_ADDR_SHIFT  8

  43. #define ATH_MII_MGMT_CTRL 0x2c
  44. #define ATH_MII_MGMT_STATUS 0x30

  45. #define ATH_MII_MGMT_IND  0x34
  46. #define ATH_MGMT_IND_BUSY (1 << 0)
  47. #define ATH_MGMT_IND_INVALID  (1 << 2)

  48. #define WR881NV1_WMAC_CALDATA_OFFSET  0x1000

  49. #define QCA955X_ETH_CFG_GMAC0_EN  BIT(1)
  50. #define QCA955X_ETH_CFG_GMAC0_SLAVE BIT(4)

  51. static const char *wr881nv1_part_probes[] = {
  52.         "tp-link",
  53.         NULL,
  54. };

  55. static struct flash_platform_data wr881nv1_flash_data = {
  56.         .part_probes        = wr881nv1_part_probes,
  57. };

  58. static struct gpio_led wr881nv1_leds_gpio[] __initdata = {
  59.         {
  60.                 .name                = "tp-link:green:wps",
  61.                 .gpio                = WR881NV1_GPIO_LED_WPS,
  62.                 .active_low        = 1,
  63.         },
  64.         {
  65.                 .name                = "tp-link:green:system",
  66.                 .gpio                = WR881NV1_GPIO_LED_SYSTEM,
  67.                 .active_low        = 1,
  68.         },
  69.         {
  70.                 .name                = "tp-link:green:wlan",
  71.                 .gpio                = WR881NV1_GPIO_LED_WLAN,
  72.                 .active_low        = 1,
  73.         },
  74. };

  75. static struct gpio_keys_button wr881nv1_gpio_keys[] __initdata = {
  76.         {
  77.                 .desc                = "reset",
  78.                 .type                = EV_KEY,
  79.                 .code                = KEY_RESTART,
  80.                 .debounce_interval = WR881NV1_KEYS_DEBOUNCE_INTERVAL,
  81.                 .gpio                = WR881NV1_GPIO_BTN_RESET,
  82.                 .active_low        = 1,
  83.         },
  84. };

  85. static struct mdio_board_info wr881nv1_mdio0_info[] = {
  86.         {
  87.                 .bus_id = "ag71xx-mdio.0",
  88.                 .phy_addr = 0,
  89.                 .platform_data = NULL,
  90.         },
  91. };

  92. static unsigned long __init ath_gmac_reg_rd(unsigned long reg)
  93. {
  94.         void __iomem *base;
  95.         unsigned long t;

  96.         base = ioremap(AR71XX_GE0_BASE, AR71XX_GE0_SIZE);

  97.         t = __raw_readl(base + reg);

  98.         iounmap(base);

  99.         return t;
  100. }

  101. static void __init ath_gmac_reg_wr(unsigned long reg, unsigned long value)
  102. {
  103.         void __iomem *base;
  104.         unsigned long t = value;

  105.         base = ioremap(AR71XX_GE0_BASE, AR71XX_GE0_SIZE);

  106.         __raw_writel(t, base + reg);

  107.         iounmap(base);
  108. }

  109. static void __init phy_reg_write(unsigned char phy_addr, unsigned char reg, unsigned short data)
  110. {
  111.         unsigned short addr = (phy_addr << ATH_ADDR_SHIFT) | reg;
  112.         volatile int rddata;
  113.         unsigned short ii = 0xFFFF;

  114.         do
  115.         {
  116.                 udelay(5);
  117.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  118.         } while (rddata && --ii);

  119.         ath_gmac_reg_wr(ATH_MII_MGMT_ADDRESS, addr);
  120.         ath_gmac_reg_wr(ATH_MII_MGMT_CTRL, data);

  121.         do
  122.         {
  123.                 udelay(5);
  124.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  125.         } while (rddata && --ii);
  126. }

  127. static unsigned short __init phy_reg_read(unsigned char phy_addr, unsigned char reg)
  128. {
  129.         unsigned short addr = (phy_addr << ATH_ADDR_SHIFT) | reg, val;
  130.         volatile int rddata;
  131.         unsigned short ii = 0xffff;

  132.         do
  133.         {
  134.                 udelay(5);
  135.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  136.         } while (rddata && --ii);

  137.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, 0x0);
  138.         ath_gmac_reg_wr(ATH_MII_MGMT_ADDRESS, addr);
  139.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, ATH_MGMT_CMD_READ);

  140.         do
  141.         {
  142.                 udelay(5);
  143.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  144.         } while (rddata && --ii);

  145.         val = ath_gmac_reg_rd(ATH_MII_MGMT_STATUS);
  146.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, 0x0);

  147.         return val;
  148. }

  149. static void __init athrs27_reg_write(unsigned int s27_addr, unsigned int s27_write_data)
  150. {
  151.         unsigned int addr_temp;
  152.         unsigned int data;
  153.         unsigned char phy_address, reg_address;

  154.         addr_temp = (s27_addr) >> 2;
  155.         data = addr_temp >> 7;

  156.         phy_address = 0x1f;
  157.         reg_address = 0x10;

  158.         phy_reg_write(phy_address, reg_address, data);

  159.         phy_address = (0x17 & ((addr_temp >> 4) | 0x10));

  160.         reg_address = (((addr_temp << 1) & 0x1e) | 0x1);
  161.         data = (s27_write_data >> 16) & 0xffff;
  162.         phy_reg_write(phy_address, reg_address, data);

  163.         reg_address = ((addr_temp << 1) & 0x1e);
  164.         data = s27_write_data  & 0xffff;
  165.         phy_reg_write(phy_address, reg_address, data);
  166. }

  167. static unsigned int __init athrs27_reg_read(unsigned int s27_addr)
  168. {
  169.         unsigned int addr_temp;
  170.         unsigned int s27_rd_csr_low, s27_rd_csr_high, s27_rd_csr;
  171.         unsigned int data;
  172.         unsigned char phy_address, reg_address;

  173.         addr_temp = s27_addr >>2;
  174.         data = addr_temp >> 7;

  175.         phy_address = 0x1f;
  176.         reg_address = 0x10;

  177.         phy_reg_write(phy_address, reg_address, data);

  178.         phy_address = (0x17 & ((addr_temp >> 4) | 0x10));
  179.         reg_address = ((addr_temp << 1) & 0x1e);
  180.         s27_rd_csr_low = (unsigned int) phy_reg_read(phy_address, reg_address);

  181.         reg_address = reg_address | 0x1;
  182.         s27_rd_csr_high = (unsigned int) phy_reg_read(phy_address, reg_address);
  183.         s27_rd_csr = (s27_rd_csr_high << 16) | s27_rd_csr_low ;
  184.        
  185.         return (s27_rd_csr);
  186. }

  187. static void __init ar8236_reset(void)
  188. {
  189.         unsigned short i = 30;

  190.         athrs27_reg_write(0x0, athrs27_reg_read(0x0) | 0x80000000);
  191.         while (i--)
  192.         {
  193.                 mdelay(100);
  194.                 if (!(athrs27_reg_read(0x0) & 0x80000000))
  195.                 break;
  196.         }
  197. }

  198. static void __init wr881nv1_setup(void)
  199. {
  200.         u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
  201.         u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
  202.         u8 tmpmac[ETH_ALEN];

  203.         ath79_register_m25p80(&wr881nv1_flash_data);
  204.        
  205.         ath79_register_pci();
  206.        
  207.         ath79_init_mac(tmpmac, mac, 0);
  208.         ath79_register_wmac(art + WR881NV1_WMAC_CALDATA_OFFSET, tmpmac);

  209.         ath79_register_mdio(0, 0x0);
  210.        
  211.         mdiobus_register_board_info(wr881nv1_mdio0_info,
  212.                                     ARRAY_SIZE(wr881nv1_mdio0_info));

  213.         ar8236_reset();
  214.        
  215.         ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_GMAC0_EN | QCA955X_ETH_CFG_GMAC0_SLAVE);
  216.   
  217.         /* WAN */
  218.         ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);

  219.         /* GMAC0 is connected to the PHY0 of the AR8236 switch, GE0 */
  220.         ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  221.         ath79_eth0_data.duplex = DUPLEX_FULL;
  222.         ath79_eth0_data.speed = SPEED_100;
  223.         ath79_eth0_data.phy_mask = BIT(0);
  224.         ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
  225.         ath79_register_eth(0);
  226.        
  227.         ath79_register_leds_gpio(-1, ARRAY_SIZE(wr881nv1_leds_gpio),
  228.                                  wr881nv1_leds_gpio);
  229.         ath79_register_gpio_keys_polled(-1, WR881NV1_KEYS_POLL_INTERVAL,
  230.                                         ARRAY_SIZE(wr881nv1_gpio_keys),
  231.                                         wr881nv1_gpio_keys);
  232. }

  233. MIPS_MACHINE(ATH79_MACH_TL_WR881N_V1, "TL-WR881N-v1", "TP-LINK TL-WR881N v1", wr881nv1_setup);
复制代码

回复

使用道具 举报

wr841-v9、wr2041nd-v2
回复

使用道具 举报

字数补丁............
回复

使用道具 举报

hello_limin 发表于 2017-11-29 10:31
能帮忙编译一份  TP-LINK TL-WR881N v1 的固件么?

8M的就够用啦  谢谢喽

比lean的源码多了两个定义,别人编译不出来的
回复

使用道具 举报

谢谢分享。2041 V2。
回复

使用道具 举报

不错卡你下好用不
回复

使用道具 举报

本帖最后由 corundum 于 2017-11-29 20:41 编辑

请教楼主:openwrt进入用户名root ,密码 固件密码缺省是:password
回复

使用道具 举报

能否编译个2041nv1的?
回复

使用道具 举报

来自手机 | 显示全部楼层
这不错看看
回复

使用道具 举报

谢谢楼主分享
回复

使用道具 举报

多谢分享         
回复

使用道具 举报

有三个wan口坏了,下来试下
回复

使用道具 举报

 楼主| | 显示全部楼层
apnic 发表于 2017-11-29 21:13
能否编译个2041nv1的?

下次有空补上。
回复

使用道具 举报

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

本版积分规则

关闭

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

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

GMT+8, 2024-5-18 06:52

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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