From: Marek Vasut Date: Tue, 9 Apr 2019 13:06:31 +0200 Subject: [U-Boot] [PATCH v2 1/2] image: android: allow booting lz4-compressed kernels In-Reply-To: <20190408153528.23783-1-erosca@de.adit-jv.com> References: <20190408153528.23783-1-erosca@de.adit-jv.com> Message-ID: <7fe515ff-685f-b346-4833-9344da7746e7@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4/8/19 5:35 PM, Eugeniu Rosca wrote: > According to Android image format [1], kernel image resides at 1 page > offset from the boot image address. Grab the magic number from there > and allow U-Boot to handle LZ4-compressed KNL binaries instead of > hardcoding compression type to IH_COMP_NONE. Other compression types, > if needed, can be added later. > > Tested on H3ULCB-KF using the image detailed in [2]. H3ULCB Kingfisher is not supported in mainline ;-) [...] > diff --git a/include/image.h b/include/image.h > index 765ffecee0a7..889305cbefdb 100644 > --- a/include/image.h > +++ b/include/image.h > @@ -306,6 +306,7 @@ enum { > IH_COMP_COUNT, > }; > > +#define LZ4F_MAGIC 0x184D2204 /* LZ4 Magic Number */ > #define IH_MAGIC 0x27051956 /* Image Magic Number */ > #define IH_NMLEN 32 /* Image Name Length */ > Keep the list sorted please. [...] -- Best regards, Marek Vasut