* [U-Boot] [PATCH] ARM: omapl138_lcdk: Shrink code size
@ 2019-09-01 15:11 Adam Ford
0 siblings, 0 replies; only message in thread
From: Adam Ford @ 2019-09-01 15:11 UTC (permalink / raw)
To: u-boot
In preparation to use the device tree in SPL, the code +
malloc space needs to fit into 32k of space. This patch
reduces the code size by converting to Thumb instructions
and using tiny libraries when possible. The result is
over 7k in code size reduction in SPL and a 140k reduction
in U-Boot.
Before
text data bss dec hex filename
26544 4072 1376 31992 7cf8 spl/u-boot-spl
607895 39792 129280 776967 bdb07 u-boot
After
text data bss dec hex filename
19302 4072 1376 24750 60ae spl/u-boot-spl
464666 39792 129256 633714 9ab72 u-boot
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index c69b9b15c4..7e470bf73e 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -1,4 +1,7 @@
CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_ARCH_DAVINCI=y
CONFIG_SYS_TEXT_BASE=0xc1080000
CONFIG_TARGET_OMAPL138_LCDK=y
@@ -70,4 +73,5 @@ CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_USB_MUSB_PIO_ONLY=y
CONFIG_USB_STORAGE=y
+CONFIG_SPL_TINY_MEMSET=y
# CONFIG_SPL_OF_LIBFDT is not set
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-01 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-01 15:11 [U-Boot] [PATCH] ARM: omapl138_lcdk: Shrink code size Adam Ford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox