If you encounter problems with the flashing of your router and you end up with a doorstop, I'd recommend reading Void Main's Linksys WRT54G revival guide to help you resurrect your dead router. It's extreme surgery, but it works.
If you haven't installed OpenWrt yet, another way of identifying the hardware is to open the page http://192.168.1.1/SysInfo.htm (where 192.168.1.1 should be replaced with the IP of your wrt54g). The last line in the output shows the hardware version