1 (edited by wl520gu-hax 2008-03-30 19:16:25)

Topic: OpenWRT on an ASUS WL-520GU, a gentoo experience

Silly me, there I was thinking that because gentoo already had crossdev, all i had to do was emerge the correct toolshain first, then grab the source, etc.

Well kids, after quite a long time trying to build my system a dedicated cross compiler, I found that the very best to get the openwrt source compiled is to trust the developers who have been working with the uclibc toolchain for much, much, longer than I have. There have been many revisions, and in particular ld-uClibc.so.0 claimed to be mysteriously absent, when it wasn't, and -rpath wasn't working... something was broken.

if anybody else is having troubles with the linking portion especially of their openwrt build, and they happen to be using gentoo, try this as a remedy:

# su
# crossdev -C mipsel-linux
# crossdev -C mipsel-linux-uclibc
# ldconfig
# cd (your openwrt install)
# make V=99

everything is much, much better after that, seeing as the developers have already gone through the effort of finding tools that work smile

In mere moments I suspect I'll post my dmesg, nvram and whatnot, and then I can entertain you all with how else I make use of this unit.

2 (edited by wl520gu-hax 2008-03-31 06:16:04)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

# tftp -m binary -c put openwrt-brcm-2.4-squashfs.trx
(wait 5 minutes, just in case - no JTAG cable / serial console over here!)
# /etc/init.d/net.eth2 restart
    I get an address, I'm already happy about this...

# ssh                           # I changed the addy smile
  Connection refused ... fine ...
# nmap

