找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: hello_limin

【2018年03月20日】分享自用 wr881n-v1 的 番羽 墻 固件 纯洁版 嘿嘿 *^_^*

 火... [复制链接]
发表于 2018-3-25 22:34 来自手机 | 显示全部楼层
弱弱问下有4M的吗。。。

点评

4M不可能写的下这么多,建议还是自己升级下FLASH把,5¥不到。。。  发表于 2018-3-28 12:23
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-25 22:48 来自手机 | 显示全部楼层
看看,谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-25 23:49 | 显示全部楼层
6666666666大佬
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-3-31 14:01 | 显示全部楼层
本帖最后由 hello_limin 于 2018-4-7 11:46 编辑






  1. /*  D-Link DIR-869 A1 support.
  2. *
  3. *  Copyright (C) 2015-2016 P. Wassi <p.wassi at gmx.at>
  4. *  Copyright (C) 2017 Matthias Schiffer <mschiffer@universe-factory.net>
  5. *
  6. *  Derived from: TP-Link Archer C60 v2 board.
  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/delay.h>
  13. #include <linux/gpio.h>
  14. #include <linux/init.h>
  15. #include <linux/phy.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/ath9k_platform.h>

  18. #include <asm/mach-ath79/ath79.h>
  19. #include <asm/mach-ath79/irq.h>
  20. #include <asm/mach-ath79/ar71xx_regs.h>

  21. #include <linux/platform_data/phy-at803x.h>
  22. #include <linux/ar8216_platform.h>

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

  31. #define DIR869A1_GPIO_BTN_RESET                16

  32. #define DIR869A1_GPIO_LED_POWER                19
  33. #define DIR869A1_GPIO_LED_WPS        15

  34. #define DIR869A1_KEYS_POLL_INTERVAL        20 /* msecs */
  35. #define DIR869A1_KEYS_DEBOUNCE_INTERVAL        (3 * DIR869A1_KEYS_POLL_INTERVAL)

  36. #define DIR869A1_DEVDATA_ADDR                0x1f01fc00

  37. #define DIR869A1_EEPROM_ADDR                0x1fff0000
  38. #define DIR869A1_WMAC_CALDATA_OFFSET        0x1000
  39. #define DIR869A1_PCI_CALDATA_OFFSET        0x5000

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

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

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

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

  49. #define QCA955X_ETH_CFG_GE0_MII_EN        BIT(1)
  50. #define QCA955X_ETH_CFG_GE0_MII_SLAVE        BIT(4)

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

  55. static struct flash_platform_data dir869a1_flash_data = {
  56.        .part_probes    = dir869a1_part_probes,
  57. };

  58. static struct gpio_led dir869a1_leds_gpio[] __initdata = {
  59.         {
  60.                 .name                = "tp-link:green:system",
  61.                 .gpio                = DIR869A1_GPIO_LED_POWER,
  62.                 .active_low        = 1,
  63.         },
  64.         {
  65.                 .name                = "tp-link:green:wps",
  66.                 .gpio                = DIR869A1_GPIO_LED_WPS,
  67.                 .active_low        = 1,
  68.         },
  69. };

  70. static struct gpio_keys_button dir869a1_gpio_keys[] __initdata = {
  71.         {
  72.                 .desc                = "reset",
  73.                 .type                = EV_KEY,
  74.                 .code                = KEY_RESTART,
  75.                 .debounce_interval = DIR869A1_KEYS_DEBOUNCE_INTERVAL,
  76.                 .gpio                = DIR869A1_GPIO_BTN_RESET,
  77.                 .active_low        = 1,
  78.         },
  79. };

  80. static struct mdio_board_info dir869a1_mdio0_info[] = {
  81.         {
  82.                 .bus_id = "ag71xx-mdio.0",
  83.                 .phy_addr = 0,
  84.                 .platform_data = NULL,
  85.         },
  86. };

  87. static unsigned long __init ath_gmac_reg_rd(unsigned long reg)
  88. {
  89.         void __iomem *base;
  90.         unsigned long t;

  91.         base = ioremap(AR71XX_GE0_BASE, AR71XX_GE0_SIZE);

  92.         t = __raw_readl(base + reg);

  93.         iounmap(base);

  94.         return t;
  95. }

  96. static void __init ath_gmac_reg_wr(unsigned long reg, unsigned long value)
  97. {
  98.         void __iomem *base;
  99.         unsigned long t = value;

  100.         base = ioremap(AR71XX_GE0_BASE, AR71XX_GE0_SIZE);

  101.         __raw_writel(t, base + reg);

  102.         iounmap(base);
  103. }

  104. static void __init phy_reg_write(unsigned char phy_addr, unsigned char reg, unsigned short data)
  105. {
  106.         unsigned short addr = (phy_addr << ATH_ADDR_SHIFT) | reg;
  107.         volatile int rddata;
  108.         unsigned short ii = 0xFFFF;

  109.         do
  110.         {
  111.                 udelay(5);
  112.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  113.         } while (rddata && --ii);

  114.         ath_gmac_reg_wr(ATH_MII_MGMT_ADDRESS, addr);
  115.         ath_gmac_reg_wr(ATH_MII_MGMT_CTRL, data);

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

  122. static unsigned short __init phy_reg_read(unsigned char phy_addr, unsigned char reg)
  123. {
  124.         unsigned short addr = (phy_addr << ATH_ADDR_SHIFT) | reg, val;
  125.         volatile int rddata;
  126.         unsigned short ii = 0xffff;

  127.         do
  128.         {
  129.                 udelay(5);
  130.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  131.         } while (rddata && --ii);

  132.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, 0x0);
  133.         ath_gmac_reg_wr(ATH_MII_MGMT_ADDRESS, addr);
  134.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, ATH_MGMT_CMD_READ);

  135.         do
  136.         {
  137.                 udelay(5);
  138.                 rddata = ath_gmac_reg_rd(ATH_MII_MGMT_IND) & 0x1;
  139.         } while (rddata && --ii);

  140.         val = ath_gmac_reg_rd(ATH_MII_MGMT_STATUS);
  141.         ath_gmac_reg_wr(ATH_MII_MGMT_CMD, 0x0);

  142.         return val;
  143. }

  144. static void __init athrs27_reg_write(unsigned int s27_addr, unsigned int s27_write_data)
  145. {
  146.         unsigned int addr_temp;
  147.         unsigned int data;
  148.         unsigned char phy_address, reg_address;

  149.         addr_temp = (s27_addr) >> 2;
  150.         data = addr_temp >> 7;

  151.         phy_address = 0x1f;
  152.         reg_address = 0x10;

  153.         phy_reg_write(phy_address, reg_address, data);

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

  155.         reg_address = (((addr_temp << 1) & 0x1e) | 0x1);
  156.         data = (s27_write_data >> 16) & 0xffff;
  157.         phy_reg_write(phy_address, reg_address, data);

  158.         reg_address = ((addr_temp << 1) & 0x1e);
  159.         data = s27_write_data  & 0xffff;
  160.         phy_reg_write(phy_address, reg_address, data);
  161. }

  162. static unsigned int __init athrs27_reg_read(unsigned int s27_addr)
  163. {
  164.         unsigned int addr_temp;
  165.         unsigned int s27_rd_csr_low, s27_rd_csr_high, s27_rd_csr;
  166.         unsigned int data;
  167.         unsigned char phy_address, reg_address;

  168.         addr_temp = s27_addr >>2;
  169.         data = addr_temp >> 7;

  170.         phy_address = 0x1f;
  171.         reg_address = 0x10;

  172.         phy_reg_write(phy_address, reg_address, data);

  173.         phy_address = (0x17 & ((addr_temp >> 4) | 0x10));
  174.         reg_address = ((addr_temp << 1) & 0x1e);
  175.         s27_rd_csr_low = (unsigned int) phy_reg_read(phy_address, reg_address);

  176.         reg_address = reg_address | 0x1;
  177.         s27_rd_csr_high = (unsigned int) phy_reg_read(phy_address, reg_address);
  178.         s27_rd_csr = (s27_rd_csr_high << 16) | s27_rd_csr_low ;
  179.        
  180.         return (s27_rd_csr);
  181. }

  182. static void __init ar8236_reset(void)
  183. {
  184.         unsigned short i = 30;

  185.         athrs27_reg_write(0x0, athrs27_reg_read(0x0) | 0x80000000);
  186.         while (i--)
  187.         {
  188.                 mdelay(100);
  189.                 if (!(athrs27_reg_read(0x0) & 0x80000000))
  190.                 break;
  191.         }
  192. }

  193. static void __init dir869a1_setup(void)
  194. {
  195.         u8 *mac = (u8 *) KSEG1ADDR(DIR869A1_DEVDATA_ADDR);
  196.         u8 *art = (u8 *) KSEG1ADDR(DIR869A1_EEPROM_ADDR);
  197.         u8 tmpmac[ETH_ALEN];

  198.         ath79_register_m25p80(&dir869a1_flash_data);

  199.     ar8236_reset();

  200.         ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_GE0_MII_EN |
  201.                                                         QCA955X_ETH_CFG_GE0_MII_SLAVE);

  202.         ath79_register_mdio(0, 0x0);

  203.         mdiobus_register_board_info(dir869a1_mdio0_info,
  204.                          ARRAY_SIZE(dir869a1_mdio0_info));

  205.         ath79_init_mac(tmpmac, mac, 2);
  206.         ath79_register_wmac(art + DIR869A1_WMAC_CALDATA_OFFSET, tmpmac);

  207.         /* WAN port */
  208.         ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
  209.        
  210.         /* GMAC0 is connected to the PHY0 of the internal switch */
  211.         ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  212.         ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
  213.         ath79_eth0_data.speed = SPEED_100;
  214.         ath79_eth0_data.duplex = DUPLEX_FULL;
  215.         ath79_eth0_data.phy_mask = BIT(0);
  216.         ath79_register_eth(0);

  217.         /* Actually, this GPIO controls the LED power,
  218.          * while d-link:orange:status switches it between
  219.          * orange and white */
  220.         ath79_register_leds_gpio(-1, ARRAY_SIZE(dir869a1_leds_gpio),
  221.                                  dir869a1_leds_gpio);

  222.         ath79_register_gpio_keys_polled(-1, DIR869A1_KEYS_POLL_INTERVAL,
  223.                                         ARRAY_SIZE(dir869a1_gpio_keys),
  224.                                         dir869a1_gpio_keys);
  225. }

  226. MIPS_MACHINE(ATH79_MACH_TL_WR881ND_V1, "TL-WR881ND-V1", "TP-Link TL-WR881N/ND rev. A1", dir869a1_setup);
