OpenWrt Forum Archive

Topic: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

The content of this topic has been archived between 3 Apr 2018 and 3 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Hi everybody,
I have a WNR2000 and succeeded in getting telnet going.  I would like to set up IPV6 on this thing.  Do I need to reflash it or are there packages out there I can install on top of the current firmware?  Is it realistic, as I can see some don't even get the ethernet ports going?
thx

Which firmware did you use to get telnet working?

Hi,
Thx for your response.  I am running V1.1.2.6.  I can handle some Linux commands but I am not about to start soldering a serial port or something.  I don't mind chewing through a pile of documentation but I would like to know if it is a realistic goal before I start using a whole weekend on it.
thx

So you still run the stock firmware.  I'm not aware of any openwrt firmware that runs on it yet, though the stock firmware was built with openwrt kernel 2.6.15.  Netgear makes the GPL part of the stock firmware available for download, but they hold back their own code such as the UI.  I download their GPL offering, build the firmware, hacked it alittle bit to get telnet running (with no password).  The system seems to run, but you have no UI to configure it.  I suppose you can compile your own apps and add to it, but I wouldn't recommend it, unless you know what you're doing.

Thank you.  I guess I'll have to wait....

Recent changes in Trunk should improve Ethernet support. I haven't tested, but I encourage anyone with a serial port hooked up to give tftpboot a try on latest trunk.

I'm testing the latest but I'm getting:

Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: s25sl032a (4096 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0x3e0000
Searching for RedBoot partition table in spi0.0 at offset 0x3f0000
No RedBoot partition table detected in spi0.0
Creating 6 MTD partitions on "spi0.0":
0x00000000-0x00020000 : "u-boot"
0x00020000-0x00030000 : "config"
0x00030000-0x000f0000 : "kernel"
0x000f0000-0x003e0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=300000, len=E0000
0x00300000-0x003e0000 : "rootfs_data"
0x003e0000-0x00400000 : "art"
0x00030000-0x003e0000 : "firmware"
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 132k freed
Please be patient, while OpenWrt loads ...
Algorithmics/MIPS FPU Emulator v1.5
Kernel panic - not syncing: Attempted to kill init!

I put up a binary build of ramdisk image for tftpboot of SVN 14665 here: http://sites.google.com/site/stephengutknecht/  -- this should have working LAN and WAN ports.

(Last edited by RoundSparrow on 26 Feb 2009, 08:30)

RoundSparrow wrote:

I put up a binary build of ramdisk image for tftpboot of SVN 14665 here: http://sites.google.com/site/stephengutknecht/  -- this should have working LAN and WAN ports.

I've tried the image openwrt_r14665_ar71xx-uImage-gzip.bin with tftpboot, and indeed the LAN ports work normally, however, the WAN still does not work. WAN port can send out packet successfully, but it seems there is some issue on receiving packet -- I made WAN port send out ARP request packet and observed the packet is out successfully but WNR2000 does not have any react to the incoming ARP response and send out ARP request again and again.

yjchang wrote:
RoundSparrow wrote:

I put up a binary build of ramdisk image for tftpboot of SVN 14665 here: http://sites.google.com/site/stephengutknecht/  -- this should have working LAN and WAN ports.

I've tried the image openwrt_r14665_ar71xx-uImage-gzip.bin with tftpboot, and indeed the LAN ports work normally, however, the WAN still does not work. WAN port can send out packet successfully, but it seems there is some issue on receiving packet -- I made WAN port send out ARP request packet and observed the packet is out successfully but WNR2000 does not have any react to the incoming ARP response and send out ARP request again and again.

It seems this issue is caused by my wnr2000 hardware problem. sad
I've tried another wnr2000 board, and wan port works.

yjchang wrote:
yjchang wrote:

I've tried the image openwrt_r14665_ar71xx-uImage-gzip.bin with tftpboot, and indeed the LAN ports work normally, however, the WAN still does not work. WAN port can send out packet successfully, but it seems there is some issue on receiving packet -- I made WAN port send out ARP request packet and observed the packet is out successfully but WNR2000 does not have any react to the incoming ARP response and send out ARP request again and again.

It seems this issue is caused by my wnr2000 hardware problem. sad
I've tried another wnr2000 board, and wan port works.

If the same router works fine with the default vendor firmware.... then do anything you can to determine the differences between the two routers. This is very new adaption, is likely some subtle issue in OpenWRT.  We had similar problems with nearly-identical Trendnet hardware due to bad EPROM settings on the WLAN device.  Only two routers out of 10 had this issue.  It seems the factory firmware ignored the EEPROM and used alternate config....  so we had to adjust OpenWRT to deal with bad EPROM.   ((Just so I'm clear, this does not sound your problem, as OpenWRT is already randomly assigning mac address on LAN ports right now))

Cold boot both devices.  Maybe get copies of both of your dmesg files and run diff?  also run "uci show" and diff that between devices.

(Last edited by RoundSparrow on 27 Feb 2009, 14:50)

Hello,

I just bought a WNR2000 router.
I need a dhcp relay feature which is not a provided.
It seems OpenWRT does not currently support that router. Comming soons ?
Can you tell me if i can recompile NetGear Firmware addind openwrt dhcp-relay package.
I read that NetGeart GPL code doesn't include GUI but i can get GUI directly on router (connected with telnet).

Thanks by advance.

(Last edited by m3z on 17 Mar 2009, 11:29)

m3z wrote:

I just bought a WNR2000 router.
I need a dhcp relay feature which is not a provided.
It seems OpenWRT does not currently support that router. Comming soons ?
Can you tell me if i can recompile NetGear Firmware addind openwrt dhcp-relay package.
I read that NetGeart GPL code doesn't include GUI but i can get GUI directly on router (connected with telnet).

Right now, only option is to solder in serial port and tftpboot it with current OpenWrt (Trunk).  The checksum issue of flashing to firmware is not yet resolved.  Bartman007, you out there to update status on that?

The stock firmware is based on White Russian, I've never touched it so I can't really offer any assistance.

I agree you can copy the GUI off the binary install if you go with modifying the stock firmware.... that should get around that issue. You obviously don't have the source code to modify it.

m3z wrote:

Hello,

I just bought a WNR2000 router.
I need a dhcp relay feature which is not a provided.
It seems OpenWRT does not currently support that router. Comming soons ?
Can you tell me if i can recompile NetGear Firmware addind openwrt dhcp-relay package.
I read that NetGeart GPL code doesn't include GUI but i can get GUI directly on router (connected with telnet).

Thanks by advance.

It might be easier if you just un-assemble the stock firmware, get the rootfs, use the GPL package to build your own firmware with modified rootfs.

Hello,

and thanks a lot for your help.

scerpio, i am sorry i dont understand why i a have to un-assemble stock firmware.

I think the simple way to build a moded stock firmware is :

1) tar stock firmware and save (telnet)
2) recompile GPL code with the White Russian dhcp-relay package added. I suppose (not try yet) i get a ramfs image.
3) Load image with tftp
4) tar new firmware
5) diff tars
6) adapt (starting script ...) and reload files not included in new firmware.