Starting Nmap 4.20 ( http://insecure.org ) at 2008-03-30 11:41 PDT
Interesting ports on
Not shown: 1695 closed ports
23/tcp open  telnet
53/tcp open  domain
MAC Address: 00:1D:60:BE:C7:69 (Unknown)

.. ok ...

# emerge netkit-telnetd

... nope ... we are not routing / forwarding packets to WAN sad

# ping my.nameserver.hmm


(switch to windows, just for telnet)...
Yaaaaaaaay windows... 98.... restarting to re-read the TCP/IP parameters tongue ... wooooo ok finally...

c:\> telnet
BusyBox v1.8.2 (2008-03-30 10:58:34 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (bleeding edge, r10690) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
root@OpenWrt:/# passwd

yay!! ok, that's enough of this telnet session...

#ssh                                # ahhh much better smile

# uci show | sort
network.eth0.vlan0=1 2 3 4 5*
network.eth0.vlan1=0 5
# dmesg 
CPU revision is: 00029029
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Linux version (root@localhost) (gcc version 3.4.6 (OpenWrt-2.0)) #2 Sun Mar 30 11:25:31 PDT 2008
Setting the PFC to its default value
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5354 rev 2 at 240 MHz
Using 120.000 MHz high precision timer.
Calibrating delay loop... 237.56 BogoMIPS
Memory: 14200k/16384k available (1476k kernel code, 2184k reserved, 100k data, 88k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
PCI: Setting latency timer of device 00:01.0 to 64
eth0: Broadcom 47xx 10/100BaseT Ethernet 00:1d:60:be:c7:69
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 131072
Physically mapped flash: Filesystem type: squashfs, size=0x11c0ff
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009f000-0x001c0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x001c0000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 344 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
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.
Mounted devfs on /dev
Freeing unused kernel memory: 88k freed
Algorithmics/MIPS FPU Emulator v1.5
diag: Detected 'ASUS WL-500g Deluxe'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
jffs2.bbc: SIZE compression mode activated.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
eth0.0: add 01:00:5e:00:00:01 mcast address to master interface
eth0.1: add 01:00:5e:00:00:01 mcast address to master interface
PCI: Setting latency timer of device 00:05.0 to 64
wl0: wlc_attach: chiprev 2 coreunit 0 corerev 13 cccap 0x104007ea maccap 0x30482205 band 2.4G, phy_type 5 phy_rev 0 ana_rev 6
wl0: Broadcom BCM4318 802.11 Wireless Controller

i have some work to do, mostly just enabling forwarding, and then a bunch of other stuff, but thanks very much guys for your help.

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

hmmm, no packets are being forwarded from eth0.0 to eth0.1

/proc/sys/net/ipv4/ip_forward is 1
iptables -L and iptables -t nat -L look ok.

even if i set iptables -A NEW -t nat -j ACCEPT ... still no packets.

i'm gonna go investigate the new NIC names under kamikazi... i bet somebody else has had this issue...

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

grrrr! to fix the lack of packets being forwarded...

# iptables -A FORWARD -j ACCEPT

this is not the best solution... now i get to try to figure out which FORWARD -j DROP rule broke it sad

hey, but on the bright side,

WL520-GU# uname -a
Linux OpenWrt #4 Sun Mar 30 13:17:00 PDT 2008 mips unknown

5 (edited by wl520gu-hax 2008-04-01 14:21:54)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

my distro is not a 'stock' configuration of course, one of the things I did in addition to adding lots of stuff was removing ethernet bridge and httpd support from my kernel. br is being coded into the forwarding rules somehow... indeed my dmesg shows a line about ethernet bridging, so maybe i should just put bridge back, even if I break the bridge as soon as it's loaded...?

I'm starting to obsess over this unit, so i'm going to try to avoid this forum until it's completely working. then i'll post a .config and any other settings that might help others.

my goal is to have both openwrt and USB storage support going in tandem.

I'm still going to call it a WIP though.


USB 2.0 has caused me too much grief. As soon as I really get going with moving files around, the router reboots when using the 2.0 drivers. Well, I thought to myself, how does ASUS do it? they have "1x USB2 .0 for printer sharing" written right on the box in blue...

So what does ASUS's .config look like? huh?

# cat ASUS_wl-520gu_source/.config | grep USB
# CONFIG_USB_EHCI_HCD is not set

that's what ASUS did in the original firmware... yes, USB2.0 is a problem, probably a known problem that led to this router being re-branded as a cheap print server. Sorry if I confused anybody or got anybody's hopes up.

USB 1.1 it is sad

6 (edited by wl520gu-hax 2008-04-01 14:24:03)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Well, I can't rightly say that ASUS is lying. Wikipedia tells me otherwise about the USB 2.0 standard.

http://en.wikipedia.org/wiki/Universal_ … signalling

Apparently it's OK to use a slower USB speed and 'call it' the 2.0 standard.  Really.

Buyer Beware! when shopping for your USB 2.0 device, now you also have to ask your salesperson - "...is it is also 60MB/s?" !!! Because it might just be 1.5MB, like this USB 2.0 Device is...  enough about that.

The WL-520GU USB 2.0 "Full Speed" OHCI Controller works great at the "Full speed" of 1.5MB/sec. Brings whole new meaning to "Full speed ahead!"

Now using a much more stable kernel compiled with only OHCI and no ECHI-HCD whatsoever, I get reliable transfers at 1.5MB

I used a very simple script to benchmark it:

# dd if=/dev/urandom of=/tmp/testfile bs=1M count=1
# time -v cp /tmp/testfile /mnt/usb/
# rm /tmp/testfile
# time -v cp /mnt/usb/testfile /tmp/
# rm /mnt/usb/testfile
# ...

repeat as nessesary... that was how I determined my approximate transfer rate. I'm sure there's a better, much more accurate way, involving reads and writes to all sectors of the devices, but that's too extreme for me right now.

Oh yes, when bridge support is compiled into the kernel my routing table was back in order. "iptables -A FORWARD -j ACCEPT" is unnecessary and a terrible firewall rule. So the forwarding problem was my fault ... thinking that a router without a bridge is still a perfectly good router... silly me

Next, I'm going to begin investigating GPIO and the RS232 ports. The kernel claims 2 serial ports sharing an interrupt... if that's true that makes me very happy. but I only see the pinout for one serial port, which would logically be the console. If there really is only one accessible serial port (one 4 pin header with 3.3V, 2 TTLs and GND has *got* to be a serial port!) then I'm either going to use it or else start looking for a working USB HUB and USB serial converter.

So far so good though! I'm about one day in, and aside from one very frightening moment where I could have written garbage to memory, everything has gone very well. The day before yesterday I didn't think installing OpenWrt was going to work at all!

Steady as a rock with multiple large file transfers at "Full Speed".

7 (edited by wl520gu-hax 2008-04-02 17:15:02)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Further notes on my USB experience on the WL-520GU

I investigated the whole usb 2.0 issues further. indeed, using usb EHCI-HCD still causes a reboot under load even if I try removing wireless support from the kernel entirely (ie nothing to do with wl, wl-compat, iw, wireless-tools, etc)

I had to check that... because I saw the somebody else had 'fixed' the issue on a wl-500g by replacing the mini-pci wireless card with an athereos card...

Next, I'm going to roll back to the OHCI kernel and see if mounting with the -o rw,sync vs -o rw,async is going to make a difference in the stability. I'd really like to pivot over to the USB stick eventually...

For some reason I'm having trouble with my latest homebrew uni-directional ttl-3.3V signalling mod hmm 
There's only one connector, J4. 3.3V, two TTLs, GND.

So I told my kernel not to use "console=...." I removed that, told setserial to slow everything down to 9600, tried a few experiemental echos ... nothing. I'm just making it more difficult to unbrick the thing, but I's like to get the internal serial port going. I realize it's trivial to add a USB-RS232C and configure that with software, but i'd have to also fit a USB HUB into the router hmm  I don't want stuff dangling around outside, soldering on single USB header is header (for moving the USB stick inside the unit)

I suppose they could have reversed Tx and Rx... I'll have to try that.

8 (edited by wl520gu-hax 2008-04-03 12:30:22)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

awwwwwww all i needed to do was be nice!!!

# nice -n 15 "your USB filesystem-related command here"

then the reboot condition occurs less often during USB filesytem activity

i'm still talking about the OHCI driver on my wl-520gu, 1GB memory stick, 1 ext2 partition, no swapfile

9 (edited by wl520gu-hax 2008-04-04 13:40:58)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

checking for bad blacks is a very important step here while getting your filesystem ready for a pivot.

if mke2fs -c -j /dev/yourusbstickdevicehere/yourpartitionhere is failing... on your main, stable computer -  don't use this memory stick!!! At all! No matter what the current status of the USB support for your router is!! big_smile 

USB reads and writes were still hanging openwrt and i started blaming USB, tried the "nice" trick above with limited success... and have ultimately found my main system is choking on mke2fs -c -j on this USB stick.  so a lot of what i have posted may have been a symptom of also not having a decent memory stick...

it could also be that i have fried a perfect good $10 usb stick with all my tomfoolery. it remains to be seen.


I'm now happily mucking about inside a small ext2 partition on a non-damaged partition on my USB stick, mounted as root, life is gravy!


The conclusions I have drawn about the ASUS WL-520GU:

- OpenWRT works. I compiled my own using subversion. It's a rock solid piece of work.
- USB works, but not ehci-hcd, just usb-ohci

and in general:
- look out for bad USB sticks. double check them elsewhere for bad blocks and save a few headaches

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
                          3.3M      3.0M    284.0k  92% /mnt
none                      7.0M     20.0k      7.0M   0% /tmp
                        370.5M      5.5M    346.1M   2% /

yesssss... a strange size for a USB stick you might say ... but on the other hand its a perfectly good size for a USB stick that is damaged around block 50... sad

Now, what makes the most sense is installing a minimal kernel, just for booting to the USB stick / SD-MMC card... without wireless support or anything like that... to free up memory...

root@OpenWrt:/# free
              total         used         free       shared      buffers
  Mem:        14288        11816         2472            0          340
 Swap:            0            0            0
Total:        14288        11816         2472

i tried doing crazy things to make the kernel smaller but it's not easy to just hack and slash and still expect things to boot.  without wireless drivers at boot time the firmware is slightly over 2MB including USB storage support... sure would be nice if it booted smile but i digress.

I have to get rid of /etc/config/fstab to make everything pretty. My USB stick has it's own /etc/config/fstab that's more appropriate.

then I remove, edit and chmod a+x /sbin/init as per the USB storage howto.

and all is well.

don't forget to umount /mnt ! that frees up a good chunk of memory too. 

#umount /mnt
root@OpenWrt:/# free
              total         used         free       shared      buffers
  Mem:        14288        10168         4120            0          340
 Swap:            0            0            0
Total:        14288        10168         4120

I thought to copy anything I had built as packages from the trunk/bin/packages directory to /packages on my USB stick.

now I can just run ipkg from the /packages directory to my heart's content.

Life is good. I feel that I'm finally installed properly... except for the nagging feeling that more of the 16MB system RAM should be available...

10 (edited by wl520gu-hax 2008-04-07 12:40:56)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

well so unfortunately i'm still getting the occassional reboot during USB activity even with only the 1.1 drivers.

the next step for me is to methodically compare the USB driver in the original ASUS firmware release to the 1.1 driver that i'm using now.

- - - - - - - - - - - -

I've made this one change to usb.c in the storage driver:

--- usb (copy).c 
+++ usb.c 
@@ -1004,6 +1004,8 @@
         if (ss->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
             ss->htmplt.max_sectors = 64;
+        /* Tony was here - this is an attempt to force the WL-520GU to behave */        
+        ss->htmplt.max_sectors = 32;
         /* Just before we start our control thread, initialize
          * the device if it needs initialization */

This forces the USB stick to behave in a much more stable manner. I havn't had any crashes yet. I'll post my uptime as time goes on.

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Thanks for your work ..

i am trying &building your codes in my vm ware (arch linux) now, ummm.... might your modification fix the usb_uhci problem?

12 (edited by wl520gu-hax 2008-04-10 11:38:22)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

probably not - especially because i've been using usb-ohci drivers all along. my kernel does not have usb-uhci or usb-uhci-vi support at all (and especially not ehci-hcd!)

it's a brute force attempt, otherwise i would have posted a real patch that detects the board and adjusts settings accordingly.

i'm still messing around a lot with my kernel. I've got a jffs as small as 2.5MB that is missing a lot of things especially any kind of wireless support.

my reasoning is this: because i'm thinking about a captive portal for my router, i don't even need to load wireless support until well after the pivotroot.

but just because i think something should be a certain way doesn't make it so, like removing bridge support - default /etc/config/ files are telling the kernel to start a bridge, so removing the kernel modules alone doesn't work the way i think it should... likewise, removing wireless support isn't as simple as unchecking things in menuconfig. there is no magical default configuration.

my usb hack has brought me over 24 hours of glorious uptime running from a USB stick, but then I started experimenting again, so until i'm satisfied with my end product i'm going to remain skeptical about USB support.

I have decided to test the stability of the USB stick using ASUS's original firmware again. The patch I posted above was speculation on my part and not  the only diff between the two usb storage drivers (there were many differences). if the stick crashes during testing via netcat, i may abandon my quest to figure out what is going on here. In other words, if ASUS tried but failed to bundle some kind of reliable USB support into this thing, then reducing the speed or amount of data transferred in one burst is not going to fix anything.

a crash with USB support using ASUS's original firmware would cause me to seek out another router.

24+ hours of uptime doesn't mean i've solved anything yet, but by all means let me know if your router behaves as well as mine did with that modification!

one of the things that crossed my mind when i looked at the circuit board for the WL-520GU was... uh oh... a heatsink... maybe under certain conditions the BCM5354 is overheating and failing? a sustained burst of USB data could be frying it's poor little brain... i don't think i have any old 5V fans kicking around... it didn't seem overly hot to the touch but it could be that lukewarm is bad enough.. hard to say without x-ray vision...

testing away...

13 (edited by wl520gu-hax 2008-04-11 00:15:25)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

# echo . > /yourUSBmountpointonyourcomputer/char
# touch /yourUSBmountpointonyourcomputer/count
# cp nc /yourUSBmountpointonyourcomputer/ 
# dd if=/dev/urandom of=/yourUSBmountpointonyourcomputer/testfile bs=1M count=1
# umount /yourUSBmountpointonyourcomputer/ 

slap your usb stick into your WL-520GU...
/tmp/harddisk/part0/./nc -l -p 31337 -e /bin/sh

# nc 31337
cd /tmp/harddisk/part0
while true; do cat testfile > /tmp/testfile; cat /tmp/testfile > testfile; cat char >> count; done &

this is going to merrily copy a 1MB test file back and forth from the memory of the router to the USB stick. i'm doing the best i can with the very crippled busybox.  i'll get back to this forum with the number of iterations that the stock ASUS firmware can handle...

I realize that this is half-duplex testing. I have to start somewhere.


ok, i got bored and checked it because it clearly wasn't crashing even as i tried doing bandwidth speed tests and other things with the router to try to stress out the hardware a bit. 2125 iterations of a 1MB file later (2.1GB transferred to and from the memory / USB stick, half duplex), the average transfer rate was 1MB/s with no crashes.

Almost every single printer job in the entire universe is highly unidirectional. Could this be why this model is branded as a print server?

Next, full duplex!!

# echo R > /yourUSBmountpointonyourcomputer/uread
# echo W > /yourUSBmountpointonyourcomputer/uwrite
# echo > /yourUSBmountpointonyourcomputer/count
# cp nc /yourUSBmountpointonyourcomputer/ 
# dd if=/dev/urandom of=/yourUSBmountpointonyourcomputer/testfile bs=1M count=1
# cp testfile testfile2
# umount /yourUSBmountpointonyourcomputer/ 

slap your usb stick into your WL-520GU...
/tmp/harddisk/part0/./nc -l -p 31337 -e /bin/sh

# nc 31337
cd /tmp/harddisk/part0
cat testfile2 > /tmp/testfile2
while true; do cat testfile > /tmp/testfile; cat uread >> count; done & while true; do cat /tmp/testfile2 > testfile2; cat uwrite >> count; done &

And off it goes copying testfiles back and forth at the same time. So far so good... soon i'll check the count and see how it fares...

- - - - - - -

wtf! wtf!

ok this is really weird.  but good.

the testfile was read from the USB stick and written to the router's memory ~14000 times in one hour. ~4MB/s.  Not what I expected.
the testfile was read from memory and written to the USB stick ~800 times in one hour ~0.2MB/s

what is going on here? this is backwards. i expected it to be the other way around - optimized for writes from the router's memory to the USB stick - especially if it's supposed to be printing stuff on the USB port... ????

But there were no crashes during this process. yay! [s]Maybe the issue here is something ridiculous like the order in which the loops are started.[/s] Nope.

I can't believe the huge discrepancy in read/write speed. but I have verified it.

I want to try another memory stick before I decide this has something to do with the way ASUS got USB support stable on this platform.

Next, stress testing the USB driver and the WL driver using the stock ASUS firmware. Maybe tommorrow. smile

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

looking at your test result is so exciting!!
i am looking forward to your deeper level test... tongue

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Still comparing the retail ASUS firmware to OpenWRT kamikaze trunk.

I've given my last post some more thought and realized that the reduced write speed could also just be due to the design of USB sticks in general. 

I need another way to test speed. I would test the ASUS firmware with USB <-> IDE, but support is not included in the retail kernel.

insmod is part of ASUS's busybox though...

but that's just silly. hehehe i would have to create IDE modules with ASUS's original source, i may as well make a modified ASUS kernel... not what i'm trying to do here... others have already done that, webpages exist, alternate non-openwrt kernels exist, that's old news.

I think I'm just going to be satisfied for the moment that the ohci USB driver that ASUS used from the 2.4.20 kernel actually does 'work'.

I also wanted to stress-test USB and the broadcom wireless driver using the ASUS firmware, but my explorations in that direction have been cut short by my shortage of currently installed wireless G hardware. I just have to coax madwifi into my laptop's kernel and then I can get started on abusing my own bandwidth big_smile

After testing with Wireless G for a while (i'll just setup an ftp and transfer arbitrarily large random files between systems using wireless while blasting data back and forth on the USB stick) then I'll return to the problem of making a stable kernel.

I am only going through this step of testing my hardware with the original firmware because I was convinced I had done everything right with OpenWRT the first time in terms of making a kernel to support the hardware. What if the only reason that OpenWRT was crashing was faulty hardware?

I really don't think there will be a problem with USB and a lot of wireless G activity using ASUS's kernel, but I will certainly mention it if there is.

16 (edited by doggie 2008-04-20 16:49:13)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

hi, wl520gu-hax

I still got usb crash until today..

After I tried to modify and compile the kamikaze firmware from the source with various difference between ASUS GPLs and trunk once more again(errr.. actually I got failure again T_T ).. I noted that Asus WL500gP V1 is base on BCM43xx and some people has running linux kernel 2.6.x.x on their wl500gp already, but they would loss the wireless module on it if they do not change the wireless pcm card to the Athero.

Today I have compiled a kernel 2.6 version of trunk and flash to my wl520gu,
and it works..

Certainly, the wireless function is loss.. but I do not care that, I connet my usb-hdd to the router, (usb-ohci, fs_ext3, codepage and usb_storage have built in firmware already)
The router recognized my usb-hdd and mounted it successfully, then I installed the samba2, uploading and downloading files... all things work right!!

umm.. uploading one file contains 240557803bytes at 300secs to the router.. only 0.76MByte/Sec

I know lossing wireless function and transfer speed under usb1.1 only does not mean anythings..
...At least it point at the hardware of wl520gu works with usb-ohci perfect.

So the question is, is it possible to port the usb module from kernel 2.6 to 2.4 or make the wireless module works on kernel 2.6? If yes, who can made it? (err.. I am a newbie about driver programing)

The next thing I am going to do is to try usb-ehci module on it.

Sorry for my poor English.


Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

usb-ehci do not working on kernel 2.6 totally..
it cannot recognized my usb-hdd device~~

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Well, that's good news about the 2.6 kernel... i havn't tried the 2.6 firmware with the broadcom BCM43XX ..,

I was sticking with 2.4 for two reasons, one was that ASUS's firmware was built on 2.4.20, and the other was that i seemed to remember general consensus about the 2.4 kernel working better in general for the BCM43XX... but I will certainly try it now! smile

Yeah, even ASUS didn't include echi-hcd support - it has always crashed for me after a seemingly random period of time.

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Looks like the BCM5354 chip used by Asus Wl520gu is an all-in-one chipset. It contains switch module recognized as BCM47xx and a unknow wireless module.
Has anyone know the wireless module model id?
Do the b43(or b43legacy) works fine on it?

I have tried b43 driver but fail..

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

How did you get the firmware to load on yours? I've tried uploading openwrt-brcm-2.4-squashfs.trx with the Asus utility and tftp and the upload completes but I'm never able to actually ping or telnet the router. Did you use the standard distribution or did you build it from svn? If you built from svn which options did you pick? Is there anything I need to watch out for? Thanks.

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

Why not just simply use the OpenWrt build-system to compile the toolchain and all the packages instead of using crossdev? The WL-520GU is supported in trunk.

22 (edited by shawnperkins 2008-05-07 23:50:55)

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

I'm trying to use a USB to serial port adapter with the 2.4 kernel and no success. Every time I try to send data out /dev/usb/tts/0 the 520gu locks up.

If someone out there can fix this within the next week or so and send me a patch, I will send them $100.00 via Paypal. Sort of my donation to the Open Source community since most of this stuff is over my head. I know it's not much, but it's something. If there's others willing to pitch in a little something, I'm sure we could find a good programmer willing to dig in and resolve the USB issue on this little guy once and for all. Just a thought. smile


Oh, and BTW, I just want to thank you guys for all of your efforts that have got us to this point. You folks are a fine asset to the Open Source Community!!

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

forum2008 wrote:

Why not just simply use the OpenWrt build-system to compile the toolchain and all the packages instead of using crossdev? The WL-520GU is supported in trunk.

yup yup yup , the initial parts of this thread deal with the problem of crossdev using libraries from whatever latest gentoo build vs just using svn.

svn works, crossdev is likely to have issues with library versions during linking - which is possible to work out but I decided to just svn it.

tips for compiling? well, first off, if forum2008 says it's working in trunk now, then check it out and look for a ASUS WL520GU or at the very least a ASUS WL500g profile and select that before you compile. and that should work, apparently with the 2.6 kernel also

but perhaps forum2008 has no cares about stable USB?

I have not been trying as hard lately but I still do not have a stable 2.4 kernel using usb-ohci, whereas ASUS DOES.

I will try 2.6 soon and report back

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

shawnperkins wrote:

If someone out there can fix this within the next week or so and send me a patch, I will send them $100.00 via Paypal.

that would be a nice little cherry on top of getting it working for myself, i'll see what i can do!

you're talking about the 2.4 kernel here.

and you're using the usb-ohci module, right?

Re: OpenWRT on an ASUS WL-520GU, a gentoo experience

I added the wl-520gu device detection/network configuration in trunk, but did not get around to testing USB, I figured it would "Just Work." My serial cable has died since then so any in-depth debugging will have to wait.  As noted above Asus did not include EHCI drivers in the stock firmware, try using OHCI. I'm downloading the wl500gp v2 tarball right now to see if it is the same situation there.