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

well I have not attempted to TFTP anything to it yet, and telnet does not connect to it anymore, no login response or anything.

77 (edited by Jarvid 2010-12-04 16:25:46)

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

Hello,

it's me again. With help of the serial console I was finally able to see the reason the system wasn't booting the image:
"Bad Magic Number"

Any ideas? smile

--edit--
Well ok smile
running "imls" in u-boot gave me the correct adress for bootm, now my uImage was loaded big_smile
Maybe you should extend ur guide by this point fuhry?
Everthing else worked great, especially the patched u-boot, thanks a lot!

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

Hi again...
Um, Jarvid, might you be able to expound upon this "imls" bit?
I opened the u-boot.bin file in hopes that I might be able to decipher something... and I drowned.
Perhaps it has something to do with my opening the .bin file with Notepad++... and not some better-suited prog...? er, yeah, not a code-competent person here, sorry.
I'm glad to hear that your setup is functioning.

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

Newegg Shell Shocker Deal going on right now, and for the next few hours.  Either the WNR2000 V1 or V2 possibly as some people are claiming to have received.  $20 + free ship
http://www.newegg.com/Product/Product.aspx?Item=33-122-275

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

Hi mazade,

"imls" is an u-boot command which lists Kernel images found in the flash memory incl. adress.

Fuhrys uboot.env changed that start adress of the uImage containig the magic code.
I guess because he repartioned his memory.

This is easily fixed with a serial console.
Alone with the tftp recovery you could theoretically create an image filled up with zeros an starting with an offset that matches fuhrys start Adress.

But I don't Know if this is possible.

Jarvid

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

Hi guys,

first off, thank you very much for all the information presented here.

I am happy to say I had some time the last few days to play with the router, and I have gotten it to work, thanks to in particular fuhry's work.

I can't say that it was a particular smooth path, and I now would state that without a serial console it is almost impossible to get there, but overall, I think the procedure lined out by fuhry, in combination with Jarvid's information to fix the u-boot environment, is detailed enough to get there.

Thanks everybody again.

Kind regards,
Blind

82 (edited by wrtvic 2010-12-15 19:21:38)

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

HI - So I have followed the steps in this post and have gotten my router to boot my compiled kernel and squash root image, but its hanging at this point below.  Any ideas why its sits at "Please be patient, while OpenWrt loads..."?

(FYI - tftpboots work fine, but I want to get this thing booting OpenWrt standalone...)

Update:
So I could get a working image flashed after running 'make menuconfig' instead of trying to use the config posted by Furly with manual updates.

I also now have a fully bootable Openwrt 10.3 WNR2000v1 with these steps.

1) Updated the uboot partition with Furly's u-boot.bin http://fuhry.co.cc/b/wnr2000/u-boot.bin.  Just enable Telnet access and transfer u-boot.bin to /tmp and flash with 'mtd -e mtd0 write u-boot.bin mtd0'

2) Update the uboot enviroment from serial console (might be able to do this from Telnet access if you install the u-boot environment package in OpenWrt) 
Serial console commands I ran:

setenv bootcmd 'bootm 0xbf2a0000'
setenv bootargs board=WNR2000
saveenv

3) Transfer to /tmp (via scp/wget/tftp) and flash the root.sqfs and uImage to their flash partitions as listed by 'cat /proc/mtd'. Make sure the root.sqfs image is <2.3MB.  Under 2MB is ideal so trim as many packages you don't need in the menuconfig.

My commands were:

mtd -e mtd2 write root.sqfs mtd2
mtd -e mtd5 write uImage mtd5

4) reboot the router

Last item on my list is trying to get a web admin UI compiled in a good sized root.sqfs image.  Webif is easy to get included but its interface seems very out of date with newer features missing or not working.  LUCI is being actively maintained but the image grows to 2-3MB which causes space issues.

U-Boot 1.1.4.15 (Sep 14 2010 - 16:39:21)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 244k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea700
: cfg1 0xf cfg2 0x7114
eth0: 00:22:3f:a8:4c:54
dup 1 speed 100
eth0 up
eth0
### main_loop entered: bootdelay=4

### main_loop: bootcmd="bootm 0xbf2a0000"
Hit any key to stop autoboot:  0
ar7100> imls
Image at BF2A0000:
   Image Name:   MIPS OpenWrt Linux-2.6.32.25
   Created:      2010-12-10  22:39:53 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    858954 Bytes = 838.8 kB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
ar7100> bootm 0xbf2a0000
## Booting image at bf2a0000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.32.25
   Created:      2010-12-10  22:39:53 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    858954 Bytes = 838.8 kB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Linux version 2.6.32.25 (victor@victor-fc) (gcc version 4.3.3 (GCC) ) #2 Fri Dec
 10 14:39:47 PST 2010
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR9130 rev 2, CPU:400.000 MHz, AHB:200.000 MHz, DDR:400.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs console=ttyS0,115200 board=WNR2000 pani
c=10 init=/etc/preinit rootdelay=2 -- console=ttyS0,115200 root=31:02 init=/sbin
/init mtdparts=ar7100-nor0:256k(u-boot),64k(u-boot-env),2304k(rootfs),64k(user-c
onfig),1152k(uImage),128k(language_table),64k(rootfs_checksum),64k(ART) mem=32M
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29400k/32768k available (2032k kernel code, 3368k reserved, 384k data, 1
52k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:56
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is NETGEAR WNR2000
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Dec 10 2010 14:21:59 Installing.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: mx25l3205d (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
spi0.0: no WRT160NL signature found
Creating 8 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000050000 : "u-boot-env"
0x000000050000-0x000000290000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=190000, len=100000
0x000000190000-0x000000290000 : "rootfs_data"
0x000000290000-0x0000002a0000 : "user-config"
0x0000002a0000-0x0000003c0000 : "uImage"
0x0000003c0000-0x0000003e0000 : "language_table"
0x0000003e0000-0x0000003f0000 : "rootfs_checksum"
0x0000003f0000-0x000000400000 : "art"
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood 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>
Waiting 2sec before mounting root device...
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 152k freed
Please be patient, while OpenWrt loads ...

83 (edited by mazade 2010-12-12 04:22:13)

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

well, ok... perhaps a question that will subsequently unveil my incompetence:  outside of re-compiling things, can the default entry of "bootm 0xbf310000" be changed over to 'our' 0xbf2a0000 ???   er, well, OK - at the very least it would require editing 'some' file and then re-flashing that particular file to its appropriate address...
After getting a second CA-42 cable(broke the first one, somehow, before I got a chance to use it) mine appears to start up fine, aside from manually entering in the proper bootm address.  I'm learning ^_^

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

ohh yeah, even when i get openwrt 'loaded & running', through manual boot commands, it still didn't dish out ip addresses... is this something i need to manually start too?
I don't recall seeing anything about 'dhcp server enabled' either while watching it via serial console.

85 (edited by Jarvid 2010-12-12 13:01:23)

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

Hello mazade,

yes, you can change the default bood adress as you now have access to u-boot smile

setenv bootcmd 'bootm 0xbf2a0000'
saveenv

should do the trick smile

I guess you are using the Image built by fuhry.
I think he did some preinits in his kernel with static IP together with an external dns server.
So you will have to set this manuelly either with uci or the common linux commands(add a dafault gateway by route, ifconfig ur device  and some editing in /etc/resolv.conf for your dns).

To all others:
The wlan performance in client mode is terrible. I'm using kernel 2.6.32,is there any hope with a higher kernel version with newer ath9 module?

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

FWIW, it kept rejecting my setenv command-string and/or messed things up until I typed it in as such

setenv bootcmd "bootm 0XBF2A0000"

*followed up by the saveenv command*

with the single-quotes ( ' ) it gave an "invalid!" error msg, and when i left the address portion in lower case it accepted things but set the bootm address to, instead, the tftp-mode address... weird.

this is just to help out the next person as clueless as me...
it's now booting into OpenWRT, but no dhcp(haven't tried wan or wlan connectivity yet) - still need to invest the time & learning.  ^_^

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

Jarvid wrote:

Hello mazade,

yes, you can change the default bood adress as you now have access to u-boot smile

setenv bootcmd 'bootm 0xbf2a0000'
saveenv

should do the trick smile

I guess you are using the Image built by fuhry.
I think he did some preinits in his kernel with static IP together with an external dns server.
So you will have to set this manuelly either with uci or the common linux commands(add a dafault gateway by route, ifconfig ur device  and some editing in /etc/resolv.conf for your dns).

To all others:
The wlan performance in client mode is terrible. I'm using kernel 2.6.32,is there any hope with a higher kernel version with newer ath9 module?

Jarvid,

there is a lot going on in the kernel these days with respect to ath9. If you look at the kernel 2.6.36.2 (latest) changelog, a big part is ath9. However, I have not been able to compile OpenWRT with a kernel different than .32. I am using a very recent SVN version of OpenWRT, but I have not found a configuration ('make menuconfig') to set the kernel.

I am running in client mode - what are the performance issues that you incur? I have not noticed anything really bad yet, but maybe just because I haven't paid much attention...

Cheers,
Blind

88 (edited by wrtvic 2010-12-23 19:50:56)

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

Hi all,

Using the Backfire 10.03 Image builder, I was able to build a good sized (~1.8M root.sqfs) image to flash from telnet prompt that includes the full LUCI admin UI.  Here is the make command.

make image PROFILE=AP81 PACKAGES="luci-admin-full luci-web luci-theme-base luci-theme-openwrtlight uhttpd kmod-ath9k wpad-mini wireless-tools iw libuci libuci-lua libc libgcc lua"

For the trunk branch with updated kernel and ath9x driver I used the following builder command (root.sqfs = ~1.9M):

Updated to include a couple more required packages:

make image PROFILE=AP81 PACKAGES="luci-mod-admin-full luci-lib-web luci-theme-base luci-theme-openwrt uhttpd kmod-ath9k wpad-mini wireless-tools iw libuci libuci-lua libc libgcc lua libiwinfo"

Also, to configure the latest stable kernel (2.6.36.2) edit the following file under the trunk branch and set the kernel version.

vi target/linux/ar71xx/Makefile

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

I just used the serial console, but that shouldn't be strictly necessary if you want to go the telnet route.  You can find the LAN MAC under Maintenance ? Router status ? LAN port ? MAC Address of the web admin console.  Then do:

On my Ubuntu box:

wget http://wiki.openwrt.org/_media/oldwiki/openwrtdocs/hardware/netgear/telnetenable.zip
unzip telnetenable.zip
cd telnetenable
gcc -o telnetenable telnetenable.c md5.c Blowfish.c
telnetenable 192.168.1.1 <Router LAN MAC> Gearguy Geardog > modpkt.pkt
nc 192.168.1.1 23 < modpkt.pkt
telnet 192.168.1.1

Backup u-boot and ART.  I used FTP, in which case you will need an FTP server running on your box.  On ubuntu, I used ftpd.  This is not strictly necessary, but a good idea.

On the WNR2000:

dd if=/dev/mtdblock0 of=/tmp/u-boot.orig.bin
dd if=/dev/mtdblock7 of=/tmp/ART.orig.bin
ftpput --user=<username> --password=<password> --verbose 192.168.1.2 . u-boot.orig.bin
ftpput --user=<username> --password=<password> --verbose 192.168.1.2 . ART.orig.bin

I then flashed fuhry's u-boot to the router:

On my Ubuntu box (in my home directory):

wget http://fuhry.co.cc/b/wnr2000/u-boot.bin

On the WNR2000:

ftpget --user=<username> --password=<password> --verbose 192.168.1.2 u-boot.bin u-boot.bin
mtd -e mtd0 write u-boot.bin mtd0

You can now compile OpenWRT from source or use fuhry's supplied uImage and rootfs:

On my Ubuntu box (in my home directory):

wget http://fuhry.co.cc/b/wnr2000/uImage
wget http://fuhry.co.cc/b/wnr2000/root.sqfs

On the WNR2000:

ftpget --user=<username> --password=<password> --verbose 192.168.1.2 uImage uImage
ftpget --user=<username> --password=<password> --verbose 192.168.1.2 root.sqfs root.sqfs
mtd -e mtd2 write root.sqfs mtd2
mtd -e mtd5 write uImage mtd5

The only thing left after that was to change the bootargs:

setenv bootargs board=WNR2000
saveenv

That got me a working OpenWRT image.  I no longer had to change the bootcmd string, so it seems this is fixed in fuhry's u-boot.bin link.

I'm now compiling from source to run a more tailored-to-me image.  I may also post a more generic image.  I am also interested in repartitioning the mtd since I won't be needing user-config (64k), language_table (128k), or rootfs_checksum (64k) that come by default.  It would be nice to have that extra 500k.

90 (edited by fuhry 2010-12-27 07:03:09)

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

Yikes. I just realized my ubootenv.img includes reconfigured partitions, so that's why you're having problems, Jarvid. I really do think we ought to get redboot partition table support in. In the mean time, you can fix your router with an RS232 level shifter (mine was $3 with free shipping) and an appropriate serial cable.

nabcore wrote:

2) If the OpenWrt specific kernel parameters can be supplied via CONFIG_CMDLINE, surely the best thing for backwards compatibility is to minimise the modifications u-boot; hence the CONFIG_BOOTARGS section of the u-boot patch perhaps should be omitted, so that the original kernel could be booted if the user so wanted?

Unfortunately, no. I tried this and was sure it would work. The problem is that Linux uses the *first* init= parameter it finds, not the last, and CONFIG_CMDLINE appends as opposed to prepending. Since the U-Boot environment specifies init= one path and OpenWRT uses init= a different path, the only ways to fix it are ugly kernel hacks or changing the u-boot environment. If you don't do one of those two, OpenWRT will try to boot using the wrong init command.

I'm away from my uni on break and unfortunately just had a bad encounter with failsafe mode and its lack of a working reboot command. Thus, I'm locked out of my WNR2000 until I get back up there in a week and can physically reset it. At that point I should be able to work on this project a little bit more.

91 (edited by fuhry 2013-06-01 03:36:20)

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

Alright. Problem solved. Here we have the fixed (I think) U-Boot environment image:

http://fuhry.com/b/wnr2000/ubootenv-stockpartitions.img

Here is the Perl script I wrote and subsequently used to modify U-Boot environment images:

http://fuhry.com/b/wnr2000/ubootenv.pl

You should now be able to flash your WNR2000 without a serial console. Rundown of the process:

- telnetenable
- telnet into your router
- cd /tmp
-

snarf http://fuhry.com/b/wnr2000/{ubootenv-stockpartitions.img,u-boot.bin,uImage,root.sqfs}

- mtd -e mtd0 write u-boot.bin mtd0
- mtd -e mtd1 write ubootenv-stockpartitions.bin mtd1
- mtd -e mtd2 write root.sqfs mtd2
- mtd -e mtd4 write uImage mtd4
- reboot

Caveats:
- You cannot go back to the default firmware unless you load in a backup of the old u-boot environment.
- If your router loses power while you are flashing mtd0, it will be bricked, forever, period.
- If your router loses power while you are flashing mtd1, it will be bricked, until you can get a serial console.

For the record: you can generate a u-boot environment image for the old (stock) firmware using ubootenv.pl and setting bootargs to:

console=ttyS0,115200 root=31:02 init=/sbin/init mtdparts=ar7100-nor0:256k(u-boot),64k(u-boot-env),2304k(rootfs),64k(user-config),1152k(uImage),128k(language_table),64k(rootfs_checksum),64k(ART)

Quick rundown of ubootenv.pl:
It has two modes, interactive and script. Interactive mode will give you a prompt at which you can run commands. The commands are print, set, load and write.

print: print the current environment.
set <key> <value>: create or change any value within the environment. If there are spaces in the value, don't quote it or anything. Example: "set foo bar baz" will set foo to "bar baz".
load <file>: Load up and parse an existing U-Boot environment image.
write <file>: Save the current environment to an image file you can flash.

If you launched ubootenv.pl with an environment file specified ("./ubootenv.pl foo.img") that image will be automatically loaded and typing "write" without any filename after it will overwrite the image you specified. You can also use ubootenv.pl as part of a script if needed... just run it with -h to see documentation on that.

I'm not responsible if you brick your router. This is an experimental release. Use it at your own risk. The u-boot environment I uploaded has been minimally tested - all I know is that the CRC check returns correct and the u-boot image hosted on my webserver flashes properly. I will try and get some more thorough testing done tonight.

One more thing: I'm going to try and come up with a way to repartition and go to OpenWRT without serial console access. It'll be haxxy though.

-fuhry

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

Hello again,
I've had some trouble trying to find a few files/packages that WRTVIC mentions in his recent post, can anyone direct me to them?

luci-mod-admin-full
iw

I've searched most of the 10.03 and beta/rc# folders trying to figure out if WRTVIC was referencing a particular folder that I wasn't looking in...
Still interested in getting this thing up and running but I've been good and distracted with a number of other projects, including fighting with a dockstar that doesn't want to talk to my ftp server(s) so I can get OpenWRT on it too   : /

Thanks for everything so far.

93 (edited by wrtvic 2011-01-12 22:33:08)

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

mazade wrote:

Hello again,
I've had some trouble trying to find a few files/packages that WRTVIC mentions in his recent post, can anyone direct me to them?

luci-mod-admin-full
iw

I've searched most of the 10.03 and beta/rc# folders trying to figure out if WRTVIC was referencing a particular folder that I wasn't looking in...
Still interested in getting this thing up and running but I've been good and distracted with a number of other projects, including fighting with a dockstar that doesn't want to talk to my ftp server(s) so I can get OpenWRT on it too   : /

Thanks for everything so far.

They are built via the config.

.config entries are,

#
# Modules
#
CONFIG_PACKAGE_luci-mod-admin-core=y
CONFIG_PACKAGE_luci-mod-admin-full=y
...
CONFIG_PACKAGE_iw=y

if you built Openwrt, they should be under the packages directory at the top level of your build tree.

I have posted my rootfs and uImages with LUCI admin interfaces here:  7z file contains ones for 10.03 Backfire, trunk and trunk with latest stable kernel 2.6.36.2.

http://hotfile.com/dl/96324592/e060162/Netgear-WNR2000-Openwrt.7z.html

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

Wow, excellent. 
On with more tarded-ness; I'm, mentally, having difficulty figuring out how to flash these files(respective rootfs/uImage) that you posted, when within the already flashed & booted-into u-boot environment.
specific commands & "0x" addresses...

yes, being more of a bane to all who actually know what they're doing...

Thanks for all of the shared know-how thus so far.

95 (edited by fuhry 2011-01-14 14:21:00)

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

[s]Update:
I've been working on the images today. For some reason, a lot of stuff seems broken (nothing pings). I've pulled the images until I figure out what's going on and fix it.[/s]

See next post

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

fuhry wrote:

Update:For some reason, a lot of stuff seems broken (nothing pings)

dnsmasq in the firmware from fuhry.co.cc/b/wnr2000/ can not be started due to error https://dev.openwrt.org/ticket/7590 , this bug still present in revision r24965, after applying the patch http://freetz.org/attachment/ticket/1063/mklibs_libm.patch , I was able to successfully compile and install the firmware on my wnr2000, using your config-file. Many thanks for the fixed bootloader and installation instructions.

97 (edited by fuhry 2013-06-01 03:34:33)

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

Edit (2013-06-01): Links have been fixed. The co.cc service was canceled years ago, and all links work from fuhry.com or fuhry.us.

I was experiencing an issue where all packets coming out of the WAN interface were being dropped. The bug seems to have disappeared from the current builds. It might be related to inoremap's issue (which I'm not seeing in current builds)

