[OpenWrt-Devel] Flash layout question
mrkiko.rs at gmail.com
Mon Jul 22 15:54:26 EDT 2019
First of all, thank you very very much for your work guys!
Some days ago, I soft-bricked my C60 V2 by overwriting the whole flash, starting from the firmware partition and going ahead, thus overwriting the tplink and art partitions completely.
I am blind and soldering UARTs to devices is a big issue for me - so I am seeking for help. Working with routers and devices like those is very interesting to me.
But this is not the point.
Great friends soldered an UART to my device and I rewrote the flash zones of the device via u-boot, and now it works fine!
The device was running ar71xx firmware - now I upgraded it to the ath79 port.
I noticed still that from there it's not possible to read the whole flash of the device.
To be more specific: let's consider the mapping of the flash in ar71xx.
The u-boot partition was from offset 0x000000000000 to 0x000000030000.
In the new scheme this has been split like:
factory: goes from offset 0x000000000000 to 0x00000001fb00
mac: goes from 0x00000001fb00 to 0x000000020000
and finally u-boot: from 0x000000020000 to 0x000000030000.
And since 0x00000001fb00 + 0x000500 = 0x20000 (see DTS)
then math says we are covering the whole flash range.
Still, comparing the flash parts I can extract with
cat /dev/mtdblock<number> >file
from ar71xx and ath79, we can see that some flash areas are not visible.
In particular, when "cat"'ing the mac partition on ath79, the dev_id property is not visible, as it is when "cat"'ing the entire block in ar71xx.
I was thinking the kernel may stop reading when it finds more than some eraseblock blocks, but don't know.
I am sure my flash contains the right things - since reverting back to ar71xx and re-reading flash via cat returns proper content, matching with the backup I did when the device was new.
So I think this has to do with something else.
I am asking this mainly to learn something new, and also due to the fact that, if someone overwrites it's flash chip in this part, he may not be able to restore it due to the fact that he actually did never read that.
Infact, of the 1280 byes range, cat prints out a 1024 bytes file, as happens with dd.
Anyone with an idea?
Thank you very much to all of you again,
P.S.: the backup of my flash, that still matches on ar71xx, can be found here:
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel