找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 9004|回复: 15

编译WNDRMAC的OP问题,找不到相应参数,难道不能解锁uboot和art?【已解决】

[复制链接]
发表于 2014-7-21 20:45 | 显示全部楼层 |阅读模式
本帖最后由 ziranww 于 2014-7-22 23:05 编辑

用4楼的wlgent兄弟的方法编译的ROM成功刷入ART,WNDRMAC变成WNDR3800,不拆机,不用TTL和编程器。

传送门:https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=144802

wndrmac用的是wndr3700v2的mtdlayout
修改/target/linux/ar71xx/image/Makefile中定义mtdlayout的一行
wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro


(u-boot)ro
(art)ro
后面的ro删掉。这里ro代表read only


==========我是分割线============

想把WNDRMAC刷成WNDR3800,没有编程器,也不会用,于是在论坛里查到可以刷解锁uboot和art的op来刷uboot和art

之前发过帖子:https://www.right.com.cn/forum/thread-144802-1-1.html
论坛和百度搜索找了两个解锁UBOOT的OP刷了后还是无法刷入art,一直提示:
root@OpenWrt:/tmp# mtd -r write art.bin art
Could not open mtd device: art
Can't open device for writing!
由于编译者都不是用WNDRMAC的,猜测可能编译后没有测试过,于是想自己编译一个试试,研究了几天,参考其他路由器修改如下参数:
  1. static struct mtd_partition tl_wr841n_v1_partitions[] = {
  2.         {
  3.                 .name                = "redboot",
  4.                 .offset                = 0,
  5.                 .size                = 0x020000,
  6.                 .mask_flags        = MTD_WRITEABLE,
  7.         }, {
  8.                 .name                = "kernel",
  9.                 .offset                = 0x020000,
  10.                 .size                = 0x140000,
  11.         }, {
  12.                 .name                = "rootfs",
  13.                 .offset                = 0x160000,
  14.                 .size                = 0x280000,
  15.         }, {
  16.                 .name                = "config",
  17.                 .offset                = 0x3e0000,
  18.                 .size                = 0x020000,
  19.                 .mask_flags        = MTD_WRITEABLE,
  20.         }, {
  21.                 .name                = "firmware",
  22.                 .offset                = 0x020000,
  23.                 .size                = 0x3c0000,
  24.         }
  25. };
复制代码