Today's updates: (well, mostly yesterday's - I pulled an all nighter to get this done)

- Everything has been tested. Everything. I flashed my router back to all the defaults, then went back and forth between the stock firmware and OpenWRT.
- LuCI is now included in my builds.
- My builds now use the default IP address 192.168.1.1, instead of 10.1.11.1
- The u-boot image has been rebuilt with default settings that match those of the stock firmware. This means that if you get kicked into upgrade mode and your u-boot environment is corrupt, you can do a TFTP restore. This makes it possible to recover from a bad flash of the environment, but if the environment has the wrong settings and a valid CRC, you still have to use a serial console. Really, the only way to work around this is to build in some way to edit the environment over the network within U-Boot. If I'm feeling adventurous, I might be able to code this. I'm not writing a TCP stack for u-boot though wink

And, I also came up with a way you can repartition! (As warned, it is very haxxy... but it worked in my test)

INSTALLATION:
Do these from the stock firmware, within telnetenable!

No repartitioning - slightly safer:

cd /tmp
for f in u-boot.bin ubootenv-stockpartitions.img root.sqfs uImage; do snarf http://fuhry.com/b/wnr2000/$f; done
mtd -e mtd0 write u-boot.bin mtd0
mtd -e mtd1 write ubootenv-stockpartitions.img mtd1
mtd -e mtd2 write root.sqfs mtd2
mtd -e mtd4 write uImage mtd4
reboot

