Cboot never tries to boot from emmc root partition if nvme drive present

I have a jetson xavier agx with an extra 1TB nvme drive used for data storage. The root partition is in the usual place on the emmc drive. I also want to use jetson-io to enable the spi pins on the 40-pin header that results in a custom dtb file in the /boot directory of the root partition on emmc, and sets up extlinux.conf to boot using this dtb file. However, whenever the machine boots it seemingly ignores the extlinux.conf. Tracing the boot messages on the console it appears that cboot is following its standard search order (sd, usb, nvme, emmc, net) when looking for something to boot but first comes across the nvme drive where it tries to find extlinux.conf. It fails to find the file and then defaults to loading a default image and dtb from default partitions on emmc. So it never gets as far as looking for extlinux.conf on the correct emmc root partition.

I can change the search order to (emmc, sd, usb, nvme, net) by stopping the boot process at the cboot prompt, and I get the correct behaviour and the machine boots from the emmc root partition with my custom dtb. However, this is not a solution as I would need to do this at every reboot.

Is there a way to avoid cboot looking for and failing to find extlinux.conf in my nvme drive? Do I need to label or partition the drive in any way to stop it? Or is there a trivial way to change the boot search order permanently for cboot?

section of boot log below

[0007.174] I> nvme-0 params source = 
[0007.178] I> Found 1 partitions in NVME (instance 0)
[0007.183] I> Look for boot partition
[0007.186] I> Fallback: assuming 0th partition is boot partition
[0007.198] I> Detect filesystem
[0007.202] I> Loading kernel-bootctrl from partition
[0007.202] I> Loading partition kernel-bootctrl at 0xa4bc0000 from device(0x1)
[0007.213] W> tegrabl_get_kernel_bootctrl: magic number(0x00000000) is invalid
[0007.213] W> tegrabl_get_kernel_bootctrl: use default dummy boot control data
[0007.220] I> Loading extlinux.conf ...
[0007.224] I> Loading extlinux.conf binary from rootfs ...
[0007.229] I> rootfs path: /nvme/boot/extlinux/extlinux.conf
[0007.309] I> lookup_linear_dir:447: Invalid file block num
[0007.310] I> ext2_walk:142: 'boot' lookup failed
[0007.310] I> ext4_open_file:666: '/boot/extlinux/extlinux.conf' lookup failed
[0007.311] E> file /nvme/boot/extlinux/extlinux.conf open failed!!
[0007.311] W> Failed to load extlinux.conf binary from rootfs (err=202113041)
[0007.314] E> Failed to find/load /boot/extlinux/extlinux.conf
[0007.320] I> Loading kernel ...
[0007.323] I> No kernel binary path
[0007.326] I> Continue to load from partition ...
[0007.330] W> No valid slot number is found in scratch register
[0007.336] W> Return default slot: _a
[0007.339] I> A/B: bin_type (37) slot 0
[0007.343] I> Loading kernel from partition
[0007.347] I> Loading partition kernel at 0xa4bc0000 from device(0x1)
[0007.836] I> Validate kernel ...
[0007.836] I> T19x: Authenticate kernel (bin_type: 37), max size 0x5000000
[0008.216] I> Encryption fuse is not ON
[0008.247] I> Checking boot.img header magic ... [0008.247] I> [OK]
[0008.247] I> Loading kernel-dtb ...
[0008.247] I> No kernel-dtb binary path
[0008.248] I> Continue to load from partition ...
[0008.248] W> No valid slot number is found in scratch register
[0008.248] W> Return default slot: _a
[0008.249] I> A/B: bin_type (38) slot 0
[0008.252] I> Loading kernel-dtb from partition
[0008.256] I> Loading partition kernel-dtb at 0x91000000 from device(0x1)
[0008.271] I> Validate kernel-dtb ...


By writing the cbo.dts, you can modify the boot target permanently.


→ " Choosing a Boot Device for Jetson AGX Xavier Series Platforms"

Thanks, I also found this:

that basically says the same thing, and it does the job.

It still seems counterintuitive that cboot should give up looking for extlinux.conf when it fails to find the it in the first place it tries to look without going through the rest of the devices in the boot-order list.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.