mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
lib: add support for LZ4-compressed kernel
Add support for extracting LZ4-compressed kernel images, as well as LZ4-compressed ramdisk images in the kernel boot process. Signed-off-by: Kyungsik Lee <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Russell King <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Yann Collet <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
cffb78b0e0
commit
e76e1fdfa8
10 changed files with 243 additions and 2 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/decompress/unxz.h>
|
||||
#include <linux/decompress/inflate.h>
|
||||
#include <linux/decompress/unlzo.h>
|
||||
#include <linux/decompress/unlz4.h>
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
|
|
@ -31,6 +32,9 @@
|
|||
#ifndef CONFIG_DECOMPRESS_LZO
|
||||
# define unlzo NULL
|
||||
#endif
|
||||
#ifndef CONFIG_DECOMPRESS_LZ4
|
||||
# define unlz4 NULL
|
||||
#endif
|
||||
|
||||
struct compress_format {
|
||||
unsigned char magic[2];
|
||||
|
|
@ -45,6 +49,7 @@ static const struct compress_format compressed_formats[] __initconst = {
|
|||
{ {0x5d, 0x00}, "lzma", unlzma },
|
||||
{ {0xfd, 0x37}, "xz", unxz },
|
||||
{ {0x89, 0x4c}, "lzo", unlzo },
|
||||
{ {0x02, 0x21}, "lz4", unlz4 },
|
||||
{ {0, 0}, NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue