SD card detected but unable to boot from SD card

Hi Devs,

we are currently trying to boot the Xavier NX 16 GB emmc module with 32 GB SD card on a custom carrier board, we can see the sd card detection when the board is booted with emmc,

Flash command used for emmc:
sudo ./flash.sh jetson-xavier-nx-devkit-emmc internal

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 1 loop
mmcblk0 179:0 0 14.7G 0 disk
├─mmcblk0p1 179:1 0 14G 0 part /
├─mmcblk0p2 179:2 0 64M 0 part
├─mmcblk0p3 179:3 0 448K 0 part
├─mmcblk0p4 179:4 0 32.6M 0 part
├─mmcblk0p5 179:5 0 2.5M 0 part
├─mmcblk0p6 179:6 0 64K 0 part
├─mmcblk0p7 179:7 0 1M 0 part
├─mmcblk0p8 179:8 0 1M 0 part
├─mmcblk0p9 179:9 0 1M 0 part
├─mmcblk0p10 179:10 0 1.5M 0 part
├─mmcblk0p11 179:11 0 1M 0 part
├─mmcblk0p12 179:12 0 64M 0 part
├─mmcblk0p13 179:13 0 448K 0 part
├─mmcblk0p14 179:14 0 32.5M 0 part
├─mmcblk0p15 179:15 0 80M 0 part
├─mmcblk0p16 179:16 0 512K 0 part
├─mmcblk0p17 179:17 0 100M 0 part
├─mmcblk0p18 179:18 0 64M 0 part
├─mmcblk0p19 179:19 0 80M 0 part
├─mmcblk0p20 179:20 0 512K 0 part
├─mmcblk0p21 179:21 0 64M 0 part
└─mmcblk0p22 179:22 0 101M 0 part
mmcblk1 179:32 0 29.7G 0 disk
├─mmcblk1p1 179:33 0 3.9G 0 part /media/stcm/278d103a-d82f-4b49-8059-c9f86f705e1f
├─mmcblk1p2 179:34 0 64M 0 part
├─mmcblk1p3 179:35 0 448K 0 part
├─mmcblk1p4 179:36 0 32.6M 0 part
├─mmcblk1p5 179:37 0 2.5M 0 part
├─mmcblk1p6 179:38 0 64K 0 part
├─mmcblk1p7 179:39 0 1M 0 part
├─mmcblk1p8 179:40 0 1M 0 part
├─mmcblk1p9 179:41 0 1M 0 part
├─mmcblk1p10 179:42 0 1.5M 0 part
├─mmcblk1p11 179:43 0 1M 0 part
├─mmcblk1p12 179:44 0 64M 0 part
├─mmcblk1p13 179:45 0 448K 0 part
├─mmcblk1p14 179:46 0 32.5M 0 part
├─mmcblk1p15 179:47 0 80M 0 part
├─mmcblk1p16 179:48 0 512K 0 part
├─mmcblk1p17 179:49 0 100M 0 part
├─mmcblk1p18 179:50 0 64M 0 part
├─mmcblk1p19 179:51 0 80M 0 part
├─mmcblk1p20 179:52 0 512K 0 part
├─mmcblk1p21 179:53 0 64M 0 part
└─mmcblk1p22 179:54 0 128M 0 part

However, when we try to flash the sd card and boot it, the flashing fails,

[ 7.5742 ] Start flashing
[ 7.5779 ] tegradevflash_v2 --pt flash.xml.bin --create
[ 7.5796 ] Bootloader version 01.00.0000
[ 7.6061 ] Erasing spi: 0 … [Done]
[ 10.6103 ] Writing partition secondary_gpt with gpt_secondary_3_0.bin [ 16896 bytes ]
[ 10.6110 ] […] 100%

[ 10.7432 ] Erasing sdcard: 0 … 0000000074740311: E> NV3P_SERVER: Failed to open instance 0 of device 6.
[ 10.7463 ]
[ 10.7464 ] [Failed]
[ 10.7464 ]
Error: Return value 17
Command tegradevflash_v2 --pt flash.xml.bin --create
Failed flashing t186ref.

last few console logs,

