[U-Boot] [PATCH v3 00/40] env: common: Remove environment definitions from common.h

Joe Hershberger joe.hershberger at ni.com
Fri Aug 2 16:55:34 UTC 2019


On Fri, Aug 2, 2019 at 10:44 AM Simon Glass <sjg at chromium.org> wrote:
>
> At present common.h has a lot of uncommon declarations in it. Many of
> these would be better placed elsewhere, in header files more related to
> their purpose. In particular the environnment functions should move to
> the environment headers. This should reduce the overall amount of code
> compiled and the length of time taken to build U-Boot.
>
> This series splits the current environment.h file into:
>
>    env.h           common definitions widely used in U-Boot; and
>    env_internal.h  features internal to the environment drivers, etc.
>
> Most files can then include just env.h which is fairly small and does not
> have any CONFIG magic.
>
> At the same time some dead code was noticed in common.h so this series
> removes some of this.
>
> After this series common.h is down to about 400 lines. For reference it
> was about 1000 lines up until 3 years ago.
>
> Changes in v3:
> - Move removal of _ENTRY to next patch
> - Move removal of _ENTRY to _'Drop ENTRY' patch
> - Update w400.c as well
> - Rebase to master
>
> Changes in v2:
> - Update to add header to image.c instead of bootm.c
> - Add new patch to move eth_parse_enetaddr() to net.c/h
> - Adjust patch to leave eth_parse_enetaddr() alone
> - Fix typdef typo
> - Rename ENVF_... flags to ENV_...
> - Fix 'too' typo in commit message
> - Rename ENVA_... to ENV_...
> - Rebase to master
>
> Simon Glass (40):
>   common: Move gzip functions into a new gzip header
>   common: Drop the dpram_... functions
>   common: Move lcd_setmem() to lcd.h
>   common: Remove video_setmem()
>   env: Create a new file for environment functions
>   env: Move get_env_id() to env.h
>   env: Move env_get_f() to env.h
>   env: Move env_init() to env.h
>   env: Move env_relocate() to env.h
>   env: Move envmatch() to env.h
>   env: Move env_set_hex() to env.h
>   env: Move env_set_ulong() to env.h
>   env: Move env_get_ulong() to env.h
>   env: Move env_get_yesno() to env.h
>   env: Move env_get_hex() to env.h
>   env: Move env_set() to env.h
>   env: Move env_get() to env.h
>   env: Move eth_env_get/set_enetaddr() to env.h
>   env: net: Move eth_parse_enetaddr() to net.c/h
>   env: Move env_fix_drivers() to env.h
>   env: Move set_default_vars to env.h
>   env: Move env_load/save functions to env.h
>   env: Move env import/export functions to env.h
>   env: Drop env_crc_update()
>   env: Move get/set_default_env() to env.h
>   env: Move env_get_char() to env.h
>   env: Move env_reloc() to env.h
>   env: Rename environment to embedded_environment
>   env: Move env_valid to env.h
>   env: Move callback definitions to env.h
>   env: Drop the ENTRY typedef
>   env: Drop _ENTRY
>   env: Rename the redundancy flags
>   env: Drop the ACTION typedef
>   env: Drop the double underscores in search.h
>   env: Move TOTAL_MALLOC_LEN to environment.h
>   env: Drop environment.h header file where not needed
>   env: Rename environment.h to env_internal.h
>   Drop PCMCIA
>   common: Add a note about the effort to reduce common.h

This series is good to go. Thanks for all the cleanup and excellent
patch craftsmanship!

Cheers,
-Joe


More information about the U-Boot mailing list