[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cfb9c01a-7af6-42ff-9056-e64c8c29bfdb@pengutronix.de>
Date: Tue, 2 Jan 2024 16:53:09 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Masahiro Yamada <masahiroy@...nel.org>, Chen-Yu Tsai <wenst@...omium.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Simon Glass <sjg@...omium.org>, linux-arm-kernel@...ts.infradead.org,
U-Boot Mailing List <u-boot@...ts.denx.de>,
Nicolas Schier <nicolas@...sle.eu>, Tom Rini <trini@...sulko.com>,
Catalin Marinas <catalin.marinas@....com>, Jonathan Corbet <corbet@....net>,
Nathan Chancellor <nathan@...nel.org>, Nick Terrell <terrelln@...com>,
Will Deacon <will@...nel.org>, linux-doc@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
workflows@...r.kernel.org
Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree
Hello Yamada-san,
On 14.12.23 08:33, Masahiro Yamada wrote:
>> The FIT spec allows the "fdt" property to list
>> multiple image nodes.
>>
>>
>> o config-1
>> |- description = "configuration description"
>> |- kernel = "kernel sub-node unit name"
>> |- fdt = "fdt sub-node unit-name" [, "fdt overlay sub-node unit-name", ...]
>> |- loadables = "loadables sub-node unit-name"
>> |- script = "
>> |- compatible = "vendor
>
>
>
>
>
> This is a question for U-Boot (and barebox).
>
>
>
>
> images {
> base {
> ...
> };
>
> addon1 {
> ...
> };
>
> addon2 {
> ...
> };
> };
>
> configurations {
> ...
> fdt = "base", "addon1", "addon2";
> };
>
>
>
>
> Is U-Boot's "bootm" command able to dynamically construct
> the full DTB from "base" + "addon1" + "addon2"
> and pass to the kernel?
barebox can apply overlays to the DT, but doesn't do so yet from
the extra entries in configuration fdt properties.
This should be straight-forward to add though, if the need arises.
> Is U-Boot able to handle FIT (includes kernel + DTs)
> and a separate initrd?
>
> # bootm <fit-address>:<conf-name> <ramdisk-address>
This is possible in barebox, provided that the FIT image doesn't
already have a ramdisk and that CONFIG_BOOTM_FORCE_SIGNED_IMAGES=n:
bootm -r /mnt/nfs/ramdisk.gz /mnt/nfs/image.fit
(Or the equivalent variables if not wanting to use the shell.)
> Presumably, it would be difficult to inject initramdisk
> into image.fit later, so I am hoping bootm would work like that,
> but I did not delve into U-Boot code.
>
>
>
> If it works, is it possible to verify the integrity of initrd?
> The kernel and DTs inside FIT will be verified, but not sure
> if it is possible for ramdisk.
If one wants to preclude mix & match attacks, the configuration needs
to be verified fully, so if signing is required, it's probably better to
amend the FIT later on with the new configuration instead of signing
the initrd separately and combining them at runtime.
Cheers,
Ahmad
>
>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists