From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 1.mo1.mail-out.ovh.net ([178.32.127.22] helo=mo1.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxZZH-00056z-4o for barebox@lists.infradead.org; Fri, 12 Jul 2013 09:23:13 +0000 Received: from mail194.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo1.mail-out.ovh.net (Postfix) with SMTP id CF284FFA44A for ; Fri, 12 Jul 2013 11:22:48 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 12 Jul 2013 11:22:39 +0200 Message-Id: <1373620959-20431-3-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1373620959-20431-1-git-send-email-plagnioj@jcrosoft.com> References: <20130712091455.GD19197@ns203013.ovh.net> <1373620959-20431-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 3/3] pbl: add lz4 support To: barebox@lists.infradead.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/pbl/Makefile | 3 ++- arch/arm/pbl/piggy.lz4.S | 6 ++++++ arch/mips/pbl/Makefile | 3 ++- arch/mips/pbl/piggy.lz4.S | 6 ++++++ images/Makefile | 1 + pbl/Kconfig | 3 +++ pbl/decomp.c | 4 ++++ 7 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 arch/arm/pbl/piggy.lz4.S create mode 100644 arch/mips/pbl/piggy.lz4.S diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile index 8923a70..dd3e946 100644 --- a/arch/arm/pbl/Makefile +++ b/arch/arm/pbl/Makefile @@ -1,6 +1,7 @@ suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo +suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4 suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = shipped OBJCOPYFLAGS_zbarebox.bin = -O binary @@ -10,7 +11,7 @@ targets := zbarebox.lds zbarebox zbarebox.bin zbarebox.S \ $(piggy_o) piggy.$(suffix_y) # Make sure files are removed during clean -extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map +extra-y += piggy.gzip piggy.lz4 piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map $(obj)/zbarebox.bin: $(obj)/zbarebox FORCE $(call if_changed,objcopy) diff --git a/arch/arm/pbl/piggy.lz4.S b/arch/arm/pbl/piggy.lz4.S new file mode 100644 index 0000000..fa9b246 --- /dev/null +++ b/arch/arm/pbl/piggy.lz4.S @@ -0,0 +1,6 @@ + .section .piggydata,#alloc + .globl input_data +input_data: + .incbin "arch/arm/pbl/piggy.lz4" + .globl input_data_end +input_data_end: diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile index 6eeee73..fea1f24 100644 --- a/arch/mips/pbl/Makefile +++ b/arch/mips/pbl/Makefile @@ -1,6 +1,7 @@ suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo +suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4 suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = shipped OBJCOPYFLAGS_zbarebox.bin = -O binary @@ -10,7 +11,7 @@ targets := zbarebox.lds zbarebox zbarebox.bin zbarebox.S \ $(piggy_o) piggy.$(suffix_y) # Make sure files are removed during clean -extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map +extra-y += piggy.gzip piggy.lz4 piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map $(obj)/zbarebox.bin: $(obj)/zbarebox FORCE $(call if_changed,objcopy) diff --git a/arch/mips/pbl/piggy.lz4.S b/arch/mips/pbl/piggy.lz4.S new file mode 100644 index 0000000..6f1af1f --- /dev/null +++ b/arch/mips/pbl/piggy.lz4.S @@ -0,0 +1,6 @@ +#include + + .section .data +EXPORT(input_data) + .incbin "arch/mips/pbl/piggy.lzo" +EXPORT(input_data_end) diff --git a/images/Makefile b/images/Makefile index 925a987..65c533a 100644 --- a/images/Makefile +++ b/images/Makefile @@ -81,6 +81,7 @@ $(obj)/%.s: $(obj)/% FORCE suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo +suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4 suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = shipped # barebox.z - compressed barebox binary diff --git a/pbl/Kconfig b/pbl/Kconfig index a37c976..836060e 100644 --- a/pbl/Kconfig +++ b/pbl/Kconfig @@ -54,6 +54,9 @@ if IMAGE_COMPRESSION choice prompt "Compression" +config IMAGE_COMPRESSION_LZ4 + bool "lz4" + config IMAGE_COMPRESSION_LZO bool "lzo" diff --git a/pbl/decomp.c b/pbl/decomp.c index aa6a31e..ca0df64 100644 --- a/pbl/decomp.c +++ b/pbl/decomp.c @@ -10,6 +10,10 @@ #define STATIC static +#ifdef CONFIG_IMAGE_COMPRESSION_LZ4 +#include "../../../lib/decompress_unlz4.c" +#endif + #ifdef CONFIG_IMAGE_COMPRESSION_LZO #include "../../../lib/decompress_unlzo.c" #endif -- 1.8.3.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox