I created Massflash image by using this dtbo in the arguments for the MFimage creation command as :
ADDITIONAL_DTB_OVERLAY_OPT=“custom.dtbo”
Finally, I flash the Massflash image on Jetson Xavier NX.
However, it does not automatically show an entry into /proc/device-tree/name as this “name” is in the custom.dtbo.
But, I can only get this “/proc/device-tree/name” entry when I manually apply the dtbo via
/opt/nvidia/jetson-io/config-by-hardware.py -n “Manufacturer” and reboot the jetson.
Is there a better alternative to this ? I don’t want to apply this dtbo via jetson-io tool , rather automatically after flashing…Is it possible ?
I also want to set boot-order as NVME as default via “BootOrderNvme.dtbo”
I tried adding ADDITIONAL_DTB_OVERLAY_OPT=“custom.dtbo,BootOrderNvme.dtbo” to Massflash creation command before flashing, but it doesn’t work as well. Am I doing something wrong ?
Have you checked if the overlay is being loaded correctly during boot up?
You can build UEFI again to enable debug print to do so.
What do you mean with it doesn’t work? What gets set as the the default booting device?
Do you have any other bootable device plugged in?
The logic is that UEFI will scan for all bootable devices upon boot, and those newly found devices will be added to the top of the list.
“It doesn’t work” means, setting BootOrderNvme.dtbo in environment variable ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderNvme.dtbo” while creating massflash image doesn’t lead to uefi default boot entry to nvme.
The first entry in the boot menu is still EMMC.
I also tried fdtoverlay to append the final dtb with kernel/dtb/tegra194-p3668-0001-p3509-0000.dtb with BootOrderNvme.dtbo.
Is the final dtb tegra194-p3668-0001-p3509-0000.dtb (which I modified with fdtoverlay ) copied to kernel_tegra194-p3668-0001-p3509-0000.dtb as the final FDT entry ?
The contents of Linux_for_Tegra/bootloader on host PC after creating Massflash image has 2 kernel entries:
If massflash package is created correctly, please try modifying files in Linux_for_Tegra/mfi_<board>; they are what get actually flashed into devices with massflash.
Could you please also comment on the file:
kernel_tegra194-p3668-0001-p3509-0000.dtb.sb ?
.sb what kind of file is this ? Is it related to secure boot ?
Why this file is being used and copied in the FDT entry but without .sd extension on Jetson ?
How can I make sure, that .sb file is updated with latest fdtoverlay changes with custom.dtbo and BootOrderNvme.dtbo as applied below ? I see kernel_tegra194-p3668-0001-p3509-0000.dtb has these overlay changes but kernel_tegra194-p3668-0001-p3509-0000.dtb.sb doesn’t.
I didn’t flash the jetson again yet but currently what I observe is in Linux_for_Tegra/bootloader on host pc:
kernel_tegra194-p3668-0001-p3509-0000.dtb.sb -> has nvme change but custom.dtbo change is the previous one
kernel_tegra194-p3668-0001-p3509-0000.dtb -> has nvme change and also new custom.dtbo change
I guess, kernel_tegra194-p3668-0001-p3509-0000.dtb is regenerated while creating massflash image again with new custom.dtbo ( as we change within custom.dtbo “name” value ) but kernel_tegra194-p3668-0001-p3509-0000.dtb.sb remains the old one. Not sure, why .sb file is not regenerated while creating massflash image.
But in Linux_for_Tegra/mfi_jetson-xavier-nx-devkit-emmc/bootloader : there is only one file and I guess that has to be the final dtb: [Since mfi_ folder, there is no .sb file ]
kernel_tegra194-p3668-0001-p3509-0000.dtb -> it has both BootorderNvme.dtbo and custom.dtbo changes
I will flash the jetson again and post again regarding what changes takes effect…
After flashing, the custom.dtbo change is working correctly.
However, boot order set as “nvme” from BootOrderNvme.dtbo is not reflected in uefi menu and the jetson continues to boot from emmc by default.
However, the boot-order change can be seen in the final dtb file: kernel_tegra194-p3668-0001-p3509-0000.dtb
Is this change not good enough to boot from NVME by default ? or some extra things needed to be done ?
Yes, manually selecting boot device as NVME from UEFI Menu works !
But, the dtb changes doesn’t take effect. That means, it didn’t boot from NVME by default. Still the EMMC is reflected as the default boot device.
I checked again that using “ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderNvme.dtbo”” indeed works when I don’t use the --external-only flag in the below command without creating massflash image, rather just directly flashing jetson:
But, I don’t want to flash EMMC . Workflow 11, example 2 from README_initrd_flash.txt mentions:
**"Workflow 11: Generate images for internal device and external device seperately"**
**Example 2: In this example, you want to boot Jetson Xavier NX SD from an**
**attached NVMe SSD. The SD card does not need to be plugged in. You can also**
**apply this if you don't want to use the emmc on the Jetson Xavier NX emmc.**
Do I need to generate qspi-only images for BootorderNvme.dtbo to take effect ?
We already have -c option with “./tools/kernel_flash/flash_l4t_nvme_rootfs_enc.xml” conf file, will it be able to accept another "-c bootloader/t186ref/cfg/flash_l4t_t194_qspi_p3668.xml " within -p ?
The boot order is determined by UEFI, which resides in the QSPI memory.
Then you can take a look at the following snippet taken from Linux_for_Tegra/tools/kernel_flash/l4t_flash_from_kernel.sh
1142 function flash_qspi
1143 {
1144 if [ "${host_mode}" = "0" ] && [ "${external_only}" = "0" ] && is_spi_flash; then
1145 print_log "Starting to flash to qspi"
1146 if [ -z "${target_partname}" ]; then
1147 erase_spi /dev/mtd0
1148 fi
1149 write_to_spi
1150
1151 print_log "Successfully flash the qspi"
1152 fi
1153 }
As you can see, if you explicitly specify –external-only, the QSPI memory will not be updated at all.
Also, UEFI reads device tree from the dedicated bootloader-dtb partition, which also resides in the QSPI memory, so checking if it’s taking effect in the rootfs is meaningless.
Therefore, if you don’t want to flash the internal eMMC, and need to update the QSPI memory to update the boot order, instead of –external-only, you need to specify -p "-c bootloader/t186ref/cfg/flash_l4t_t194_qspi_p3668.xml" to tell the script to generate images for only QSPI but not eMMC.