blob: bd67ed81e1b4317099d8e370288befdb5ead571f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* Copyright (c) 2010-2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
* Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* Under GPLv2 only
*/
#include <common.h>
#include <pbl.h>
#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
static void noinline errorfn(char *error)
{
while (1);
}
void pbl_barebox_uncompress(void *dest, void *compressed_start, unsigned int len)
{
decompress((void *)compressed_start,
len,
NULL, NULL,
dest, NULL, errorfn);
}
|