Jetson nano production module boot from SD card

Hello, we want jetson nano production module (b01) booting from external device.(microSD card, USB)

I’m trying to boot my Jetson Nano production module with the external device. if external device is not connected then boot from emmc of the production module.

we have done below modification of the /boot/extlinux/extlinux.conf file for boot from external device.

TIMEOUT 30

MENU TITLE L4T boot options
LABEL sdcard
MENU LABEL sdcard kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/XXXX(external device node) rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1

we made above modification and successfully boot from external device. when external device is unplug (disconnected) then not fallback to emmc. jetson nano not boot up.

we take the debug port access (u-boot access )and give input 0 or 1 then boot is working fine. but we need to solve this issue without using the access of the debug port.

please help me solve this issue.

Does this issue have anything related to sdcard? I totally don’t see any sdcard things in this post.

yes, external device as a SD card, USB etc.

follow the GitHub - JetsonHacksNano/bootFromUSB: Boot NVIDIA Nano Jetson Developer Kit from a mass storage USB device (Jetson Nano devices A02, B01, 2GB and possibly Jetson TX1) this link steps and boot from sd card.

Jetson nano successfully boot from SD card.

What is the error when your boot failure happened? I mean what is the error from serial console?

pls find the attached logs of serial console.
sdcard_boot.txt (21.7 KB)
emmc_boot.txt (23.3 KB)

  1. Try to remove “quiet” in your extlinux.conf first. Otherwise kernel log are in silent mode.

  2. Resize your terminal before sharing the log… the format is out of order and hard to read.

Kindly find the attached logs with external device connected and remove external device.
External_device_connected.txt (94.1 KB)
Remove_external_device.txt (76.8 KB)

One question here. So what is your expectation?

Both of them booting into kernel. Your "External_device_connected.txt " seems mounting rootfs from usb drive.

Your "Remove_external_device.txt " is mounting rootfs from usb drive but kernel from emmc.

Just in case you didn’t realize. You are not really booting from usb drive (or whatever that external device it is).

All your booting is actually from emmc. The “boot from” means where to load the extlinux.conf. In both of your cases, your extlinux.conf is read from emmc.

if we have remove the external device then did not fall back to emmc.
pls help to us for the how to overcome this issue without modification in kernel and u-boot bootloader.

You are still not in the situation.

Read the post here.

You can change the boot target in uboot. But you need to read above post first…

actually i am booting from USB it’s going in a right way, when i remove the USB the actual booting supposed to be happens from eMMC but it’s not doing that .

our main concern is if external device is not connected that time it should fall back to emmc and boot from eMMC.

The problem here is you thought you are booting from usb but you actually not… it is just file system mount point is from usb….

Your system currently always boot from emmc and it is just file system mount point is different…

The actual thing you need to do is change the uboot boot target as the document mentioned. Below is the screenshot. Change the nvme to the usb0 as you want to boot from usb drive.

If you still don’t know what I am talking about, please tell. I will explain more…

solved this issue without changes in kernel and u-boot. fall back to emmc if external device is not connected.

Can you provide configuration of extlinux.conf file for fall back to emmc if external device is not connected.

There is no such thing… Uboot does the fallback by switching device… not the extlinux.conf…

In case you really cannot understand what I am talking about…

This is from your “External_device_connected.txt”… You can see uboot tries to boot “mmc0”. It is your emmc. Not external drive…

image

This is from your “Remove_external_device.txt”. It is also from the emmc.

image

Thus, no matter what situation it is, you are actually loading extlinux.conf and kernel from your emmc… When external drive is removed, uboot does not care about it because you didn’t change the boot target… The boot target is always from emmc.

What you need to focus on is try to make uboot load extlinux.conf from external drive first… And when uboot notices external drive is missing, it will load the extlinux.conf from emmc… That is what you want…

Sorry to further confuse you here. This procedure I want to be done automatically.
If my primary rootfs (mmcblk1p1, sd card) is not available then my jetson nano must be able to boot from emmc image (mmcblk0p1).

please show me the way here; I tried to set primary and secondary rootfs in extlinux.conf but couldn’t succeeded

Please read my latest comment first… If you cannot read others comment, then no one can help you…

yes sure. Let me get back to you on this
thanks for your patience