mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
spl: Drop bd_info in the data section
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@chromium.org>
This commit is contained in:
parent
acfb5308f5
commit
38d6b7ebda
4 changed files with 34 additions and 10 deletions
|
@ -285,7 +285,15 @@ u32 spl_mmc_boot_mode(const u32 boot_device);
|
|||
* If not overridden, it is weakly defined in common/spl/spl_mmc.c.
|
||||
*/
|
||||
int spl_mmc_boot_partition(const u32 boot_device);
|
||||
void spl_set_bd(void);
|
||||
|
||||
/**
|
||||
* spl_alloc_bd() - Allocate space for bd_info
|
||||
*
|
||||
* This sets up the gd->bd pointer by allocating memory for it
|
||||
*
|
||||
* @return 0 if OK, -ENOMEM if out of memory
|
||||
*/
|
||||
int spl_alloc_bd(void);
|
||||
|
||||
/**
|
||||
* spl_set_header_raw_uboot() - Set up a standard SPL image structure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue