[PATCH] image: android: Automatically detect more compression types

Tom Rini trini at konsulko.com
Fri Jul 16 17:52:40 CEST 2021


On Thu, Jul 01, 2021 at 08:33:16PM +0200, Stephan Gerhold wrote:

> At the moment android_image_get_kcomp() can automatically detect
> LZ4 compressed kernels and the compression specified in uImages.
> However, especially on ARM64 Linux is often compressed with GZIP.
> Attempting to boot an Android image with a GZIP compressed kernel
> image currently results in a very strange crash, e.g.
> 
>   Starting kernel ...
>   "Synchronous Abort" handler, esr 0x02000000
>    ...
>   Code: 5555d555 55555d55 555f5555 5d555d55 (00088b1f)
> 
> Note the 1f8b, which are the "magic" bytes for GZIP images.
> 
> U-Boot already has the image_decomp_type() function that checks for
> the magic bytes of bzip2, gzip, lzma and lzo. It's easy to make use
> of it here to increase the chance that we do the right thing and the
> user does not become confused with strange crashes.
> 
> This allows booting Android boot images that contain GZIP-compressed
> kernel images.
> 
> Signed-off-by: Stephan Gerhold <stephan at gerhold.net>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210716/2180b842/attachment.sig>


More information about the U-Boot mailing list