aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-07-04 13:20:54 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-04 14:01:45 +1000
commit5fc07eaa4ac13fbbf188072c58e0202b34aa7f35 (patch)
treee6edf3964325ee4f631644d8cfe3d31c1b9a98c1 /Makefile.main
parentad53085acc6264b5673fbb8055a3e7feecee6159 (diff)
downloadskiboot-5fc07eaa4ac13fbbf188072c58e0202b34aa7f35.zip
skiboot-5fc07eaa4ac13fbbf188072c58e0202b34aa7f35.tar.gz
skiboot-5fc07eaa4ac13fbbf188072c58e0202b34aa7f35.tar.bz2
Produce XZ compressed skiboot.lid as part of build
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. We currently use crc32 as this is supported by hostboot. Future HB may support crc64, but this seems to be disabled currently. Having CRC32 in the PAYLOAD partition also gives the advantage of error detection in PAYLOAD, which we previously did not have as it was not an ECC protected partition. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 9432654..159ce26 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 $^ $@, $@)