# Xavier NX SDMMC1 and SD Card Booting

**URL:** <https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515>\
**Category:** Jetson Xavier NX\
**Tags:** boot, board-design\
**Created:** [August 25, 2021, 6:30am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515 "2021-08-25T06:30:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 25, 2021, 6:30am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/1 "2021-08-25T06:30:57Z")

</div>

[According to this](https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_checklists.html#wwpID0E0KB0HA), 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:

```auto
[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?

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 25, 2021, 8:24am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/3 "2021-08-25T08:24:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 25, 2021, 8:29am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/4 "2021-08-25T08:29:15Z")

</div>

Will Xavier NX production modules ever have SDMMC1?

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 25, 2021, 8:33am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/5 "2021-08-25T08:33:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 25, 2021, 8:35am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/6 "2021-08-25T08:35:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 25, 2021, 8:38am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/7 "2021-08-25T08:38:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 25, 2021, 8:46am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/8 "2021-08-25T08:46:26Z")

</div>

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

Please download the source here.

> **[L4T R32.5.1 Release Page](https://developer.nvidia.com/embedded/linux-tegra-r3251)**

Please change the version if you are not using 32.5.1.

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 25, 2021, 4:31pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/9 "2021-08-25T16:31:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 2:30am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/10 "2021-08-26T02:30:42Z")

</div>

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](https://forums.developer.nvidia.com/uploads/short-url/wI6Xluw0WX8qrAOjnH1tu2gsmUm.dtsi) (14.4 KB)

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 26, 2021, 2:34am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/11 "2021-08-26T02:34:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 2:36am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/12 "2021-08-26T02:36:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 26, 2021, 2:37am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/13 "2021-08-26T02:37:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 2:39am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/14 "2021-08-26T02:39:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 26, 2021, 2:45am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/15 "2021-08-26T02:45:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 2:51am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/16 "2021-08-26T02:51:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 26, 2021, 2:52am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/17 "2021-08-26T02:52:08Z")

</div>

please check bootloader/partner/common/lib/linuxboot/linux\_load.c → tegrabl\_load\_kernel\_and\_dtb(

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 2:57am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/18 "2021-08-26T02:57:24Z")

</div>

Thanks, I think the function I need to look deeper at is tegrabl\_sd\_get\_platform\_params

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [August 26, 2021, 3:04am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/19 "2021-08-26T03:04:49Z")

</div>

Actually that 0 is what you need to modify.

```auto
#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;

```

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 3:14am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/20 "2021-08-26T03:14:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rdesai1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rdesai1](https://forums.developer.nvidia.com/u/rdesai1)\
**Post date:** [August 26, 2021, 4:58am UTC](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515/21 "2021-08-26T04:58:16Z")

</div>

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.

[Next page](https://forums.developer.nvidia.com/t/xavier-nx-sdmmc1-and-sd-card-booting/187515.md?page=2)
