TX1 scans SD card on boot

I have a Jetson TX1 running L4T 24.1. When starting with an SD card insert it takes forever (ok like 3 minutes) to boot. Without an SD card it is much faster. Looking at the serial port output I see a long pause at:

Scanning mmc 1:1…

So it appears to be looking for something to boot off of on the SD card. My /boot/extlinux/extlinux.conf is:

TIMEOUT 30
DEFAULT primary

MENU TITLE p2371-2180 eMMC boot options

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec={lp0_vec} nvdumper_reserved={nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 root=/dev/mmcblk0p1 rw rootwait

which I think is right (but am not sure). Is there somewhere else to check to see why it scans the SD card on boot? I don’t want to boot from the SD card, just use it for storage.

If you have a serial console you can interrupt early on within U-Boot and get an interactive U-Boot console. There is a short pause (perhaps just 1 second or 2 seconds) in which you can hit any key and it will pause boot. The location of pause looks like this:

tegra-pcie: link 1 down, ignoring
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
<b>Hit any key to stop autoboot:  0</b>

If you wanted to continue booting you’d just type in “boot” and hit the enter key.

Instead, you can type “help” and get a list of U-Boot command line functions. In particular you would be interested in environment handling commands. Some variables are executed as a macro and may control the order of device search prior to reaching extlinux.conf (once extlinux.conf is found and loaded execution will be transferred to the Linux kernel…prior to that it’s U-Boot environment determining device search). Type “help env”.

Notice that although “env print” can print just one environment variable you can run “env print” without any argument and see all environment variables. Pay particular attention to the variables starting with “boot”. When you type “help boot” you’ll see it runs “bootcmd”, which in turn is listed in “env print bootcmd”. This in turn runs “distro_bootcmd”. There are a chain of variables getting filled in as macros, eventually the SD card (and other devices) are tested in a loop for existence…those devices are listed in variable “boot_targets”. The default on my JTX2 (which is probably an exact match for the JTX1) is:

boot_targets=mmc1 mmc0 usb0 pxe dhcp

You could modify boot_targets for a single boot by having it ignore the SD card (mmc1) and search for eMMC (mmc0) only. You wouldn’t normally do PXE booting, so you could also eliminate pxe and dhcp if not doing diskless booting. You could end up with something like this which would check for eMMC having :

boot_targets=mmc0 usb0

Notice that in the original boot_targets that SD card (mmc1) is searched before searching eMMC (mmc0) for extlinux.conf. If you were to reverse the order SD card would never be searched unless eMMC fails to have extlinux.conf, yet SD card would still be searched provided eMMC fails (and if SD is also missing then USB SATA, and if that too is missing, a PXE remote boot server):

boot_targets=mmc0 mmc1 usb0 pxe dhcp

To test your edit simply type “boot” and enter. The edit is in RAM only and will go away at the next reboot. If your edit proves to be something you want to keep, then you can run “env save” to make the change permanent (well, semi-permanent because flash will overwrite this back to defaults and you can also re-edit with serial console again).

Switching the order in the boot_targets variable worked perfectly. Thanks!