[PATCH RFC 1/9] tools: mkimage: Add Amlogic Boot Image type

Ferass El Hafidi funderscore at postmarketos.org
Wed Sep 10 21:41:54 CEST 2025


On Wed Sep 10, 2025 at 7:36 PM UTC, Heinrich Schuchardt wrote:
> On 9/7/25 16:36, Ferass El Hafidi wrote:
>> From: Jonas Karlman <jonas at kwiboo.se>
>> 
>> Add support for creating an Amlogic Boot Image that pass CHK in BL1 on
>> Amlogic AArch64 SoCs.
>> 
>> Images can optionally be signed for secure boot scenario, however
>> creation of signed images has not been implemented.
>> 
>> Example of how to use it:
>>    # Create an amlogic boot image
>>    tools/mkimage -T amlimage -n gxbb -d u-boot-spl.bin u-boot-amlogic.bin
>> 
>>    # List boot image header information
>>    tools/mkimage -l u-boot-amlogic.bin
>> 
>>    # Extract amlogic boot image payload
>>    tools/dumpimage -T amlimage -o bl2-payload.bin u-boot-amlogic.bin
>> 
>> Or with binman using something like:
>>    binman {
>> 	u-boot-amlogic {
>> 		filename = "u-boot-amlogic.bin";
>> 		pad-byte = <0xff>;
>> 
>> 		mkimage {
>> 			filename = "bl2.bin";
>> 			args = "-n", "gxbb", "-T", "amlimage";
>> 
>> 			u-boot-spl {
>> 			};
>> 		};
>> 	};
>>    };
>
> Thanks for adding the Amlogic image creation support to U-Boot.
>

yes, thank you Jonas. :)

> What is the basis of the patch?
> Documentation, reverse engineering, or existing code?
>

There has been a lot of reverse engineering in the past.  These days the
amlogic image format is somewhat well understood, enough to build an
image and get it booting.  So there are various external tools that aim
to create bootable images, such as gxlimg, meson-tools, meson64-tools,
etc.

Jonas wrote in his cover letter:

> The amlimage type and the eMMC relocation workaround is loosely based on
> my prior work, aml_chksum, a small tool that can write boot image
> headers with updated offsets and checksums, see [1].
> [1] https://github.com/Kwiboo/u-boot/commit/6d0a17632922077a2e64b13ae1a6bdf0024b718f

Thanks.


More information about the U-Boot mailing list