[Skiboot] [PATCH] Produce XZ compressed skiboot.lid as part of build

Stewart Smith stewart at linux.vnet.ibm.com
Mon Jul 4 13:27:36 AEST 2016


With a recent HostBoot change, we can have an XZ compressed PAYLOAD
that's automagically detected (looking at magic numbers).

This gives us three great benefits:
1) it's transparent, uncompressed skiboot.lid works everywhere
2) it lets us grow greater than 1MB binary, as long as we compress
   down to <1MB
3) It speeds up boot. We currently compress down to 230kb rather than
   922kb, which is much quicker to read off flash.

This patch produces skiboot.lid.xz alongside standard skiboot.lid.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 Makefile.main | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.main b/Makefile.main
index 9432654e5b6c..159ce26d291a 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -156,7 +156,7 @@ pflash:
 pflash-coverity:
 	(cd external/pflash; ./build-all-arch.sh)
 
-all: $(SUBDIRS) $(TARGET).lid $(TARGET).map extract-gcov
+all: $(SUBDIRS) $(TARGET).lid $(TARGET).lid.xz $(TARGET).map extract-gcov
 
 OBJS := $(ASM) $(CORE) $(HW) $(PLATFORMS) $(LIBFDT) $(LIBFLASH)
 ifeq ($(PORE),1)
@@ -169,6 +169,9 @@ ALL_OBJS = $(OBJS) version.o
 ALL_OBJS_1 = $(ALL_OBJS) asm/dummy_map.o
 ALL_OBJS_2 = $(ALL_OBJS) asm/real_map.o
 
+$(TARGET).lid.xz: $(TARGET).lid
+	$(call Q,XZ, cat $^ | xz -9 -C crc32 > $@, $@)
+
 $(TARGET).lid: $(TARGET).elf
 	$(call Q,OBJCOPY, $(OBJCOPY) -O binary -S $^ $@, $@)
 
-- 
2.1.4



More information about the Skiboot mailing list