[U-Boot] [PATCH 0/5] New environment code

Reinhard Meyer reinhard.meyer at emk-elektronik.de
Sat Jul 17 22:56:43 CEST 2010


Wolfgang Denk wrote:
> 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.
>
>
> 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

> 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


More information about the U-Boot mailing list