From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] pbl: add lz4 support
Date: Mon, 15 Jul 2013 12:20:53 +0200 [thread overview]
Message-ID: <1373883653-11236-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1373883653-11236-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
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 | 4 ++++
pbl/decomp.c | 4 ++++
7 files changed, 25 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..be9425b
--- /dev/null
+++ b/arch/mips/pbl/piggy.lz4.S
@@ -0,0 +1,6 @@
+#include <asm/asm.h>
+
+ .section .data
+EXPORT(input_data)
+ .incbin "arch/mips/pbl/piggy.lz4"
+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..dc31357 100644
--- a/pbl/Kconfig
+++ b/pbl/Kconfig
@@ -53,6 +53,10 @@ if IMAGE_COMPRESSION
choice
prompt "Compression"
+ default IMAGE_COMPRESSION_LZO
+
+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
next prev parent reply other threads:[~2013-07-15 10:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 10:09 [PATCH 0/3 v2] pbl: add lz4 compression support Jean-Christophe PLAGNIOL-VILLARD
2013-07-15 10:20 ` [PATCH 1/3] decompressor: Add LZ4 decompressor module Jean-Christophe PLAGNIOL-VILLARD
2013-07-15 10:20 ` [PATCH 2/3] lib: Add support for LZ4-compressed kernel Jean-Christophe PLAGNIOL-VILLARD
2013-07-15 10:20 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-07-16 6:25 ` [PATCH 0/3 v2] pbl: add lz4 compression support Sascha Hauer
2013-07-16 15:39 ` antonynpavlov
2013-07-22 7:18 ` Sascha Hauer
2013-07-22 9:56 ` Antony Pavlov
-- strict thread matches above, loose matches on Subject: below --
2013-07-12 9:14 [PATCH 0/3] " Jean-Christophe PLAGNIOL-VILLARD
2013-07-12 9:22 ` [PATCH 1/3] decompressor: Add LZ4 decompressor module Jean-Christophe PLAGNIOL-VILLARD
2013-07-12 9:22 ` [PATCH 3/3] pbl: add lz4 support Jean-Christophe PLAGNIOL-VILLARD
2013-07-15 9:00 ` Sascha Hauer
2013-07-15 10:08 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373883653-11236-3-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox