NOTE: This worked for me, but I take NO RESPONSIBILITY if you brick your router.
I just wanted to let everyone know I was able to get OpenWRT up and running on my WRT54AG finally!
I haven't been able to test how well the actual wireless works yet, since I just got the prism54 drivers up and working.
I had a lot of trouble convincing my WRT54AG to load new firmware, I tried various tricks involving shorting the flash pins but never managed to get anywhere. If I tried to use the LinkSys web-based firmware upgrade it always complained about my image being incorrect.
In the end I noticed that the official 1.08 .trx file looked a bit different from the OpenWRT .trx and that got me going. I ended up loading the wap54g image, thinking it was closest to my hardware, but I believe the openwrt-brcm-2.4-squashfs.trx image should work just as well, I just haven't test it.
$ hexdump -C WRT54AG_v1.08_03162004.trx | head -1
00000000 01 18 86 35 98 55 35 36 48 44 52 30 00 d0 29 00 |...5.U56HDR0..).|
$ hexdump -C openwrt-wap54g-squashfs.trx | head -1
00000000 48 44 52 30 00 90 17 00 83 ec 60 c7 00 00 01 00 |HDR0......`.....|
My thought was the first 8 bytes were some kind of signature for the WRT54AG to validate the image.
So I tacked those 8 bytes onto the openwrt-wap54g-squashfs.trx image.
$ dd if=WRT54AG_v1.08_03162004.trx of=header bs=1 count=8
$ cat header openwrt-wap54g-squashfs.trx > test.trx
I then uploaded test.trx via the WRT54AG's firmware upgrade web form. After rebooting I was eventually able to telnet into OpenWRT! (with no wireless support of course)
I downloaded whiterussian_rc4.tar.bz2 and extracted it. I am still working on getting everything setup to automatically include the prism54.o driver on the flash image, but my first step was to get it compiled and get the kernel firmware loader builtin as well.
$ cd openwrt/target/linux/linux-2.4/config
$ cp -p brcm brcm.orig
$ echo CONFIG_FW_LOADER=y >> brcm
$ echo CONFIG_PRISM54=m >> brcm
$ echo prism54 >> brcm.modules
Then I did the normal make and came back later. I took the resulting openwrt-brcm-2.4-squashfs.trx image, scp'ed it to /tmp and used mtd to write it into flash.
$ mtd -r write openwrt-brcm-2.4-squashfs.trx linux
Since I don't have prism54.o setup to be added to the image (just compiled) I copied it to /tmp from my build system.
It is built as openwrt/build_mipsel/linux-2.4-brcm/linux-2.4.30/drivers/net/wireless/prism54/prism54.o and I scp'ed that over to /tmp as well.
$ mv /tmp/prism54.o /lib/modules/2.4.30/
Due to my change to brcm.modules /etc/modules already had prism54 so all I needed was to get the firmware and a firmware loader onto the WRT54AG and I should be golden. I grabbed the recommended firmware to /tmp.
$ wget http://www.prism54.org/firmware/1.0.4.3.arm
$ mkdir /lib/firmware
$ mv /tmp/1.0.4.3.arm /lib/firmware/isl3890
Now I needed to get the firmware to load. Looking at /sbin/hotplug it will run any (and all) scripts from /etc/hotplug.d/firmware/ when a card requests firmware.
Note: I hard coded this loading to the specific PCI device id on my WRT54AG. I am assuming this is the same on all of them, but you might want a fancier firmware agent and some point.
$ mkdir /etc/hotplug.d/firmware
$ cat > /etc/hotplug.d/firmware/isl3890
#!/bin/sh
DEVLOAD=/proc/driver/firmware/01:01.0/loading
DEVDATA=/proc/driver/firmware/01:01.0/data
FIRMWARE=/lib/firmware/isl3890
if [ ! -e ${DEVLOAD} ]; then
sleep 1
fi
if [ -f $FIRMWARE ]; then
echo 1 > $DEVLOAD
cp $FIRMWARE $DEVDATA
echo 0 > $DEVLOAD
else
echo -1 > $DEVLOAD
fi
<control-d>
$ chmod 755 /etc/hotplug.d/firmware/isl3890
At this point you should be able to reboot and eth2 should be up and running.
To use 802.11a channels you'll need to edit /www/cgi-bin/webif/wireless-config.sh and add in the new channels.
Check 'iwlist eth2 channel' for a list.
I did something like this:
$ cp -p /www/cgi-bin/webif/wireless-config.sh /www/cgi-bin/webif/wireless-config.sh.tmp
$ mv /www/cgi-bin/webif/wireless-config.sh.tmp /www/cgi-bin/webif/wireless-config.sh
$ vi /www/cgi-bin/webif/wireless-config.sh
I added channels "34 36 38 40 42 44 46 48 52 56 60 64" and set CHANNEL_MAX=64.
I hope this helps get OpenWRT up and running on your WRT54AG. Again, this worked for me, but I take NO RESPONSIBILITY if you brick your router.
