
On Wed, 2020-05-06 at 11:37 +0200, Rasmus Villemoes wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On 06/05/2020 11.21, Joakim Tjernlund wrote:
I can test NOR Flash ,I am on an older u-boot ATM but fw_setenv stuff should be simple to backport How would fw_env.config be dealt with? Just ignored when auto size?
AFAIK, the U-Boot configuration doesn't affect the userspace fw_env tools, so auto size has to be opt-in separately in fw_env.config, which is where I did use 0 to mean auto (see the referenced commit e282c422e0). You should be able to test that part already with just fw_setenv built from master and an appropriate fw_env.config [or perhaps you need to add another "mtdinfo.type == ..." condition first].
Oh, I misunderstood then. I was mostly interested in fw_setenv ATM Looking at your fw_setenv commit I have one question: Will this auto mode also work when erase size < env size ? We have the case:
# MTD device name Device offset Env. size Flash sector size /dev/mtd1 0x0000 0x2000 0x00001000
Above does not work because EB < Env. size, one have to set the sector size to >= Env. size(0x2000)
Jocke