jfe: OpenWRT on Asus WL500GPv2 I

Not long since I bought an Asus WL500GPv2, because I needed a WLan-Access-Point. Furthermore I thought: Hey, I can install some free OS on it and have lots of fun playing with it. During the last nights I tried OpenWRT. The corresponding article in their wiki looks great at first glance, but if you look closer you find:

Do not be tempted to mess with wireless, yet. Here be dragons.

Well….I met them at some more occasions.

Step 1: Compiling OpenWRT
If you do not select too many packets the first compilation is quite straightforward, but requires quite a bit of time. I tried to compile every packet on a different computer and this failed at many points including moved source-tars.

The next step is patching the kernel, which is downloaded during the first compilation. The wiki describes what to do for kernel 2.6.25.16, but in svn revision 15055 kernel 2.6.28.9 is used.  I patched the following:

build_dir/linux-brcm47xx/linux-2.6.28.9/arch/mips/kernel/setup.c:553
#ifdef CONFIG_EARLY_PRINTK
+#if 0
        setup_early_printk();
+#endif
#endif

and

build_dir/linux-brcm47xx/linux-2.6.28.9/arch/mips/bcm47xx/prom.c:131
void __init prom_init(void)
{
        if (prom_init_cfe() == 0) {
+        //      prom_init_console_cfe();
+        //      prom_init_cmdline_cfe();
+        //      __prom_putchar = prom_putchar_cfe;
-              prom_init_console_cfe();
-              prom_init_cmdline_cfe();
-              __prom_putchar = prom_putchar_cfe;
        }

        prom_init_mem();
}

These patches seem to work, the router boots with the build.
Furthermore you have to patch the usb-parts, I did this using the following command:
wget -nv --no-check-certificate -O - http://dev.openwrt.org/cgi-bin/trac.fcgi/raw-attachment/ticket/3365/ssb-ehci-25.patch | sed s:/linux-2.6.25.4/:/linux-2.6.28.9/:g > ssb-ehci-25.patch
patch -p2 < ../ssb-ehci-25.patch

I don't know, if this patch works correctly, because I didn't try USB support.

Step 2: flashing
You power off the device, press and hold the restore-button and power it up again. When the power-led begins to flash with 1Hz you release the restore-button. Now you connect lan1 to your laptop and configure it e.g.
ifconfig eth0 192.168.1.2 up

Now you ping the device at 192.168.1.1. But wait, it didn't answer. I had configured it to listen on 192.168.250.249 using the Asus firmware, because it was integrated in my lan. And suprise: It still listens on this ip.
So I flashed it using atftp:
atftp --trace --option "timeout 1" --option "mode octet" --put --local-file bin/openwrt-brcm47xx-squashfs.trx 192.168.250.249

Conclusion

 _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (Revision 15055 - the bleeding edge) -----
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------

I had much fun, playing around with it, but: Without wireless-support the device is nearly useless for me, so I switched back to the original firmware. If you do so do NOT take revision 3.0.3.6 its web-UI is very 2.0 and very slow. I more liked the version the device came with.

To be continued...

Epilogue

You got it to work?
Nice. Share your joy with the world;
buy someone a beer.

I think I'll mix some kamikaze ;)

2 Comments Posted in DIY, Freizeit, Linux, OpenWRT

2 Comments

  1. Ich hab den Asus WL-500G Premium mit OpenWRT (genauer XWRT) seit zwei Jahren problemlos laufen – mit WLAN Support ;)

  2. Ich bin mal so frei zu vermuten, dass du die Version 1 besitzt. Man erkennt die daran, dass die Antenne auf der anderen Seite ist und dass das Ding eine Mini-PCI-Karte für WLan hat ;)

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>