Repartitioned install - gives you an additional ~500K of space: (I made a nice little script for this one)

snarf -q http://fuhry.com/b/wnr2000/install-repart.sh - | grep -v host: | /bin/sh -

Notes on how repartitioning works are at: http://fuhry.com/b/wnr2000/repart-notes

Going back:
At an OpenWRT shell:

mtd erase u-boot-env
mtd erase uImage
reboot

You'll get kicked into TFTP recovery mode, at which point you can flash in the default firmware.

Enjoy!

-fuhry

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

Builds have been updated to include libiwinfo.

99 (edited by edude03 2011-01-21 19:20:24)

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

fuhry, you are amazing. This works amazingly well.

However, I do have one slight issue, after flashing DHCP doesn't work. Did I miss something?
EDIT: I also noticed that settings don't persist through a reboot, I'm going to take a look into that tonight though.

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

^_^ and I'm on the opposite end of the spectrum from fuhry... somewhere past being a total tard.
<whining>
All that is functioning on my wnr2000 is the base u-boot environment.
How might I be able to flash, towards the direction of stock FW, or continuing on towards full OpenWRT that you gentlemen have so kindly provided.
I do have all of the images/files to move in either direction, but I don't have there wherewithal to figure out the commands and memory addresses to make it all happen.
</whining>