summaryrefslogtreecommitdiffstats
path: root/pbl
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-10-17 15:36:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-11-04 12:18:55 +0100
commitccb281647704d6857d3491dc71746d2f7ce38fa7 (patch)
tree174abba08cfce552c97535d9c0abd1f8b32a99f5 /pbl
parent2f81d316d21113ab4288fbd3e84c03bf6f0c08ed (diff)
downloadbarebox-ccb281647704d6857d3491dc71746d2f7ce38fa7.tar.gz
barebox-ccb281647704d6857d3491dc71746d2f7ce38fa7.tar.xz
Add xz decompression support
This adds xz decompression support from the kernel. Both compressing the barebox binary with xz and decompressing xz files on the commandline is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
-rw-r--r--pbl/Kconfig3
-rw-r--r--pbl/decomp.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/pbl/Kconfig b/pbl/Kconfig
index dc3135734e..117b79dcbd 100644
--- a/pbl/Kconfig
+++ b/pbl/Kconfig
@@ -64,6 +64,9 @@ config IMAGE_COMPRESSION_LZO
config IMAGE_COMPRESSION_GZIP
bool "gzip"
+config IMAGE_COMPRESSION_XZKERN
+ bool "xz"
+
config IMAGE_COMPRESSION_NONE
bool "none"
diff --git a/pbl/decomp.c b/pbl/decomp.c
index ca0df6463e..c8014c403f 100644
--- a/pbl/decomp.c
+++ b/pbl/decomp.c
@@ -22,6 +22,10 @@
#include "../../../lib/decompress_inflate.c"
#endif
+#ifdef CONFIG_IMAGE_COMPRESSION_XZKERN
+#include "../../../lib/decompress_unxz.c"
+#endif
+
#ifdef CONFIG_IMAGE_COMPRESSION_NONE
STATIC int decompress(u8 *input, int in_len,
int (*fill) (void *, unsigned int),