Xavier NX SDMMC1 and SD Card Booting

According to this, it looks like Xavier NX production modules don’t have SDMMC1, so I can’t boot from an SD card using CBoot. I can put the rootfs on an sd card but the full boot from an SD Card doesn’t seem to work. Is this the correct assumption? When I try to boot from an SD card I see the following:

[0004.158] I> ########## SD boot ##########
[0004.162] I> No sdcard
[0004.164] I> -0 params source =
[0004.167] E> Blockdev open: exit error
[0004.171] E> SD boot failed, err: 724238353

Which means it can’t read from the sdcard and find the extlinux.conf file on it.

I want to use Xavier NX production modules with off the shelf and custom carrier boards and I need the ability to boot from an SD card. Also does the Xavier NX support booting from NVME after the feature was added to Jetpack 4.6.1?

Yes, the cboot of Xavier does not support extra sdcard slot (on pin sdmmc3). If you need that function, you can try to modify the cboot code.

And NVMe boot is supported from jetpack4.6.1.

Will Xavier NX production modules ever have SDMMC1?

If I wanted to add support for SDMMC3 to CBoot, where would I look in the CBoot sources?

I think we need to align the terms here.

Please tell us what is your “SDMMC1” here? Are you talking about hardware pin “SDMMC1” or the sdcard device that is enumerated as sdmmc1 in bootloader? These two are totally different things.

I’m not sure what the difference is. If I have a Xavier NX production module, how do I get it to boot off of the SD card? I have a Quark ConnectTech carrier that has a microsd slot.

Ok, then you are talking about the second one. Forget about what I was asking.

Please download the source here.

Please change the version if you are not using 32.5.1.

I know where to get the source but I’m not sure where in the CBoot source to even start to make a change like this

Here is the dtsi for the Quark carrier board from connecttech. I may be reading this wrong but it looks like it is setting the sd card to sdmmc1. Can you help verify this?tegra194-xavier-nx-cti-base.dtsi (14.4 KB)

It has nothing wrong. You should just focus on reading and modifying the cboot code.

The emmc module we sold out only has one sd pin and that is sdmmc3. ConnectTech just gives sdmmc3 a nickname sdhci_sd1.

I can change their name to any arbitrary string like sdhci_sd1000. It does not mean we have sdmmc1000 on our board.

Ok. Is there anyone here who would be able to help with the patching of CBoot? Fairly large codebase and I am not entirely sure what I am looking for.

Have you ever checked your cboot log? Use those log to search will find what you are looking for easily.

I have done that and found where the “No sdcard” print happens (bootloader/partner/common/drivers/sdmmc/tegrabl_sd_card.c). This file references a TEGRABL_STORAGE_SDCARD variable but that variable is just set to an arbitrary id of 6 since it is used to index into some array. I haven’t found anywhere in the code that specifically sets the sd storage device to sdmmc1.

I have no problem reading this code, but you guys should also release some better documentation as this is an issue that many people are running into on this forum

I am sorry that there is no document for cboot code. The only thing can do is track the code.

Even if you seek a help from me, I am also doing the same thing as you, open the code, track the log you want and give you where to change. If you want me to search it for you, please expect some delays.

1 Like

Is there a way to increase the CBoot log level so I can see more of the prints?

please check bootloader/partner/common/lib/linuxboot/linux_load.c → tegrabl_load_kernel_and_dtb(

1 Like

Thanks, I think the function I need to look deeper at is tegrabl_sd_get_platform_params

Actually that 0 is what you need to modify.

#if defined(CONFIG_ENABLE_USB_SD_BOOT)
  		case BOOT_FROM_SD:
  		case BOOT_FROM_USB:
  			err = removable_boot_load_kernel_and_dtb(device_id,
  													 0,
  													&boot_img_load_addr,
  													 kernel_dtb,
  													 &ramdisk_load_addr,
  													 &kernel_size,
  													 &ramdisk_size);
  			if (err != TEGRABL_NO_ERROR) {
  				pr_error("%s boot failed, err: %u\n", device_id == BOOT_FROM_SD ? "SD" : "USB", err);
  				break;

Yeah looks like it. Would I just change that number to 3?

I’m not sure this is what I need to modify. It looks like tegrabl_sd_get_platform_params has a loop over the sdmmc_nodes and gets the available sdhci slots, but it breaks from that loop after the first available sd card slot it finds which is 0.