summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2025-07-04 15:39:27 -0500
committerTom Rini <trini@konsulko.com>2025-07-04 14:48:06 -0600
commit15182ce25d5faa2d08bd08266a4d40fb5c2161fb (patch)
tree9fe14dabe8a9a280319837b87b2734c30caf3051
parentd1d53c252a4a746db5ebcdf0d6de3aa0feec504e (diff)
configs: legoev3: adjust to reduce binary size
Adjust legoev3_defconfig to reduce the binary output size. As u-boot has bloated a bit over the years, the legoev3_defconfig can no longer build something that fits in the 256kB size limit of the EV3. This drops a few unused features, but the real difference-makers are enabling thumb instructions and using link time optimization to reduce the size. This reduced u-boot.bin from 279,920 to 198,416 bytes on my local machine with arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009. HAS_BOARD_SIZE_LIMIT is also added to catch any future regressions. Signed-off-by: David Lechner <david@lechnology.com>
-rw-r--r--configs/legoev3_defconfig6
1 files changed, 4 insertions, 2 deletions
diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig
index 60b7a84205c..54976501e11 100644
--- a/configs/legoev3_defconfig
+++ b/configs/legoev3_defconfig
@@ -1,5 +1,6 @@
CONFIG_ARM=y
CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_SYS_THUMB_BUILD=y
CONFIG_ARCH_DAVINCI=y
CONFIG_TEXT_BASE=0xc1080000
CONFIG_SYS_MALLOC_LEN=0x110000
@@ -12,6 +13,9 @@ CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_ENV_SIZE=0x4000
CONFIG_DEFAULT_DEVICE_TREE="da850-lego-ev3"
CONFIG_SYS_LOAD_ADDR=0xc0700000
+CONFIG_LTO=y
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=262144
CONFIG_DYNAMIC_SYS_CLK_FREQ=y
CONFIG_BOOTDELAY=0
CONFIG_AUTOBOOT_KEYED=y
@@ -31,7 +35,6 @@ CONFIG_HUSH_PARSER=y
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
CONFIG_CMD_ASKENV=y
-CONFIG_CRC32_VERIFY=y
CONFIG_CMD_MX_CYCLIC=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
@@ -56,4 +59,3 @@ CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
-CONFIG_REGEX=y