Skip to content

New environment code

Reinhard Meyer u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 5 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 5 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/5] New environment code
Quoted 5 lines · Wolfgang Denk

The following patch series adds some utilities (qsort and hash table based database functions) and uses these to reimplement the code used for the internal handling of environment variables.

Quoted 9 lines

Motivation:

* Old environment code used a pessimizing implementation:
- variable lookup used linear search => slow
- changed/added variables were added at the end, i. e. most frequently used variables had the slowest access times => slow
- each setenv() would calculate the CRC32 checksum over the whole environment block => slow

Hello Wolfgang,

how many users are out there that have such huge environments that speed is of any concern?
The "grepenv" idea however seems to indicate some might have huge environments...

I see the advantages offered, but

Quoted 5 lines

Disadvantages:

- Image size grows by typically 5...7 KiB (might shrink a bit again on systems with redundant environment with a following patch series)

Looking at the patches I can't really see where that large increase in image size comes from;
but if its really true, it seems to be a very high price to pay for those who get along with the
environment as it is.
I would at least recommend that all new UI commands are optional; as basics "setenv", "printenv", "saveenv" should do as until now. "export" and "import" must be adding
a lot to the code.

Best Regards,
Reinhard