7) be happy wink

Is it correct ?

You can download the stock firmware from netgear.  Its size is 2883713 bytes.  The last 2097153 bytes of the stock firmware image is the rootfs.  I use dd to extract it out.  This root file system is squashfs-lzma version 2.1.  I use unsquashfs to restore the root file system.  No need to get into the router.

Ok i see.
it seems i still have to work a little wink

I managed to get an openwrt image past the netgear webupload page only to get a crc checksum error trying to boot it and then found out that the tftp mode didn't work.
It took a while to figure out that there is a bug in the bootloader networking code

The bug is triggered by the 4th digit of the mac address of the network card on your computer being a 5, it causes the router to corrupt the packets it sends out to that mac address.

ex)
router mac)AA:BB:CC:DD:EE network card mac)11:25:33:44:55:66
any frames/packets coming from the router to the network card would be corrupted, the router mac address in the ethernet frames would change to CC:DD:EE:08:00, and the network card mac would change to 33:44:55:66:AA:BB, your computer ignores the packets as they are not addressed to it and 2 way communication needed for tftp recovery is not possible.

Can someone else confirm this is a bug and that its not just my router, and then send another bug report to netgear to bring it to their attention.
bootloader version: U-Boot 1.1.4.16-g04e9b8bf (May 14 2008 - 17:04:28)

(Last edited by Sean84 on 31 Jul 2009, 07:41)

Sean84 wrote:

I managed to get an openwrt image past the netgear webupload page only to get a crc checksum error trying to boot it and then found out that the tftp mode didn't work.
It took a while to figure out that there is a bug in the bootloader networking code

The bug is triggered by the 4th digit of the mac address of the network card on your computer being a 5, it causes the router to corrupt the packets it sends out to that mac address.

