I have successfully loaded OpenWRT (svn r22909) on to my WNR2000.
EDIT: I tested how well the kernel held up against the stock firmware's incorrect parameters. In short: it doesn't. I'm going to re-post my images shortly along with a pre-built dump of the u-boot environment that you can flash to. This will include [s]repartitioning[/s] flashing your bootloader's preferences!
What does not work:
- Wireless. This happens after CRDA sends the list of allowed bands to the card. Makes me wonder if something might be screwing up there. EDIT: nope. It's because I accidentally destroyed my ART partition (sector 63 of the flash). Far as I know this isn't a dual-band chip. Anyway, relevant dmesg output:
ath9k ath9k: failed to initialize device
ath9k: probe of ath9k failed with error -22
- LuCI is not in my config/prebuilt images. Hope you like telnet/ssh
What DOES work:
- Basic functionality. You can log into it, it switches packets, it can probably route stuff.
- squashfs + jffs2 overlay (make sure lua and uhttpd go into the squashfs. 1 it saves space, and 2 some symbols they need are otherwise stripped)
- writable root (my patch knocks out the checksum thing in u-boot)
This in mind, here are the approximate steps I followed:
- Build a custom u-boot. Apply the patch above to the sources in Netgear's GPL package, add staging_dir_mips/bin/ to your PATH, make ap81_config and make. The resulting u-boot.bin file can be flashed onto your device. Here's a binary build: http://fuhry.co.cc/b/wnr2000/u-boot.bin
- Install this u-boot image by telnetting into the device running the default firmware (telnetenable). Read other posts in this thread for information on how to do that. I found the easiest way to get the u-boot image to the device was via the "snarf" program Netgear kindly provides to download the image file from my webserver. Just run: snarf http://yourserver/u-boot.bin (if your router has web access you can even use my direct url above). Then install it: mtd -e mtd0 write u-boot.bin mtd0. Be patient, if you're not careful, you will brick your device right here, and the only way to get it back is likely JTAG. Any other part you screw up can be recovered with a serial console, but if you screw up the bootloader you are in trouble.
- Build OpenWrt. My config: http://fuhry.co.cc/b/wnr2000/config (beware there are some things in here you probably don't want like custom IP address defaults and ppp disabled). I'd recommend also editing target/linux/ar71xx/config-* and setting CONFIG_CMDLINE="rootfstype=squashfs console=ttyS0,115200 board=WNR2000 panic=10 init=/etc/preinit rootdelay=2 -- " which *should* eliminate the need to mess around with u-boot's environment (not easy to do under the default firmware unless you have a serial console). Otherwise you'll need to use a serial console to edit U-Boot's environment (which also breaks the ability to flash back to the default firmware). Binary images are at the end of this post.
- Install it. You can flash from the default firmware by snarfing the lzma uImage and root fs, then flashing: mtd -e mtd2 write root.sqfs mtd2 && mtd -e mtd4 write uImage mtd4
- Install OpenWrt's u-boot preferences. I'm waiting until this point, because this will likely break your ability to go back to the default firmware. Using the same format as the above commands but while still booted into the default firmware, flash [s]hxxp://fuhry.co.cc/b/wnr2000/ubootenv.img[/s] (UPDATE: DO NOT USE unless you have serial console access! I didn't realize this environment image was repartitioned! I will post a U-Boot environment file later in this thread that uses the stock partition layout.) into mtd1 using the same format of command as above.
- If you built OpenWRT from source, use the squashfs 4k image. Ensure it's <2304k. Anything left over will go to your jffs2 space.
I'm not responsible if anything done here bricks your router. These exact images haven't been tested, because I repartitioned my router to maximize the space I got in jffs2. But the general process has been pretty thoroughly tested. If you're interested in hacking the kernel sources and messing with the u-boot environment, my mtdparts are: "mtdparts=ar7100-nor0:256k(u-boot),64k(u-boot-env),2816k(rootfs),896k(uImage),64k(ART)". Please note that repartitioning should NOT be required. You get about an additional 500k of space out of it though.