Okay here it is.
http://pastie.org/7936110
This is against AA 12.09, not trunk. Haven't tried it against trunk, haven't had time. If somebody would try it that would help.
So this is rAndy's orig patch, plus some changes that make it flashable from the web interface. rAndy i don't have your info so to put in that patch. PM me if you would plz, have question anwyas.
It's not quite a compete patch, sysupgrade still requires an -F to get it to upgrade, and i'm sure there's other loose ends, but I just can't find documentation on it all.
So anyways, directions:
1) Check out the code (git is your friend)
2) patch -p0 < patch.txt or somesuch.
3) make menuconfig, choose D-Link 505 profile, and anything else you want.
4) make, go get coffee or tea depending on your cultural affinity.
5) /bin/ar71xx will have the file openwrt-ar71xx-generic-dir-505-a1-squashfs-factory.bin
Then: plug the 505 in, set the switch to router/AP mode and connect ethernet to your computer.
Assign 192.168.0.100 to your computer, wait for bootup, then in a browser go to 192.168.0.1. You'll see the startup wizard (ugly orange/white screen), click on cancel to get to the main menu, then Maintenance, Firmware, Click on Browse, choose the .bin file from above, and upload.
Then don't touch the thing till it comes up, or you might brick it. If you reset your ip to 192.168.1.10, you should be able to login.