Jetpack 6.1 GRUB not booting

Hi,
I’m having hard time getting GRUB running on Orin Nano on R36.4 - I followed the kernel customization guide and installed GRUB and created grub.cfg containing correct rootfs UUID, path to kernel image, initrd and device tree (used L4TLauncher to verify). I’m able to see menu in GRUB as normal but it will not boot linux and there’s no information why on the serial line even with debug UEFI, all I see is:

ESC   to enter Setup.
F11   to enter Boot Manager Menu.
Enter to continue boot.
Failed to find memory test protocol
!!! enter DisableFRB2Handler()!!!
GetParentPcieControllerPrivate: cannot retrieve device path protocol from device handle: Unsupported
[Bds]Booting UEFI CT500P3SSD8 24394B58D47F 1
ERROR: C40000002:V03051002 I0 6D33944A-EC75-4855-A54D-809C75241F6C 267D56038
!!! enter DisableFRB2Handler()!!!
GetParentPcieControllerPrivate: cannot retrieve device path protocol from device handle: Unsupported
[Bds]Booting UEFI SD Device
Loading driver at 0x0025E0C3000 EntryPoint=0x0025E0C4000
Loading driver at 0x0025E0C3000 EntryPoint=0x0025E0C4000 
UpdateFdt: Applying overlays from firmware media.
Processing "L4T Configuration Settings" DTB overlay
Processing "Tegra234 Carveouts Overlay" DTB overlay
Processing "OP-TEE overlay" DTB overlay
Processing "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay" DTB overlay
Failed to apply device tree overlay. Error Code = -3
GetParentPcieControllerPrivate: cannot retrieve device path protocol from device handle: Unsupported
EFI stub: Booting Linux Kernel...
EFI stub: ERROR: Invalid header detected on UEFI supplied FDT, ignoring ...
EFI stub: Generating empty DTB
EFI stub: Exiting boot services...
PROGRESS CODE: V03101019 I0 D6A2CB7F-6A18-4E2F-B43B-9920A733700A

Here’s the relevant contents of my grub.cfg:

menuentry 'SD' {
        echo "Booting from SD..."
        search --no-floppy --fs-uuid --set=root c6049c65-4211-4e3d-90ff-eca649d32631
        linux       /boot/Image root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0
        initrd      /boot/initrd
	devicetree  /boot/tegra234-p3768-0000+p3767-0005-nv-super.dtb
}

Verified UUID and files existence through grub console. Do you know why/how to debug what’s going on? It would seem there’s some issue with passing device tree but same DTB file works just fine with L4TLauncher.

Hi skrilax,

Are you using the devkit or custom board for Orin Nano?

Please refer to UEFI Adaptation — NVIDIA Jetson Linux Developer Guide 1 documentation for the Grub support.

I’m using the devkit and have followed that guide to install GRUB. GRUB loads up fine (I can toggle options in the menu / use shell in GRUB) but for some reason, GRUB won’t boot linux.

Your problem is the name of the device tree, update your grub file

Processing "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay" DTB overlay
Failed to apply device tree overlay. Error Code = -3
GetParentPcieControllerPrivate: cannot retrieve device path protocol from device handle: Unsupported
EFI stub: Booting Linux Kernel...
EFI stub: ERROR: Invalid header detected on UEFI supplied FDT, ignoring ...
EFI stub: Generating empty DTB
EFI stub: Exiting boot services...

It is looking for that one and its missing.

Also stick your SD card in a metal box and check the root partition UUID, make sure it matches your grub config. That might be why the FDT is missing.

I checked that: c6049c65-4211-4e3d-90ff-eca649d32631 is correct UUID and DTB is present there (and works with L4T), that’s why it’s confusing. I guess it’s something related to …

Processing "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay" DTB overlay
Failed to apply device tree overlay. Error Code = -3

That must be an artifact from some config file, -xxxx seems like a place holder?? Our board crapped out and I am waiting on a replacement so I am not much help without a board, sorry.

They have a boot system that is different that what we have been working with. I was flashing the kernel using their script and it was being loaded ??? and it would boot on the old kernel. Had to actually go in and manually copy it over. Not sure about that, I would like to rip that stuff out and just go back the simple method. OTA is banned in our world so that will have to addressed.

Hi skrilax,

Could you move to the latest Jetpack 6.2 (R36.4.3) just released yesterday to verify?

Please also confirm if above 4 dtb overlay files exist on your board.

Will update to 6.2 (waiting for the source tags to be live). I checked the UEFI log from before GRUB and see that the DTB overlays were successfully applied, so I don’t think they are the problem.

