From 027b728d4aafb5cf97abc804944a77b837b0f07f Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 6 Oct 2015 20:03:53 -0700 Subject: Add support for LZ4 decompression algorithm This patch adds support for LZ4-compressed FIT image contents. This algorithm has a slightly worse compression ration than LZO while being nearly twice as fast to decompress. When loading images from a fast storage medium this usually results in a boot time win. Sandbox-tested only since I don't have a U-Boot development system set up right now. The code was imported unchanged from coreboot where it's proven to work, though. I'm mostly interested in getting this recognized by mkImage for use in a downstream project. Signed-off-by: Julius Werner Acked-by: Simon Glass --- common/image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index 1325e07..c33749d 100644 --- a/common/image.c +++ b/common/image.c @@ -167,6 +167,7 @@ static const table_entry_t uimage_comp[] = { { IH_COMP_GZIP, "gzip", "gzip compressed", }, { IH_COMP_LZMA, "lzma", "lzma compressed", }, { IH_COMP_LZO, "lzo", "lzo compressed", }, + { IH_COMP_LZ4, "lz4", "lz4 compressed", }, { -1, "", "", }, }; -- cgit v1.1 From 1fec3c5d832d6e0cac10135179016b0640f1a863 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 27 Aug 2015 15:42:41 -0400 Subject: common/image.c: Make boot_get_ramdisk() perform a check for Android images In 2dd4632 the check for where a ramdisk is found on an Android image was got moved into the "normal" loop here, causing people to have to pass the kernel address in the ramdisk address location in order to have Android boot still. This changed previous behavior so perform a check early in the function to see if we have an Android image and if so use that as where to look for the ramdisk (which is what the rest of the code here expects). We allow for this to still be overridden with an explicit ramdisk address to be passed as normal. Cc: Rob Herring Reported-by: Paul Kocialkowski Signed-off-by: Tom Rini --- common/image.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index c33749d..e607109 100644 --- a/common/image.c +++ b/common/image.c @@ -908,6 +908,15 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, *rd_start = 0; *rd_end = 0; +#ifdef CONFIG_ANDROID_BOOT_IMAGE + /* + * Look for an Android boot image. + */ + buf = map_sysmem(images->os.start, 0); + if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) + select = argv[0]; +#endif + if (argc >= 2) select = argv[1]; -- cgit v1.1