Citeren Chris Marchesi <[email protected]>:

I noticed changeset 48456, which reverts 48276, which I put in to get the
full 128MB flash on a WNDR3700v4.

Yup, this badly breaks the WNDR4300, which is almost the same hardware, but apparently has different boot code in it.

Looks like the issue was the fact that it changed the location of
caldata_backup.

Not necessarily the location of the caldata_backup. After reverting the commit (and with the caldata_backup still containing nonsense), the WNDR4300 boots normally. So it looks like it is not the contents of caldata_backup that cause this, but the fact that it is in a different location.

I had a few questions about this:

1) I did a bit more research and it looks like caldata is actually device
firmware data that is not touched by firmware updates/etc, is that the same
for caldata_backup, ie: it was added there by the manufacturer?

Yes. As far as I know, this stores some device specific settings like MAC addresses and such. You can clearly see the MAC addresses of the wlan-0 and wlan-1 for instance by looking at the contents with a hex file viewer. The caldata and caldata_backup partitions should contain the same info.

2) I'd imagine that if this is the case, then I should stop using this MTD
layout ASAP as well. What's the easiest way to restore the state of
caldata_backup after rolling back?

By executing the following two commands in a shell on the device:

# dd if=/dev/mtd2 of=/tmp/caldata.bin

This command writes 512 blocks of data from the (hopefully pristine) caldata partition to a backup file.

# mtd -e caldata_backup write /tmp/caldata.bin caldata_backup

The second command will first erase the caldata_partition and then write the contents of the backup you just made to it. BE CAREFUL! Double check if you write to the correct partition.

3) Given all of this, is there any real hope for getting the full flash
available on these routers for OpenWRT by default?

It depends on what you want to use it for. As far as I know, in the OEM firmware it can be used for additional user data storage. My suggestion would be to keep the existing partitions as they are and just mount the reserved data as additional partition (for instance under /srv or /var/<whatever>).

Looks like this has been a question that has come up more than a few times
- I referenced a thread in my original post but I found another issue from
the tracker here: https://dev.openwrt.org/ticket/17316. If it's not going
to be possible, maybe a note in the wiki or something would be a good idea,
so that there can be a final word on the question.
PS: Is there a page in the wiki that clearly outlines what caldata is and
its importance? I couldn't find it here:
https://wiki.openwrt.org/doc/techref/flash.layout

Sorry for introducing the regression!
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to