[PATCH 0/2] add CONFIG_ENV_SECT_SIZE_AUTO

Rasmus Villemoes rasmus.villemoes at prevas.dk
Wed May 6 10:46:59 CEST 2020


This is roughly the U-Boot side equivalent to commit e282c422e0
(tools: fw_env: use erasesize from MEMGETINFO ioctl), at least for
SPI_FLASH backend.

When CONFIG_ENV_SECT_SIZE_AUTO is not selected (and it is of course
default n), there's no functional change, and the compiler even seems
to generate identical binary code.

The motivation is to cut about half a second off boottime on our newer
revisions, while still having the same U-Boot binary work on both.

Rasmus Villemoes (2):
  env/sf.c: use a variable to hold the sector size
  env: add CONFIG_ENV_SECT_SIZE_AUTO

 env/Kconfig | 14 ++++++++++++++
 env/sf.c    | 32 ++++++++++++++++++++------------
 2 files changed, 34 insertions(+), 12 deletions(-)

-- 
2.23.0



More information about the U-Boot mailing list