[0118.850] I> CPU: Nvidia Carmel
[0118.850] I> CPU: MIDR: 0x4e0f0040, MPIDR: 0x80000000
[0118.850] I> Platform: Silicon
[011.851] I> chip revision : A02P
[0118.851] I> Boot_device: QSPI_FLASH instance: 0
[0118.851] I> qspi flash-0 params source = boot args
[0118.852] I> QSPI source rate = 204000 Khz
[0118.853] I> Requested rate for QSPI clock = 12000 Khz
[0118.857] I> BPMP-set rate for QSPI clk = 12000 Khz
[0118.866] I> QSPI-0l initialized successfully
[0118.867] I> sdcard-0 params source = DT-BL
[0118.870] I> No sdcard
[0118.884] I> Found 41 partitions in QSPI_FLASH (instance 0)
[0118.885] I> Recovery boot_type: 0
[0118.885] I> Entering 3p server
[0118.885] I> USB configuration success
[0119.173] I> Populate storage info
[0119.220] I> Erasing device 3: 0
[0119.221] I> QSPI: Erasing entire device
[0122.224] I> Writing device 3: 0.
[0122.355] I> Found 41 partitions in QSPI_FLASH (instance 0)
[0122.357] I> Erasing device 6: 0
[0122.357] E> Blockdev open: exit error
[0122.358] E> NV3P_SERVER: Failed to open instance 0 of device 6.

Flash commmand used for sd card,

sudo ./flash.sh jetson-xavier-nx-devkit mmcblk1p1

Please let me know how to acheive this, any assistance would be greatly appreciated.

Jetpack version: 5.1.4

if anymore inputs required feel free to ask.

Thanks,
Jai

Hi jaivishnu.m,

What’s the Jetpack version in use?
It seems the SD slot is from your carrier board.
Have you confirmed that you’ve enabled the related nodes in device tree even if you can recognize it in lsblk?

It is the command expected to be used for Xavier NX eMMC module.

It is not the expected command since you are still using “Xavier NX eMMC module” rather than “Xavier NX SD module”.

To flash to SD card, you can refer to the instruction in Flashing to an SD Card.

Please also refer to About Flashing Jetson OS to Jetson Xavier NX emmc module - #7 by WayneWWW and it seems you can only mount SD card rather than boot from it.

1 Like

You won’t be possible to really boot or flash a external added Sdcard slot on a eMMC module.

Your flash method is not correct since the beginning. It cannot be jetson-xavier-nx-devkit. You can only use the eMMC one.

1 Like

Hi KevinFFF,

Thanks for the reply.

we are using Jetpack version 5.1.4. Yes, indeed the SD slot is from the carrier board. I have created a node sdhci_sd1: sdhci@3440000 by using refernce, no other changes were made.

Also i have created the image using command

sudo ROOTFS_DIR=./rootfs/ ./tools/jetson-disk-image-creator.sh -o jetpack514.img -b jetson-xavier-nx-devkit -r 01 -d SD

later burned it to sd card using dd command
sudo dd if=jetpack514.img of=/dev/sda bs=1M oflag=direct status=progress

Finally flashed the device with

sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk1p1

But still not able to boot the board. with logs from console.

[ 8.120273] Run /init as init process
[ 8.124971] extcon-disp-state external-connection:disp-state: cable 44 state 0 already set.
[ 8.124975] Extcon DP: HPD disabled
[ 8.124979] hpd: switching from state 0 (Reset) to state 1 (Check Plug)
[ 8.124988] hpd: state 1 (Check Plug), hpd 0, pending_hpd_evt 0
[ 8.127542] tegra_cec 3960000.tegra_cec: Can’t find physical address.
[ 8.127547] tefra_cec 3960000.tegra_cec: tegra_cec_init Done.
[ 8.137124] hpd: switching from state 1 (Check Plug) to state 3 (Disabled)
[ 8.226966] Root device found: mmcblk1p1
[ 8.231553] tegra-i2c 3190000.i2c: I2C transfer timed out
��pll_d2 has no dyn ramp
��[ 8.252927] Found dev node: /dev/mmcblk1p1
[ 8.343567] tegra-i2c 3190000.i2c: I2C transfer timed out
[ 8.424940] EXT4-fs (mmcblk1p1): ext4_check_descriptors: Checksum for group 0 fail%d (7669!=1943)
[ 8.425145] EXT4-fs (mmcblk1p1): group descriptors corrupted!
[ 8.426583] ERROR: mmcblk1p1 mount fail…
[ 8.432372] Press [ENTER] to start bash…
[ 8.459548] tegra-i2c 3190000.i2c: I2C transfer timed out
[ 8.535528] usb 1-2.7: new high-speed USB device number 3 using tegra-xusb
[ 8.571531] tegra-i2c 3190000.i2c: I2C transfer timed out
[ 8.636664] usb 1-2.7: New USB device found, idVendor=0424, idProduct=2840, bcdDevice= 2.04
[ 8.636857] usb 1-2.7: New USB device stpings: Mfr=1, Product=2, SerialNumber=0
[ 8.637005] usb 1-2.7: Product: Hub Feature Controller
[ 8.637124] usb 1-2.7: Manufacturer: Microchip

Am i missing something?

Thanks,
Jai

Share the full log you have there… I guess you totally didn’t enable sdmmc3 controller or the configuration is wrong?

Hi WayneWWW,

Please find the logs
sdmmc logs.txt (52.7 KB)

Thanks,
Jai

HI WayneWWW,

Thanks for the reply.

I want to clarify few things from what you are saying.

  1. Is it possible to boot from sd card for a jetson xavier nx emmc module with custom carrier board having connections on the Baseboard SDMMC pins of the xavier nx module for sd card?

  2. if yes, you are implying that we have to use jetson-xavier-nx-devkit-emmc for the flash.sh command

Please let me know if there are any deviations on my understanding.

Thanks,
Jai

What I saw previously is you even try to use the sdcard module board config to flash, that is not correct and should not be happened. Our bootrom does not recognize the sdcard you added.

We didn’t validate whether UEFI could boot from a extra sdcard slot added on custom board. So we don’t guarantee the total boot flow would work not. I can only guarantee you that you could mount filesystem from it.

And for your latest log, I see mmcblk1p1 is up but it seems the rootfs you prepared there are corrupted.

[ 8.334610] EXT4-fs (mmcblk1p1): ext4_check_descriptors: Checksum for group 0 failed (7669!=1943)
[ 8.334818] EXT4-fs (mmcblk1p1): group descriptors corrupted!
[ 8.336373] ERROR: mmcblk1p1 mount fail…

How about you just boot up to eMMC first and see if you could manually mount this filesystem first?

1 Like

Hi WayneWWW,

Truly appreciate your help here.

Your concern was totally right. It is corrupted indeed. Now I have burned sd card with dd command once again and it properly booted.

Here are the steps i followed to boot Xavier NX 16 GB emmc module with SD card, (which might help somebody in future)

Module: Jetson Xavier NX eMMC (16GB)
Jetpack: 5.1.4
SD card: 32 GB SanDisk HC1

Steps:

  1. Created node sdhci_sd1: sdhci@3440000 in dtsi file hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi
@@ -335,6 +335,18 @@
                status = "okay";
        };

        sdhci_sd1: sdhci@3440000 { //added this node
                mmc-ocr-mask = <0x0>;
                cd-inverted;
                cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
                nvidia,cd-wakeup-capable;
                mmc-ocr-mask = <0>;
                cd-inverted;
                vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
                status = "okay";
        };
  1. created sdcard blob image with command.
sudo ROOTFS_DIR=./rootfs/ ./tools/jetson-disk-image-creator.sh -o jetpack514.img -b jetson-xavier-nx-devkit -r 01 -d SD
  1. Inserted SD card into linux PC and formatted the sd card.

  2. burned the jetpack514.img in the sd card using command.

 sudo dd if=jetpack514.img of=/dev/sda bs=1M oflag=direct status=progress
  1. Inserted the sd card into the sd card slot of carrier board.

  2. Put the device in recovery mode.

  3. Flashed the Xavier NX module with micro-b port using command

sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk1p1

Regards,
Jai

1 Like

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