[PATCH v2 09/18] spl: Drop bd_info in the data section

Simon Glass sjg at chromium.org
Mon Dec 28 17:26:02 CET 2020


This uses up space in the SPL binary but it always starts as zero. Also
some boards cannot support data in TPL (e.g. Intel Apollo Lake).

Use malloc() to allocate this structure instead, by moving the init a
little later, after malloc() is inited. Make this function optional since
it pulls in malloc().

This reduces the TPL binary size on coral by about 64 bytes

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

(no changes since v1)

 arch/arm/cpu/armv8/fsl-layerscape/spl.c |  5 ++++-
 common/spl/Kconfig                      |  9 +++++++++
 common/spl/spl.c                        | 20 ++++++++++++--------
 include/spl.h                           | 10 +++++++++-
 4 files changed, 34 insertions(+), 10 deletions(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list