diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-28 10:26:11 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-30 22:32:13 +0100 |
commit | f73a37aa7845cdf7e2bf7aba0184e065dca78198 (patch) | |
tree | 55c18f6090f0086b4fe05ed98a9edac6cdf71f1b /arch/mips/boot | |
parent | 36db2a0f05f8dab8c8c38e47b5112dbb89a47781 (diff) | |
download | barebox-f73a37aa7845cdf7e2bf7aba0184e065dca78198.tar.gz barebox-f73a37aa7845cdf7e2bf7aba0184e065dca78198.tar.xz |
pbl: factorise decompressor
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/boot')
-rw-r--r-- | arch/mips/boot/main_entry-pbl.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/arch/mips/boot/main_entry-pbl.c b/arch/mips/boot/main_entry-pbl.c index f39e9360b1..820e1d5d1b 100644 --- a/arch/mips/boot/main_entry-pbl.c +++ b/arch/mips/boot/main_entry-pbl.c @@ -17,6 +17,7 @@ */ #include <common.h> +#include <pbl.h> #include <init.h> #include <sizes.h> #include <string.h> @@ -30,28 +31,10 @@ extern void *input_data_end; unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; -#define STATIC static - -#ifdef CONFIG_IMAGE_COMPRESSION_LZO -#include "../../../lib/decompress_unlzo.c" -#endif - -#ifdef CONFIG_IMAGE_COMPRESSION_GZIP -#include "../../../lib/decompress_inflate.c" -#endif - void pbl_main_entry(void); static unsigned long *ttb; -static noinline void errorfn(char *error) -{ - PUTS_LL(error); - PUTC_LL('\n'); - - unreachable(); -} - static void barebox_uncompress(void *compressed_start, unsigned int len) { /* set 128 KiB at the end of the MALLOC_BASE for early malloc */ @@ -60,10 +43,7 @@ static void barebox_uncompress(void *compressed_start, unsigned int len) ttb = (void *)((free_mem_ptr - 0x4000) & ~0x3fff); - decompress((void *)compressed_start, - len, - NULL, NULL, - (void *)TEXT_BASE, NULL, errorfn); + pbl_barebox_uncompress((void*)TEXT_BASE, compressed_start, len); } void __section(.text_entry) pbl_main_entry(void) |