搜索下载的源码,找到mach-wndr3700.c,一打开悲剧了,找不到相应的参数,难道是传说中的网件的这几款AR71XX不能解锁UBOOT?全部代码如下:
  1. /*
  2. *  Netgear WNDR3700 board support
  3. *
  4. *  Copyright (C) 2009 Marco Porsch
  5. *  Copyright (C) 2009-2012 Gabor Juhos <juhosg@openwrt.org>
  6. *
  7. *  This program is free software; you can redistribute it and/or modify it
  8. *  under the terms of the GNU General Public License version 2 as published
  9. *  by the Free Software Foundation.
  10. */

  11. #include <linux/platform_device.h>
  12. #include <linux/mtd/mtd.h>
  13. #include <linux/mtd/partitions.h>
  14. #include <linux/delay.h>
  15. #include <linux/rtl8366.h>

  16. #include <asm/mach-ath79/ath79.h>

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

  24. #define WNDR3700_GPIO_LED_WPS_ORANGE        0
  25. #define WNDR3700_GPIO_LED_POWER_ORANGE        1
  26. #define WNDR3700_GPIO_LED_POWER_GREEN        2
  27. #define WNDR3700_GPIO_LED_WPS_GREEN        4
  28. #define WNDR3700_GPIO_LED_WAN_GREEN        6

  29. #define WNDR3700_GPIO_BTN_WPS                3
  30. #define WNDR3700_GPIO_BTN_RESET                8
  31. #define WNDR3700_GPIO_BTN_WIFI                11

  32. #define WNDR3700_GPIO_RTL8366_SDA        5
  33. #define WNDR3700_GPIO_RTL8366_SCK        7

  34. #define WNDR3700_KEYS_POLL_INTERVAL        20        /* msecs */
  35. #define WNDR3700_KEYS_DEBOUNCE_INTERVAL (3 * WNDR3700_KEYS_POLL_INTERVAL)

  36. #define WNDR3700_ETH0_MAC_OFFSET        0
  37. #define WNDR3700_ETH1_MAC_OFFSET        0x6

  38. #define WNDR3700_WMAC0_MAC_OFFSET        0
  39. #define WNDR3700_WMAC1_MAC_OFFSET        0xc
  40. #define WNDR3700_CALDATA0_OFFSET        0x1000
  41. #define WNDR3700_CALDATA1_OFFSET        0x5000

  42. static struct gpio_led wndr3700_leds_gpio[] __initdata = {
  43.         {
  44.                 .name                = "netgear:green:power",
  45.                 .gpio                = WNDR3700_GPIO_LED_POWER_GREEN,
  46.                 .active_low        = 1,
  47.         }, {
  48.                 .name                = "netgear:orange:power",
  49.                 .gpio                = WNDR3700_GPIO_LED_POWER_ORANGE,
  50.                 .active_low        = 1,
  51.         }, {
  52.                 .name                = "netgear:green:wps",
  53.                 .gpio                = WNDR3700_GPIO_LED_WPS_GREEN,
  54.                 .active_low        = 1,
  55.         }, {
  56.                 .name                = "netgear:orange:wps",
  57.                 .gpio                = WNDR3700_GPIO_LED_WPS_ORANGE,
  58.                 .active_low        = 1,
  59.         }, {
  60.                 .name                = "netgear:green:wan",
  61.                 .gpio                = WNDR3700_GPIO_LED_WAN_GREEN,
  62.                 .active_low        = 1,
  63.         }
  64. };

  65. static struct gpio_keys_button wndr3700_gpio_keys[] __initdata = {
  66.         {
  67.                 .desc                = "reset",
  68.                 .type                = EV_KEY,
  69.                 .code                = KEY_RESTART,
  70.                 .debounce_interval = WNDR3700_KEYS_DEBOUNCE_INTERVAL,
  71.                 .gpio                = WNDR3700_GPIO_BTN_RESET,
  72.                 .active_low        = 1,
  73.         }, {
  74.                 .desc                = "wps",
  75.                 .type                = EV_KEY,
  76.                 .code                = KEY_WPS_BUTTON,
  77.                 .debounce_interval = WNDR3700_KEYS_DEBOUNCE_INTERVAL,
  78.                 .gpio                = WNDR3700_GPIO_BTN_WPS,
  79.                 .active_low        = 1,
  80.         }, {
  81.                 .desc                = "wifi",
  82.                 .type                = EV_KEY,
  83.                 .code                = BTN_2,
  84.                 .debounce_interval = WNDR3700_KEYS_DEBOUNCE_INTERVAL,
  85.                 .gpio                = WNDR3700_GPIO_BTN_WIFI,
  86.                 .active_low        = 1,
  87.         }
  88. };

  89. static struct rtl8366_platform_data wndr3700_rtl8366s_data = {
  90.         .gpio_sda        = WNDR3700_GPIO_RTL8366_SDA,
  91.         .gpio_sck        = WNDR3700_GPIO_RTL8366_SCK,
  92. };

  93. static struct platform_device wndr3700_rtl8366s_device = {
  94.         .name                = RTL8366S_DRIVER_NAME,
  95.         .id                = -1,
  96.         .dev = {
  97.                 .platform_data        = &wndr3700_rtl8366s_data,
  98.         }
  99. };

  100. static void __init wndr3700_setup(void)
  101. {
  102.         u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);

  103.         /*
  104.          * The eth0 and wmac0 interfaces share the same MAC address which
  105.          * can lead to problems if operated unbridged. Set the locally
  106.          * administered bit on the eth0 MAC to make it unique.
  107.          */
  108.         ath79_init_local_mac(ath79_eth0_data.mac_addr,
  109.                              art + WNDR3700_ETH0_MAC_OFFSET);
  110.         ath79_eth0_pll_data.pll_1000 = 0x11110000;
  111.         ath79_eth0_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev;
  112.         ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
  113.         ath79_eth0_data.speed = SPEED_1000;
  114.         ath79_eth0_data.duplex = DUPLEX_FULL;

  115.         ath79_init_mac(ath79_eth1_data.mac_addr,
  116.                         art + WNDR3700_ETH1_MAC_OFFSET, 0);
  117.         ath79_eth1_pll_data.pll_1000 = 0x11110000;
  118.         ath79_eth1_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev;
  119.         ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
  120.         ath79_eth1_data.phy_mask = 0x10;

  121.         ath79_register_eth(0);
  122.         ath79_register_eth(1);

  123.         ath79_register_usb();

  124.         ath79_register_m25p80(NULL);

  125.         ath79_register_leds_gpio(-1, ARRAY_SIZE(wndr3700_leds_gpio),
  126.                                  wndr3700_leds_gpio);

  127.         ath79_register_gpio_keys_polled(-1, WNDR3700_KEYS_POLL_INTERVAL,
  128.                                         ARRAY_SIZE(wndr3700_gpio_keys),
  129.                                         wndr3700_gpio_keys);

  130.         platform_device_register(&wndr3700_rtl8366s_device);
  131.         platform_device_register_simple("wndr3700-led-usb", -1, NULL, 0);

  132.         ap9x_pci_setup_wmac_led_pin(0, 5);
  133.         ap9x_pci_setup_wmac_led_pin(1, 5);

  134.         /* 2.4 GHz uses the first fixed antenna group (1, 0, 1, 0) */
  135.         ap9x_pci_setup_wmac_gpio(0, (0xf << 6), (0xa << 6));

  136.         /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */
  137.         ap9x_pci_setup_wmac_gpio(1, (0xf << 6), (0x6 << 6));

  138.         ap94_pci_init(art + WNDR3700_CALDATA0_OFFSET,
  139.                       art + WNDR3700_WMAC0_MAC_OFFSET,
  140.                       art + WNDR3700_CALDATA1_OFFSET,
  141.                       art + WNDR3700_WMAC1_MAC_OFFSET);
  142. }

  143. MIPS_MACHINE(ATH79_MACH_WNDR3700, "WNDR3700",
  144.              "NETGEAR WNDR3700/WNDR3800/WNDRMAC",
  145.              wndr3700_setup);
