I was able to use mtd to load dd-wrt, and was able to go back to OpenWrt from dd-wrt via the same method (but they call the destination partition "linux")
BUT, I cannot load the stock firmware [mr3040v2_en_3_14_4_up_boot(121017).bin] via mtd. When I try to do it from OpenWrt I get "Failed to erase block", and when I try to do it from dd-wrt I get "Erasing mtd failed: linux". If I just do "mtd erase" then it works...
In these cases of failures, I don't get kicked out of SSH, so I'm able to get back to relative safety by re-loading OpenWrt
One thing I notice is that the OpenWrt and DD-WRT .bin's are exactly the same size (3,932,160 bytes) but the tp-link stock firmware is bigger (4,063,744 bytes). The difference is 131,584 bytes which == 128.5KB.
When I read the mr3020 wiki which warns about only the older firmware file working, I see:
- The older file that works is the same size as the dd-wrt/openwrt files I mentioned above,
- The newer one that doesn't work on mr3020 is the same size as the larger mr3040, and has "boot" in the filename
I could have sworn I read somewhere to make sure your firmware did have "boot" in the filename, but now I can't find that reference.
Going to poke around with a hex editor and see if there's anything obvious occupying exactly 131,584 bytes in the "boot" files.