summaryrefslogtreecommitdiffstats
path: root/pbl
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-01-28 10:26:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-30 22:32:13 +0100
commit08147d427f9ee4723a6ba8525a2f85b2123f840e (patch)
treebc227a95ca4a2dabff20ca0d1db883399cc68638 /pbl
parentf73a37aa7845cdf7e2bf7aba0184e065dca78198 (diff)
downloadbarebox-08147d427f9ee4723a6ba8525a2f85b2123f840e.tar.gz
barebox-08147d427f9ee4723a6ba8525a2f85b2123f840e.tar.xz
pbl: add none compression support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
-rw-r--r--pbl/Kconfig3
-rw-r--r--pbl/decomp.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/pbl/Kconfig b/pbl/Kconfig
index fbf0b1b4d0..39752cc6f9 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 bd67ed81e1..aa6a31e9da 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);