[U-Boot] [PATCH 14/52] armv8: remove unused low-level modules from TPL

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Tue Jul 18 20:35:54 UTC 2017


TPL builds today don't need to call into firmware or set up the MMU
(if this changes, it should be controlled through a config option
whether to include this or not), but include the needed support code
for this anyway.

Even for a feature-rich TPL (including DM support as for the RK3368),
this equates to a size difference of approx. 10% in TPL binary size:
- without this change:
   text    data    bss    dec    hex filename
  23635    3112     24  26771   6893 tpl/u-boot-tpl
- with this change:
   text	   data    bss    dec    hex filename
  21583    3112     24  24719   608f tpl/u-boot-tpl

Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
---

 arch/arm/cpu/armv8/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index c447085..e831471 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -9,12 +9,14 @@ extra-y	:= start.o
 
 obj-y	+= cpu.o
 obj-y	+= generic_timer.o
+ifndef CONFIG_TPL_BUILD
 obj-y	+= cache_v8.o
-obj-y	+= exceptions.o
 obj-y	+= cache.o
 obj-y	+= tlb.o
 obj-y	+= transition.o
 obj-y	+= fwcall.o
+endif
+obj-y	+= exceptions.o
 obj-y	+= cpu-dt.o
 obj-$(CONFIG_ARM_SMCCC)		+= smccc-call.o
 
-- 
2.1.4



More information about the U-Boot mailing list