复制代码

对比了几个路由,差别比较大,如wr841n就有相应值,请问一下高手如何实现解锁OP的UBOOT和ART?







我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-7-22 10:40 | 显示全部楼层
试试刷CeroWrt,有wndrmac升级固件。
http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.48-2/

点评

谢谢兄弟,这个固件没听说过,试试看,问一下是解锁uboot和art的?  详情 回复 发表于 2014-7-22 11:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-22 11:01 | 显示全部楼层
数不清 发表于 2014-7-22 10:40
试试刷CeroWrt,有wndrmac升级固件。
http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.48-2/ ...

谢谢兄弟,这个固件没听说过,试试看,问一下是解锁uboot和art的?

点评

另一个版本的OpenWRT  详情 回复 发表于 2014-7-22 14:42
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-22 12:58 | 显示全部楼层
wndrmac用的是wndr3700v2的mtdlayout
修改/target/linux/ar71xx/image/Makefile中定义mtdlayout的一行
wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro

(u-boot)ro
(art)ro
后面的ro删掉。这里ro代表read only

点评

再次感谢兄弟,经过几个小时的编译,终于好了,刷到路由器后直接可以修改ART,不拆机成功把wmdrmac刷成了3800  详情 回复 发表于 2014-7-22 22:13
太好了,谢谢兄弟  详情 回复 发表于 2014-7-22 13:53

评分

参与人数 1恩山币 +3 收起 理由
ZHIZ*** + 3 一看就是觉得高端、大气、上档次!

查看全部评分

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

使用道具 举报

 楼主| 发表于 2014-7-22 13:53 | 显示全部楼层
wlgent 发表于 2014-7-22 12:58
wndrmac用的是wndr3700v2的mtdlayout
修改/target/linux/ar71xx/image/Makefile中定义mtdlayout的一行

太好了,谢谢兄弟
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-22 14:42 | 显示全部楼层
ziranww 发表于 2014-7-22 11:01
谢谢兄弟,这个固件没听说过,试试看,问一下是解锁uboot和art的?

另一个版本的OpenWRT

点评

按4楼那位兄弟说的,在编译中,晚上应该差不多了  详情 回复 发表于 2014-7-22 15:27
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-22 15:27 | 显示全部楼层
数不清 发表于 2014-7-22 14:42
另一个版本的OpenWRT

按4楼那位兄弟说的,在编译中,晚上应该差不多了

点评

这里有介绍: http://www.right.com.cn/forum/thread-145377-1-1.html CeroWRT介绍: https://www.bufferbloat.net/projects/cerowrt/wiki  详情 回复 发表于 2014-7-22 19:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-22 19:29 | 显示全部楼层
ziranww 发表于 2014-7-22 15:27
按4楼那位兄弟说的,在编译中,晚上应该差不多了

这里有介绍:
https://www.right.com.cn/forum/thread-145377-1-1.html

CeroWRT介绍:
https://www.bufferbloat.net/projects/cerowrt/wiki

点评

刷了一下感觉带的东西太多了,有些我都不需要的功能,有一个地方比较爽:支持访客网络,和网件官方的系统差不多,好像其他的OP系统没看到过,囧,主要是国内玩wndrmac和wndr3800,3700的人不多,国人编译的ROM不多  详情 回复 发表于 2014-7-22 22:15
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-22 22:13 | 显示全部楼层
wlgent 发表于 2014-7-22 12:58
wndrmac用的是wndr3700v2的mtdlayout
修改/target/linux/ar71xx/image/Makefile中定义mtdlayout的一行

再次感谢兄弟,经过几个小时的编译,终于好了,刷到路由器后直接可以修改ART,不拆机成功把wmdrmac刷成了3800
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-22 22:15 | 显示全部楼层
数不清 发表于 2014-7-22 19:29
这里有介绍:
https://www.right.com.cn/forum/thread-145377-1-1.html

刷了一下感觉带的东西太多了,有些我都不需要的功能,有一个地方比较爽:支持访客网络,和网件官方的系统差不多,好像其他的OP系统没看到过,囧,主要是国内玩wndrmac和wndr3800,3700的人不多,国人编译的ROM不多

点评

QoS不错,特色功能也不少,可以尝试 试用一下。  详情 回复 发表于 2014-7-23 10:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-23 10:58 | 显示全部楼层
ziranww 发表于 2014-7-22 22:15
刷了一下感觉带的东西太多了,有些我都不需要的功能,有一个地方比较爽:支持访客网络,和网件官方的系统 ...

QoS不错,特色功能也不少,可以尝试 试用一下。

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

使用道具 举报

发表于 2015-8-9 13:43 | 显示全部楼层
学习了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-5-15 09:38 | 显示全部楼层
。全是高手学习了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-6-22 12:32 | 显示全部楼层
没学会啊!
我的是3800CH,现在刷的是明月版的op,用楼主的方法1、2都刷不了H大的u-boot
提示:Could not open mtd device: u-boot
         Can't open device for writing!
刷art也是一样的提示,要怎么办呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-6-22 12:38 | 显示全部楼层
要自己编译一个3800CH的u-boot和art吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-26 07:21

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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