Processing "L4T Configuration Settings" DTB overlay
Processing "Tegra234 Carveouts Overlay" DTB overlay
Processing "OP-TEE overlay" DTB overlay
Processing "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay" DTB overlay
UpdateFdt: Overlays from firmware media already applied.

okay, please update the result if it works with Jetpack 6.2.

I have the same problem with Jetson 6.2 - exact same error, will not boot.

But I found out that if I uncomment the devicetree line, it will actually boot (according to the chart in the manual this uses devicetree that UEFI used). Which is very puzzling right now (when using on Xavier NX on r35.6.0, I can specify devicetree to grub and it is correctly used / loaded).

I have no problem when using L4TLauncher when specifying the dtb as FDT entry extlinux.conf, seems like GRUB has problem loading tegra234-p3768-0000+p3767-0005-nv-super.dtb?

I also checked what’s printed on display when set debug=linux,fdt,efi in GRUB, I don’t see any error messages in GRUB loading tegra234-p3768-0000+p3767-0005-nv-super.dtb so I’m guessing the problem is between GRUB passing it back to EFI to boot?

btw. GRUB version in Ubuntu 22.04 is 2.06.

EDIT: Ah no, the problem is applying the overlay on top of tegra234-p3768-0000+p3767-0005-nv-super.dtb as UEFI will not pass device tree when booting if there’s an error. Adding firmware-media-overlays-applied under /firmware/uefi will cause it to boot the kernel (although with some issues as display didn’t come up, but didn’t debug further).

Could you advise on what are the correct next steps here when intending to specify devicetree in GRUB? How can I debug if there’s an issue with the overlay offline to see why it fails?

Is your issue relating to DTB loading?
Actually, dtb is packaged in uefi binary during flash. You can find more details about DTB loading in DTB Support.

Do you mean it is working after you remove devicetree /boot/tegra234-p3768-0000+p3767-0005-nv-super.dtb?

Have you also tried to add FDT entry in grub.cfg?

Yes, removing devicetree /boot/tegra234-p3768-0000+p3767-0005-nv-super.dtb makes it boot. Specifying it fails.

In Grub, you specify device tree entry using devicetree line (and point it to the same file as FDT in L4TLauncher).

Could you provide both tegra234-p3768-0000+p3767-0005-nv-super.dtb and tegra234-p3768-0000+p3767-0005-nv.dtb from your board for further check?

They are exactly the same as in the R36.4.3 release (I’m using the Orin Nano Devkit).

Do you mean that these 2 DTB files are the same?
or the result in R36.4.3 is the same as in R36.4.0?

I’ve verified that Grub working on my Orin Nano devkit+super board config with JP6.2.
Currently, I boot from NVMe SSD and I didn’t add devicetree entry in grub.cfg.

Please let me share my /boot/grub/grub.cfg and /etc/default/grub and /etc/grub.d/40_custom as following for your reference.
grub.cfg (4.3 KB)
grub (1.2 KB)
40_custom (750 Bytes)

Why you want to specify this?

I meant I didn’t make any modifications to DTB files from R36.4.2 or R36.4.3 (took them as is).

This exact configuration works for me (grub.cfg, grub, 40_custom), but if you add devicetree tegra234-p3768-0000+p3767-0005-nv-super.dtb to grub.cfg then it will fail.

I want to specify device tree in at grub level since it is easier to make changes w/o reflashing the unit or when bringing my own kernel you want to specify different device tree for default 5.15 kernel and my own (6.12).

I’ve verified adding devicetree working to load dtb from rootfs.
Please refer to my configuration in 40_custom as following.

$ cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Jetson Linux' {
        echo "Booting Jetson Linux..."
        search --no-floppy --fs-uuid --set=root 2deed6d6-5d1c-4853-8077-ca1b4bc75ae8
        linux   /boot/Image root=PARTUUID=cad9b639-9367-441d-ae85-5c5d43b3ce79 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0x471E10000 bl_prof_ro_ptr=65536@0x471E00000
        initrd  /boot/initrd
        devicetree /boot/dtb/kernel_tegra234-p3768-0000+p3767-0000-nv-super.dtb
}

menuentry "System restart" {
        echo "System rebooting..."
        reboot
}

After you modify it, please run the following command to apply the change.

$ sudo su -c "grub-mkconfig > /boot/grub/grub.cfg"
$ sudo su -c "update-grub"
$ reboot

Hmm, I don’t understand why it’s not working for me then. What would be the best way to debug “why overlay fails”? Look into UEFI source code and add additional logging when the overlay is applied? Or is there some “offline” way?