From: "Tomaž Zaman" <tomaz@mono.si>
To: Peter Robinson <pbrobinson@gmail.com>
Cc: "u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Re: Grub doesn’t load devicetree
Date: Thu, 29 Aug 2024 09:40:04 +0000 [thread overview]
Message-ID: <7056f770-e3c9-42e5-a654-f52c29edf616@Spark> (raw)
In-Reply-To: <CALeDE9OXK_Wm-KbPC5Qs2C7L0OfQtFXtU2Y6_g-gK6euGMJsqw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3504 bytes --]
I get this:
No UEFI binary known at 0x81000000
Tomaž Zaman, CEO
Mono Technologies Inc.
+386 30 651 645
[cid:C1D504EAD21B41379FD3EEB7B3129E94]
On 29 Aug 2024 at 11:38 +0200, Peter Robinson <pbrobinson@gmail.com>, wrote:
On Thu, 29 Aug 2024 at 10:31, Tomaž Zaman <tomaz@mono.si<mailto:tomaz@mono.si>> wrote:
Doesn’t work - at least not correctly:
=> fatload mmc 0:1 $fdt_addr_r /boot/dtb/fsl-ls1046a-rdb-sdk.dtb
31793 bytes read in 4 ms (7.6 MiB/s)
=> fatload mmc 0:1 $kernel_addr_r /EFI/boot/grubaa64.efi
3978688 bytes read in 168 ms (22.6 MiB/s)
=> setenv fman_ucode
=> bootefi $kernel_addr_r $fdt_addr_r
Failed to load EFI variables
WARNING failed to get smmu node: FDT_ERR_NOTFOUND
WARNING failed to get smmu node: FDT_ERR_NOTFOUND
Booting /\EFI\boot\grubaa64.efi
Welcome to GRUB!
Because of those FDT_ERR_NOTFOUND kernel reports a bunch of errors and doesn’t boot with all the hardware support I need it to.
On the other hand, if I run the same kernel/devicetree/initramfs with booti, bypassing the Grub completely, it works fine. The problem is, I need Grub2 for his project.
What if you boot the kernel directly using bootefi rather than booti?
Tomaž Zaman, CEO
Mono Technologies Inc.
+386 30 651 645
[cid:ii_1919d7f0aabad8457221]
On 29 Aug 2024 at 10:02 +0200, Peter Robinson <pbrobinson@gmail.com<mailto:pbrobinson@gmail.com>>, wrote:
On Thu, 29 Aug 2024 at 05:14, Tomaž Zaman <tomaz@mono.si<mailto:tomaz@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]
[-- Attachment #2: C1D504EAD21B41379FD3EEB7B3129E94.png --]
[-- Type: image/png, Size: 5014 bytes --]
[-- Attachment #3: 98510E94234546F0B7D19E62D33FDFCC.png --]
[-- Type: image/png, Size: 5014 bytes --]
next prev parent reply other threads:[~2024-08-29 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7f33e3d7-e5ab-4c1d-a69a-153a50a6b0c2@Spark>
2024-08-29 0:31 ` Grub doesn’t load devicetree Tomaž Zaman
2024-08-29 8:01 ` Peter Robinson
2024-08-29 9:31 ` Tomaž Zaman
2024-08-29 9:37 ` Peter Robinson
2024-08-29 9:40 ` Tomaž Zaman [this message]
2024-08-29 9:44 ` Peter Robinson
2024-08-29 9:54 ` Tomaž Zaman
2024-08-29 12:17 ` Simon Glass
2024-08-29 13:25 ` Tomaž Zaman
2024-08-30 23:48 ` Tomaž Zaman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7056f770-e3c9-42e5-a654-f52c29edf616@Spark \
--to=tomaz@mono.si \
--cc=pbrobinson@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.