mkimage alignment of initrd with -T multi

Simon Glass sjg at chromium.org
Fri Jun 21 01:05:27 CEST 2024


Hi Chris,

On Wed, 19 Jun 2024 at 23:16, Chris Packham <judge.packham at gmail.com> wrote:
>
> Hi U-Boot,
>
> I've been given a MIPS reference board with a fairly old vendor U-Boot
> on it. It does seem to support the  Mutli-File Image format but I'm
> running into an issue where the kernel expects the initrd on a page
> boundary.
>
> I'm using a command like the following to produce and image
>   cat board.dtb >> vmlinux.bin
>   gzip vmlinux.bin >vmlinux.gz
>   mkimage -C gzip -A mips -O linux -T multi -a 0x80100000 -e
> 0x80100000 -d vmlinux.gz:initrd.sqsh myboard.img
>
> I can mess about with padding vmlinux.gz after the gzip step but the
> process is a bit fragile and involves me guessing at some magic
> numbers that I think might be sizes of certain headers.
>
> Is there any way to convince mkimage to make sure the initrd is on an
> appropriately aligned boundary so I don't have to guess.

There is a -B flag which might help, if you can convert it to use FIT.
I am sure that it does, though.

Regards,
Simon


More information about the U-Boot mailing list