summaryrefslogtreecommitdiffstats
path: root/commands/bootm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-11-28 13:46:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-29 21:12:42 +0100
commit4b09cdc798ef62602f874a4da03d2a54ca60b4ae (patch)
tree7e60ac75f8f1fee86e11130064bdffee924df7f7 /commands/bootm.c
parent15fcc719abbfe8f42057eeec275ce574ba2fbdd0 (diff)
downloadbarebox-4b09cdc798ef62602f874a4da03d2a54ca60b4ae.tar.gz
barebox-4b09cdc798ef62602f874a4da03d2a54ca60b4ae.tar.xz
add kernel gunzip implementation
The kernel uncompression functions have a unified API so use this implementation to get it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/bootm.c')
-rw-r--r--commands/bootm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 79a16d4745..e2ed9bec50 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -30,7 +30,7 @@
#include <command.h>
#include <image.h>
#include <malloc.h>
-#include <zlib.h>
+#include <gunzip.h>
#include <environment.h>
#include <asm/byteorder.h>
#include <xfuncs.h>
@@ -88,9 +88,11 @@ int relocate_image(struct image_handle *handle, void *load_address)
#ifdef CONFIG_CMD_BOOTM_ZLIB
case IH_COMP_GZIP:
printf (" Uncompressing ... ");
- if (gunzip (load_address, unc_len,
- data, &len) != 0)
- return -1;
+
+ ret = gunzip(data, len, NULL, NULL, load_address, NULL,
+ unzip_error);
+ if (ret)
+ return ret;
break;
#endif
#ifdef CONFIG_CMD_BOOTM_BZLIB