[RFC, PATCH] fdt: Make sure there is no stale initrd left
Richard Weinberger
richard at sigma-star.at
Wed Jul 9 08:24:20 CEST 2025
On Mittwoch, 9. Juli 2025 00:58 Sam Protsenko wrote:
> fdt_initrd() function (where initrd dts properties are removed) is
> called two times:
>
> 1. First it's called by EFI boot manager (e.g. as a part of U-Boot
> Standard Boot mechanism) when it's installing FDT:
>
> fdt_initrd
> image_setup_libfdt
> efi_install_fdt
> efi_bootmgr_run
> efi_mgr_boot
>
> It's already enough for EFI app to malfunction. But then it's also
> called second time:
>
> 2. From the EFI app, via EFI DT fixup protocol:
>
> fdt_initrd
> image_setup_libfdt
> efi_dt_fixup
> struct efi_dt_fixup_protocol efi_dt_fixup_prot = {
> .fixup = efi_dt_fixup
> };
>
> See [2] for specific GBL code which sets those fdt properties and then
> runs DT fixup protocol callback.
>
> I don't see any way for U-Boot to know if those initrd properties are
> going to be set later by other EFI apps or not. So arguably this patch
> should be reverted. But I might be missing something and maybe there
> are better options to fix that?
I think we need to distinguish two cases:
1. The caller explicitly does not want to have an initramfs. e.g. you run "bootm addr1 - addr3".
2. The caller does not care. Your case.
Thanks,
//richard
--
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr:
ATU 66964118 | FN: 374287y
More information about the U-Boot
mailing list