Hi Heiko, Sorry, for late reply. I have seen that this patch was accepted, so I have only few things bellow.
The 03/15/2019 05:34, Heiko Schocher wrote: > External E-Mail > > > Hello Horatiu, > > Am 14.03.2019 um 13:53 schrieb Horatiu Vultur: > > Hi Heiko, > > > > I managed to reproduce the issue that you described. > > Fine, thanks for testing! > > > Don't you think it is a little bit too harsh to remove the commit > > completely? > > I am unsure here ... > > > I am not sure but how many cases are where UBoot doesn't store anything > > in flash? And then lets the linux to update the flash. > > I think that can happen very often. In my case for example we boot > SPL/U-Boot with usb loader, than an initsystem with kernel/dtb/ramdisk > and start swupdate for installing all sources (including setup > the Environment with fw_setenv)... > > > Or is wouldn't better to update fw_setenv to set the entire flash to > > 0x0 when it detects that the CRC error? The same way how the saveenv it > > is doing in UBoot? > > Indeed, just reproduced this on my board. Saving the Environment > with saveenv fills with 0x0 and saving with fw_setenv fills with > 0xff. > > This is no problem, until your optimization, and I think, we cannot > change this here without breaking a lot of boards, running fine. > > I am here also on Stefanos side always to read the hole Environment > space, because we cannot be sure, with what the empty space is filled > up. > > Back to your intention for this patch, stated in the commit message: > """ > This is an optimization for large environments that contain few bytes > environment variables. In this case it doesn't need to read the entire > environment and only few pages. > """ > > Hmm... why you use a big Environment, if you only have "few bytes" of > variables ? We choose a big Environment because different boards can have different flashes which can have different page size. Therefore we chose for the environmnet size to be the least common multiple. > > Simply set CONFIG_ENV_SIZE to a smaller value than your CONFIG_ENV_SECT_SIZE > > Is this not possible for you ? Thanks for the suggestion. I have done few tests with this option and improves the speed setting the CONFIG_ENV_SIZE to something smaller than CONFIG_ENV_SECT_SIZE. > > bye, > Heiko > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: h...@denx.de -- /Horatiu _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot