In my case, i was switching to the openwrt from dd-wrt.
I got my netgear WNDR3700 V3 (which is broadcom not atherios) used from ebay, Switching from dd-wrt to openwrt
First of all, there is a bug in the dd-wrt 21061 that makes it not possible to use SSH, so i logged in with telnet
Now,
wget http://theplacewhereyouputthefile/filename.bin (the original firmware is .chk not .bin)
Then
mtd -e linux -r write /tmp/x.bin linux
And the router showed things like
Unlocking Linux …
Erasing Linux
Writing from x.bin to Linux … [e]
Writing from x.bin to Linux … [w]
Then, connection to the host was lost
Then the router was bricked
I did get ping replies from the router, but that did not mean it is working
So, my next thing to do was this, the router booted itself into recovery mode, so i got the original firmware.
tftp -i 192.168.1.1 put x.chk
Transfer successful: 7258170 bytes in 29 second(s), 250281 bytes/s
Where X is simply the factory firmware .chk file, now leave the router for more than 5 minutes while it digests the update, then use the web interface to update to the openwrt chk file