Re: Grub doesn’t load devicetree

Peter Robinson pbrobinson at gmail.com
Thu Aug 29 10:01:38 CEST 2024


On Thu, 29 Aug 2024 at 05:14, Tomaž Zaman <tomaz at mono.si> wrote:
>
> I’m working on an arm64 board with an NXP LS1046A CPU and I simply cannot get Grub to load a different device tree than the one that’s provided to it by the EFI Stub.
>
> => fatload mmc 0:1 $kernel_addr_r /EFI/boot/grubaa64.efi
> => fatload mmc 0:1 $fdt_addr_r /boot/dtb/fsl-ls1046a-rdb-sdk.dtb
> => bootefi $kernel_addr_r $fdt_addr_r
>
> At his point, I get a couple of errors like “smmu node not found”.
>
> However, if I, instead of "fsl-ls1046a-rdb-sdk.dtb” use "fsl-ls1046a-rdb.dtb”, then I get to Grub without any errors.
>
> And this is where I encounter the issue. Because I would like to use a different DTB for booting Linux than the one that’s provided by the EFI configuration table, I set
>
> devicetree /boot/dtb/fsl-ls1046a-rdb-sdk.dtb
> linux /boot/vmlinuz-6.6.3-arm64
> initrd /boot/initrd.img-6.6.3-arm64
>
> In this case, the devicetree instruction gets ignored completely, and before I see kernel loading, the message “Using FDT from the EFI configuration table"
>
> Is there a way for me to override/replace the device tree that u-boot passed to Grub? I tried passing the “dtb=“ parameter to the kernel boot command, but in that case, I get "EFI stub: ERROR: Failed to handle fs_proto” because kernel when booting doesn’t appear to have access to the same filesystem that Grub does.

Why don't you load a new one into memory with u-boot and then grub
will already have the one you want to use and grun doesn't need to do
anything. Something like this on the U-Boot command line would load
the DT and grub and start to boot:

load mmc 0:1 ${kernel_addr_r} EFI/BOOT/BOOTAA64.EFI
load mmc 0:1 ${fdt_addr_r} dtb/${fdtfile}
bootefi ${kernel_addr_r} ${fdt_addr_r}

You'll need to adjust for storage, partitions, file paths etc.

> Thank you!
>
>
> (this is my first time using *any* mailing list, so apologies if this is the wrong address to send this question to)
>
> Tomaž Zaman, CEO
> Mono Technologies Inc.
> +386 30 651 645
>
> [cid:18EB2FEE485A4DD7A1CE716CE14FCBC7]
>


More information about the U-Boot mailing list