[PATCH resend 0/2] add CONFIG_ENV_SECT_SIZE_AUTO

Rasmus Villemoes rasmus.villemoes at prevas.dk
Wed Apr 14 20:51:41 CEST 2021


This is a resend, just rebased to current master, of patches I sent
way back in May.

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.29.2



More information about the U-Boot mailing list