复制代码


本帖子中包含更多资源

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

×

点评

另外是把这个文件放在ath97目录下吗?  详情 回复 发表于 2018-5-8 13:11
请问如果要想改成16M的固件,哪里改?  详情 回复 发表于 2018-5-8 12:55

评分

参与人数 1恩山币 +1 收起 理由
ssg338c + 1 支付宝已转5毛给你!

查看全部评分

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

使用道具 举报

发表于 2018-4-2 13:19 来自手机 | 显示全部楼层
中继怎么样?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-2 14:06 | 显示全部楼层
不错啊,下载下来看看效果如何
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-2 15:41 | 显示全部楼层
感觉很牛逼呀,先收藏了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-2 16:00 | 显示全部楼层
看看是什么
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-10 12:24 | 显示全部楼层
自动fan greatwall?有木有账号啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-11 01:44 | 显示全部楼层
地址没隐藏啊

点评

隐藏了啊 你再看看?  详情 回复 发表于 2018-4-14 20:32
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-4-14 20:32 | 显示全部楼层

隐藏了啊 你再看看?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-14 22:32 | 显示全部楼层
老大,我有个941ND-V6 (当然是CN版), 机器是4M的, 是不是SS或者S.SR是死活搞不进去的?

因为要搞S-S也不单纯是S-S一个, 肯定还需要那个 CHINA-LIST或者CHNROUTE, 单纯这个文件就大概有100多K了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-14 22:33 | 显示全部楼层
即使是现在LEDE出现的那个FOR SMALL FLASH机器那一个TARGET, 也是搞不定啊,编译试了下根本少不了多少体积
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-14 22:38 | 显示全部楼层
这负载能用愉快网上冲浪吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-4-14 22:39 | 显示全部楼层
不需要UPNP, 不需要KMS, 能有LUCI界面,服务有S.SR方案或者S.S+china-dns方案, 941NDV6 4M 能编译的出来么老大
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-19 04:01

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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