ex)
router mac)AA:BB:CC:DD:EE network card mac)11:25:33:44:55:66
any frames/packets coming from the router to the network card would be corrupted, the router mac address in the ethernet frames would change to CC:DD:EE:08:00, and the network card mac would change to 33:44:55:66:AA:BB, your computer ignores the packets as they are not addressed to it and 2 way communication needed for tftp recovery is not possible.

Can someone else confirm this is a bug and that its not just my router, and then send another bug report to netgear to bring it to their attention.
bootloader version: U-Boot 1.1.4.16-g04e9b8bf (May 14 2008 - 17:04:28)

Did Netgear ever resolve this issue? I have a card with a 5 as the 4th digit of the MAC address and a WNR2000 if we need another bug report.

RoundSparrow wrote:

WNR2000 - I had previously overlooked that we have source code for the u-boot for this router.  So the checksum feature that is preventing us from flashing OpenWRT could be replaced.  Anyone wanting to hack on u-boot wink ?

Has anyone already built a new u-boot for WNR2000 and flashed it?
I looked into the dl/u-boot-1.1.4.tgz from the Netgear source tarball (v1.2.3.7) but I couldn't find
any WNR2000 specific configuration. include/configs/ap81.h contains a flash layout for 8Mbyte flash only.

(Last edited by jal2 on 21 Mar 2010, 10:38)

jal2 wrote:
RoundSparrow wrote:

WNR2000 - I had previously overlooked that we have source code for the u-boot for this router.  So the checksum feature that is preventing us from flashing OpenWRT could be replaced.  Anyone wanting to hack on u-boot wink ?

Has anyone already built a new u-boot for WNR2000 and flashed it?
I looked into the dl/u-boot-1.1.4.tgz from the Netgear source tarball (v1.2.3.7) but I couldn't find
any WNR2000 specific configuration. include/configs/ap81.h contains a flash layout for 8Mbyte flash only.

I think i found the code. It's in "lib_mips/mips_linux.c". The directives are under the flag CONFIG_AR7100.

I'm a bit rusty with C, therefore i don't know how to set in with the code and i have no time to find info now. I hope my finding will help someone smile

cyrusza wrote:
jal2 wrote:
RoundSparrow wrote:

WNR2000 - I had previously overlooked that we have source code for the u-boot for this router.  So the checksum feature that is preventing us from flashing OpenWRT could be replaced.  Anyone wanting to hack on u-boot wink ?

Has anyone already built a new u-boot for WNR2000 and flashed it?
I looked into the dl/u-boot-1.1.4.tgz from the Netgear source tarball (v1.2.3.7) but I couldn't find
any WNR2000 specific configuration. include/configs/ap81.h contains a flash layout for 8Mbyte flash only.

I think i found the code. It's in "lib_mips/mips_linux.c". The directives are under the flag CONFIG_AR7100.

I'm a bit rusty with C, therefore i don't know how to set in with the code and i have no time to find info now. I hope my finding will help someone smile

IMHO that's only the code called if a Linux kernel is booted (do_bootm_linux).
The checksum is calculated in common/main.c inside main_loop(), look for a call to check_rootfs_checksum(). If the checksum of the rootfs is wrong, autoboot (the bootm variable's content) [s]is[/s] isn't executed and the bootloader enters tftp.

My question was if anone has found the configuration file for the WNR2000 in include/configs. Usually you define the features of your board in a separate file there, including the values for the bootargs and serverip env variables. I couldn't find any config file matching the settings of the WNR2000 u-boot env.

(Last edited by jal2 on 25 Mar 2010, 13:48)

I guess I've located the checksum comparsion in the u-boot binary.
Patched the check of the result, but as I don't own any AR9130 based board with JTAG, I don't dare to flash it.

Anyone else out there with JTAG who wants to try it? Just drop me an email.

I'm not that familar with jtag but if you could give some how to links I might be able to afford a jtag cable sometime soon. I bought this router and should arrive by tuesday and after that I'll look into getting a jtag cable.

Allaun wrote:

I'm not that familar with jtag but if you could give some how to links I might be able to afford a jtag cable sometime soon. I bought this router and should arrive by tuesday and after that I'll look into getting a jtag cable.

Currently we don' know where the JTAG pins on the WNR2000 are. I asked for someone with another board with JTAG and the same SoC to test the bootloader first (DIR-615 C1, ..., see some previous posts).
So if you only own a WNR2000 and none of the other boards there is no use for a JTAG cable yet.

Sorry, posts 51 to 50 are missing from our archive.