[coreboot-gerrit] New patch to review for coreboot: payloads: add support lz4 compression

Antonello Dettori (dev@dettori.io) gerrit at coreboot.org
Sat Jul 23 17:37:48 CEST 2016


Antonello Dettori (dev at dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15817

-gerrit

commit ef2848134cf710ee33bf4e5e9c6655910497b55c
Author: Antonello Dettori <dev at dettori.io>
Date:   Sat Jul 23 17:11:44 2016 +0200

    payloads: add support lz4 compression
    
    Add the option to use the lz4 compression method
    to compress payloads.
    Also sets LZ4 as the default compression method.
    
    Change-Id: Ic712f984f791d268440c8463eaea0d246aa31d99
    Signed-off-by: Antonello Dettori <dev at dettori.io>
---
 Makefile.inc     |  3 +++
 payloads/Kconfig | 18 +++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 69c8843..fc3d422 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -326,6 +326,9 @@ CBFS_PAYLOAD_COMPRESS_FLAG:=none
 ifeq ($(CONFIG_COMPRESSED_PAYLOAD_LZMA),y)
 CBFS_PAYLOAD_COMPRESS_FLAG:=LZMA
 endif
+ifeq ($(CONFIG_COMPRESSED_PAYLOAD_LZ4),y)
+CBFS_PAYLOAD_COMPRESS_FLAG:=LZ4
+endif
 
 CBFS_PRERAM_COMPRESS_FLAG:=none
 ifeq ($(CONFIG_COMPRESS_PRERAM_STAGES),y)
diff --git a/payloads/Kconfig b/payloads/Kconfig
index 8cce778..3b6076d 100644
--- a/payloads/Kconfig
+++ b/payloads/Kconfig
@@ -38,15 +38,27 @@ config PAYLOAD_FILE
 	help
 	  The path and filename of the ELF executable file to use as payload.
 
-# TODO: Defined if no payload? Breaks build?
+choice
+	prompt "Payload compression algorithm"
+	default COMPRESSED_PAYLOAD_LZ4
+	depends on !PAYLOAD_NONE && !PAYLOAD_LINUX
+	help
+	  Choose the compression algorithm for the chosen payloads.
+	  You can choose between LZMA and LZ4.
+
 config COMPRESSED_PAYLOAD_LZMA
 	bool "Use LZMA compression for payloads"
-	default y
-	depends on !PAYLOAD_NONE && !PAYLOAD_LINUX
 	help
 	  In order to reduce the size payloads take up in the ROM chip
 	  coreboot can compress them using the LZMA algorithm.
 
+config COMPRESSED_PAYLOAD_LZ4
+	bool "Use LZ4 compression for payloads"
+	help
+	  In order to reduce the size payloads take up in the ROM chip
+	  coreboot can compress them using the LZ4 algorithm.
+endchoice
+
 config PAYLOAD_OPTIONS
 	string
 	default ""



More information about the coreboot-gerrit mailing list