I have the following setup: Jetson AGX (Rudi AGX from Connecttech) with a custom (unsigned) device tree.
Everything worked fine so far (loading device tree via FDT command in extlinux.conf) but when i added an NVMe SSD to the system it started loading a default device tree. I also found the reason: it takes the /boot partition from the NVMe drive (which is later mounted on /data), if there is none it takes the default FDT file. So everything works again (by copying the /boot partition to /data/boot) but the behavior feels strange to me.
Could you please explain me why it boots from NVMe when there is one inserted and what would make sense to change that it would boot from eMMC regardless of inserting a disk? (e.g. formatting the disk MBR instead of GPT and remove boot flag?)
extlinux.conf – nothing special in here
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra194-agx-cti-custom.dtb
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
mount
/dev/mmcblk0p1 on / type ext4 (rw,relatime,data=ordered)
/dev/nvme0n1p1 on /data type ext4 (rw,noatime,data=ordered)
CBoot functionality includes a default booting scan sequence. It scans bootable devices in the following order:
External SD card
External NVMe device
USB device
Internal eMMC
here also the order seems to be correct, the remaining question is: why does it boot a default setup when it doesn’t find extlinux.conf on the NVMe (the correct extlinux.conf is on the eMMC)?
this would also imply that as soon as someone attaches an external SD card to the Jetson it will boot a wrong system configuration (by not loading the extlinux.conf from eMMC:/boot but trying to load it from SD not finding it, failing and booting some default)
I reported the same but was told this is a feature, not a bug.
eg: if you have a SD or nvme drive as a data disk, bootloader will attempt to find /boot/extlinux/extlinux.conf from it, if not found, it will NOT go on to try the next devices on the list, so your internal emmc extlinux.conf is ignored. The only workaround is to update the bootloader config to remove SD/nvme from the boot device list.
At least that is a workaround. Am I assuming it right that you have to change the boot-configuration in the bootloader device tree, rebuild & flash the new bootloader?
You need to modify the file Linux_for_Tegra/bootloader/cbo.dts and change the line: boot-order to remove usb and/or nvme. Then rebuild the dts file: ../kernel/dtc -I dts -O dtb -o cbo.dtb cbo.dts and reflash.