From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] pbl: add none compression support
Date: Mon, 28 Jan 2013 10:26:12 +0100 [thread overview]
Message-ID: <1359365172-30549-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1359365172-30549-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.shipped.S | 6 ++++++
arch/mips/pbl/Makefile | 3 ++-
arch/mips/pbl/piggy.shipped.S | 6 ++++++
pbl/Kconfig | 3 +++
pbl/decomp.c | 12 ++++++++++++
6 files changed, 31 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/pbl/piggy.shipped.S
create mode 100644 arch/mips/pbl/piggy.shipped.S
diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 7faa51a..6eeee73 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_NONE) = shipped
OBJCOPYFLAGS_zbarebox.bin = -O binary
piggy_o := piggy.$(suffix_y).o
@@ -9,7 +10,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 zbarebox.map
+extra-y += piggy.gzip 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.shipped.S b/arch/arm/pbl/piggy.shipped.S
new file mode 100644
index 0000000..dbc2569
--- /dev/null
+++ b/arch/arm/pbl/piggy.shipped.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "arch/arm/pbl/piggy.shipped"
+ .globl input_data_end
+input_data_end:
diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile
index 7faa51a..6eeee73 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_NONE) = shipped
OBJCOPYFLAGS_zbarebox.bin = -O binary
piggy_o := piggy.$(suffix_y).o
@@ -9,7 +10,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 zbarebox.map
+extra-y += piggy.gzip 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.shipped.S b/arch/mips/pbl/piggy.shipped.S
new file mode 100644
index 0000000..963262d
--- /dev/null
+++ b/arch/mips/pbl/piggy.shipped.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "arch/mips/pbl/piggy.shipped"
+ .globl input_data_end
+input_data_end:
diff --git a/pbl/Kconfig b/pbl/Kconfig
index ea7d227..37e4c4a 100644
--- a/pbl/Kconfig
+++ b/pbl/Kconfig
@@ -34,6 +34,9 @@ config IMAGE_COMPRESSION_LZO
config IMAGE_COMPRESSION_GZIP
bool "gzip"
+config IMAGE_COMPRESSION_NONE
+ bool "none"
+
endchoice
endif
diff --git a/pbl/decomp.c b/pbl/decomp.c
index bd67ed8..aa6a31e 100644
--- a/pbl/decomp.c
+++ b/pbl/decomp.c
@@ -18,6 +18,18 @@
#include "../../../lib/decompress_inflate.c"
#endif
+#ifdef CONFIG_IMAGE_COMPRESSION_NONE
+STATIC int decompress(u8 *input, int in_len,
+ int (*fill) (void *, unsigned int),
+ int (*flush) (void *, unsigned int),
+ u8 *output, int *posp,
+ void (*error) (char *x))
+{
+ memcpy(output, input, in_len);
+ return 0;
+}
+#endif
+
static void noinline errorfn(char *error)
{
while (1);
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-01-28 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 9:23 [PATCH 0/3] pbl: factorise decompress code and add none compress support Jean-Christophe PLAGNIOL-VILLARD
2013-01-28 9:26 ` [PATCH 1/3] pbl: move configs to pbl/Kconfig Jean-Christophe PLAGNIOL-VILLARD
2013-01-28 9:26 ` [PATCH 2/3] pbl: factorise decompressor Jean-Christophe PLAGNIOL-VILLARD
2013-01-28 9:26 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-30 21:33 ` [PATCH 0/3] pbl: factorise decompress code and add none compress support Sascha Hauer
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=1359365172-30549-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