public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: omapl138_lcdk: Shrink code size
Date: Sun,  1 Sep 2019 10:11:23 -0500	[thread overview]
Message-ID: <20190901151123.2994-1-aford173@gmail.com> (raw)

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

                 reply	other threads:[~2019-09-01 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190901151123.2994-1-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox