ARM: omapl138_lcdk: Shrink code size
PATCH 1/1 ARM: omapl138_lcdk: Shrink code size
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 <[email protected]>
configs/omapl138_lcdk_defconfig +4 -0
@@ -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
Signature · 1 line
2.17.1