[PATCH u-boot v2019.04-aspeed-openbmc v3 2/4] config: ast2600: Reduce SPL image size
Joel Stanley
joel at jms.id.au
Thu Jan 28 11:15:18 AEDT 2021
This modifies some features of the SPL to ensure it fits in the 64KB
payload size once we enable FIT signature verification in the SPL.
We still build with thumb, as this is selected SYS_THUMB_BUILD (ie, the
SPL defaults to thumb if u-boot proper is built with thumb).
The not using the arch memcpy/memset changes save 668 bytes. The tiny
memset saves 52 bytes. (Anyone who wants to test the runtime impact of
these changes should do so!)
The DOS_PARTITION change saves 229 bytes.
In total, this set of options reduces the binary size by 1105 bytes
with GCC 10.
Signed-off-by: Joel Stanley <joel at jms.id.au>
--
v3:
- Drop unnecessary TPL banner change
- Clarify thumb build
- Add data on size impact of each change
- Add DOS_PARTITION change to this patch
- Move FIT_TINY to a different patch; with the reordering of patches
FIT verification is not yet turned on when applying this patch
---
configs/ast2600_openbmc_spl_emmc_defconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
index 68d18652c980..26e8790cef87 100644
--- a/configs/ast2600_openbmc_spl_emmc_defconfig
+++ b/configs/ast2600_openbmc_spl_emmc_defconfig
@@ -2,8 +2,9 @@ CONFIG_ARM=y
CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl"
CONFIG_SYS_DCACHE_OFF=y
CONFIG_POSITION_INDEPENDENT=y
-CONFIG_SPL_SYS_THUMB_BUILD=y
CONFIG_SYS_THUMB_BUILD=y
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds"
CONFIG_ARCH_ASPEED=y
CONFIG_SYS_TEXT_BASE=0x10000
@@ -80,6 +81,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_MTDPARTS=y
+# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
@@ -125,6 +127,7 @@ CONFIG_DM_SPI=y
CONFIG_SYSRESET=y
CONFIG_WDT=y
CONFIG_USE_TINY_PRINTF=y
+CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPM=y
CONFIG_SPL_TPM=y
# CONFIG_EFI_LOADER is not set
--
2.29.2
More information about the openbmc
mailing list