[Skiboot] [PATCH 17/17] Experimental support for building without FSP code

Stewart Smith stewart at linux.ibm.com
Tue Jun 18 17:29:25 AEST 2019


Now, with CONFIG_FSP=0/1 we have:
1.6M/1.4M skiboot.lid
323K/375K skiboot.lid.xz

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 Makefile                       | 3 ++-
 hw/fsp/Makefile.inc            | 3 +++
 platforms/ibm-fsp/Makefile.inc | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 68d4dc7deac0..fbd83bc01862 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,8 @@ LITTLE_ENDIAN ?= 0
 ELF_ABI_v2 ?= $(LITTLE_ENDIAN)
 # Discard unreferenced code and data at link-time
 DEAD_CODE_ELIMINATION ?= 0
+# Try to build without FSP code
+CONFIG_FSP?=1
 
 #
 # Where is the source directory, must be a full path (no ~)
@@ -62,4 +64,3 @@ DEVSRC=hdata
 CONFIG := config.h
 
 include $(SRC)/Makefile.main
-
diff --git a/hw/fsp/Makefile.inc b/hw/fsp/Makefile.inc
index bcb3f3b95528..b078a4d765bd 100644
--- a/hw/fsp/Makefile.inc
+++ b/hw/fsp/Makefile.inc
@@ -7,4 +7,7 @@ FSP_OBJS += fsp-elog-read.o fsp-elog-write.o fsp-epow.o fsp-dpo.o
 FSP_OBJS += fsp-dump.o fsp-mdst-table.o fsp-chiptod.o fsp-ipmi.o
 FSP_OBJS += fsp-attn.o fsp-occ.o fsp-psi.o
 FSP = hw/fsp/built-in.a
+
+ifeq ($(CONFIG_FSP),1)
 $(FSP): $(FSP_OBJS:%=hw/fsp/%)
+endif
diff --git a/platforms/ibm-fsp/Makefile.inc b/platforms/ibm-fsp/Makefile.inc
index fc8f03341aec..8883f09c1815 100644
--- a/platforms/ibm-fsp/Makefile.inc
+++ b/platforms/ibm-fsp/Makefile.inc
@@ -3,4 +3,7 @@ SUBDIRS += $(PLATDIR)/ibm-fsp
 IBM_FSP_OBJS = common.o lxvpd.o hostservices.o fsp-vpd.o \
 	       firenze.o firenze-pci.o zz.o
 IBM_FSP = $(PLATDIR)/ibm-fsp/built-in.a
+
+ifeq ($(CONFIG_FSP),1)
 $(IBM_FSP): $(IBM_FSP_OBJS:%=$(PLATDIR)/ibm-fsp/%)
+endif
-- 
2.21.0



More information about the Skiboot mailing list