From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 08/12] compressed image: add gzip support
Date: Fri, 3 Aug 2012 12:25:18 +0200 [thread overview]
Message-ID: <1343989522-8807-8-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1343989522-8807-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/cpu/start-pbl.c | 4 ++++
arch/arm/pbl/Makefile | 1 +
arch/arm/pbl/piggy.gzip.S | 6 ++++++
common/Kconfig | 4 ++++
lib/decompress_inflate.c | 1 +
5 files changed, 16 insertions(+)
create mode 100644 arch/arm/pbl/piggy.gzip.S
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index dd5c483..004ba6a 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -46,6 +46,10 @@ extern void *input_data_end;
#include "../../../lib/decompress_unlzo.c"
#endif
+#ifdef CONFIG_IMAGE_COMPRESSION_GZIP
+#include "../../../../lib/decompress_inflate.c"
+#endif
+
static void barebox_uncompress(void *compressed_start, unsigned int len)
{
void (*barebox)(void);
diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 4135911..04fdffb 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -1,4 +1,5 @@
+suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip
suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo
OBJCOPYFLAGS_zbarebox.bin = -O binary
diff --git a/arch/arm/pbl/piggy.gzip.S b/arch/arm/pbl/piggy.gzip.S
new file mode 100644
index 0000000..4a623c0
--- /dev/null
+++ b/arch/arm/pbl/piggy.gzip.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "arch/arm/pbl/piggy.gzip"
+ .globl input_data_end
+input_data_end:
diff --git a/common/Kconfig b/common/Kconfig
index 828fc05..b97392c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -134,6 +134,9 @@ choice
config IMAGE_COMPRESSION_LZO
bool "lzo"
+config IMAGE_COMPRESSION_GZIP
+ bool "gzip"
+
endchoice
endif
@@ -521,6 +524,7 @@ config DEFAULT_ENVIRONMENT_COMPRESSED
bool
depends on DEFAULT_ENVIRONMENT
depends on !IMAGE_COMPRESSION_LZO
+ depends on !IMAGE_COMPRESSION_GZIP
default y if ZLIB
default y if BZLIB
default y if LZO_DECOMPRESS
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index 526d6a1..5c1ebb6 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -4,6 +4,7 @@
/* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots
* errors about console_printk etc... on ARM */
#define _LINUX_KERNEL_H
+#include <linux/decompress/mm.h>
#include "zlib_inflate/inftrees.c"
#include "zlib_inflate/inffast.c"
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-08-03 10:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 10:23 [PATCH 00/12 v4] Add Pre-Bootloader support Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 01/12] Makefile.clean: include Makefiles again Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 02/12] kbuild: add pre-bootloader (pbl) target Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 03/12] Add pre-bootloader (pbl) image support Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 04/12] pbl: discard unwind symbol if enable in barebox Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 05/12] Add compressed image support Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 06/12] decompressor: import malloc/free implementation for linux 3.4 Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 07/12] ARM: add early malloc support needed by the decompressor Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-08-03 10:25 ` [PATCH 09/12] ARM pbl: Add .gitignore for generated files Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 10/12] at91: add lowlevel init to the pbl Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 11/12] kbuild: allow to have custom cppflags for pbl Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 12/12] arm: always enable the garbage collector " Jean-Christophe PLAGNIOL-VILLARD
2012-08-06 7:23 ` [PATCH 00/12 v4] Add Pre-Bootloader 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=1343989522-8807-8-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