[PATCH 1/4] env: remove callback.o for an SPL build

Simon Glass sjg at chromium.org
Fri Feb 28 00:40:45 CET 2020


On Thu, 27 Feb 2020 at 05:56, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> env.h says this about about callback declarations (U_BOOT_ENV_CALLBACK):
>
>  * For SPL these are silently dropped to reduce code size, since environment
>  * callbacks are not supported with SPL.
>
> So env_callback_init() does a lot of work to not find anything in the
> guaranteed empty env_clbk list. Drop callback.o entirely from the link
> and stub out the only public function defined in callback.o. This cuts
> about 600 bytes from the SPL on my ppc build.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>  env/Makefile           | 2 +-
>  include/env_callback.h | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list