Booting "Jetson AGX Orin development kit" using microSD card

I have connected “Jetson AGX Orin development kit” to Ubuntu 20.04LTS host PC using USB Type-C port. Following is the dmesg log in the hostPC.

I have connected “Jetson AGX Orin development kit” to Ubuntu 20.04LTS host PC using USB Type-C port. Following is the dmesg log in the hostPC.

[781798.274936] usb 1-10.1: new high-speed USB device number 7 using xhci_hcd
[781798.375656] usb 1-10.1: New USB device found, idVendor=0955, idProduct=7020, bcdDevice= 0.02
[781798.375667] usb 1-10.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[781798.375673] usb 1-10.1: Product: Linux for Tegra
[781798.375677] usb 1-10.1: Manufacturer: NVIDIA
[781798.375681] usb 1-10.1: SerialNumber: 1422122100887
[781798.380846] usb-storage 1-10.1:1.4: USB Mass Storage device detected
[781798.381147] scsi host10: usb-storage 1-10.1:1.4
[781798.736702] cdc_acm 1-10.1:1.2: ttyACM0: USB ACM device
[781798.736743] usbcore: registered new interface driver cdc_acm
[781798.736745] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[781798.758277] usbcore: registered new interface driver cdc_ether
[781798.807887] cdc_ncm 1-10.1:1.5: MAC-Address: 06:6a:b7:f6:1c:a6
[781798.808404] cdc_ncm 1-10.1:1.5 usb0: register 'cdc_ncm' at usb-0000:00:14.0-10.1, CDC NCM, 06:6a:b7:f6:1c:a6
[781798.808564] usbcore: registered new interface driver cdc_ncm
[781798.834857] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[781798.835065] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[781798.949933] usbcore: registered new interface driver cdc_wdm
[781798.950075] rndis_host 1-10.1:1.0 usb1: register 'rndis_host' at usb-0000:00:14.0-10.1, RNDIS device, 2a:ee:7c:95:97:e8
[781798.950185] usbcore: registered new interface driver rndis_host
[781798.997882] usbcore: registered new interface driver cdc_mbim
[781799.036973] usbcore: registered new interface driver rndis_wlan
[781799.117135] cdc_ncm 1-10.1:1.5 enx066ab7f61ca6: renamed from usb0
[781799.387452] scsi 10:0:0:0: Direct-Access     Linux    File-Stor Gadget 0510 PQ: 0 ANSI: 2
[781799.387812] sd 10:0:0:0: Attached scsi generic sg4 type 0
[781799.388094] sd 10:0:0:0: Power-on or device reset occurred
[781799.388335] sd 10:0:0:0: [sdd] 32768 512-byte logical blocks: (16.8 MB/16.0 MiB)
[781799.388460] sd 10:0:0:0: [sdd] Write Protect is on
[781799.388463] sd 10:0:0:0: [sdd] Mode Sense: 0f 00 80 00
[781799.388582] sd 10:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[781799.389817]  sdd:
[781799.390487] sd 10:0:0:0: [sdd] Attached SCSI removable disk
[781799.683989] IPv6: ADDRCONF(NETDEV_CHANGE): enx066ab7f61ca6: link becomes ready

I have logged into the development kit using screen as explained in “https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit”. After logging into the board, I could see the following Kernel commandline using dmesg.

Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 console=tty0 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb nv-auto-config

From this Kernel command line, I think it is booting from eMMC. I want to boot the device using microSD card. Can you please tell me any settings I need to change on the board to boot from microSD card.

Hi,

You need flashing commands like:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1 \
  -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-agx-orin-devkit internal

eMMC is being detected as mmcblk0, hence mmcblk1 for the additional SD card.

I have connected 2GB microSD card to J10 microSD card slot on the Jetson AGX Orin development kit and ran the below command for flashing.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-agx-orin-devkit internal

Observed few errors and warnings as mentioned below.

  1. The following error observed related to mb1-bct. How I can avoid this?

[ 0.4969 ] Generating coldboot mb1-bct
[ 0.4994 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_cold_boot_bct.cfg --misc tegra234-mb1-bct-misc-p3701-0000_cpp.dtb --device tegra234-mb1-bct-device-p3701-0000_cpp.dtb
[ 0.5022 ] MB1-BCT version: 0.10
[ 0.5024 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5036 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5040 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5044 ] ERROR: /misc/tsc_controls/tsc_locking_config is not supported
[ 0.5059 ] ERROR: /misc/tsc_controls/tsc_locking_diff_configuration is not supported
[ 0.5063 ] ERROR: /misc/tsc_controls/tsc_locking_ref_frequency_configuration is not supported
[ 0.5068 ] ERROR: /misc/tsc_controls/tsc_locking_control is not supported
[ 0.5071 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_configuration is not supported
[ 0.5075 ] ERROR: /misc/tsc_controls/tsc_locking_fast_adjust_configuration is not supported
[ 0.5080 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_delta_control is not supported
[ 0.5084 ] ERROR: /misc/tsc_controls/tsc_capture_control_ptx is not supported
[ 0.5088 ] ERROR: /misc/tsc_controls/tsc_capture_config_ptx is not supported
[ 0.5092 ] ERROR: /misc/tsc_controls/tsc_stscrsr is not supported
[ 0.5095 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_num_control is not supported

[ 0.5466 ] Generating recovery mb1-bct
[ 0.5492 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_bct.cfg --misc tegra234-mb1-bct-misc-p3701-0000_cpp.dtb --device tegra234-mb1-bct-device-p3701-0000_cpp.dtb
[ 0.5519 ] MB1-BCT version: 0.10
[ 0.5523 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5539 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5550 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED1/ is not supported
[ 0.5560 ] ERROR: /misc/tsc_controls/tsc_locking_config is not supported
[ 0.5567 ] ERROR: /misc/tsc_controls/tsc_locking_diff_configuration is not supported
[ 0.5574 ] ERROR: /misc/tsc_controls/tsc_locking_ref_frequency_configuration is not supported
[ 0.5579 ] ERROR: /misc/tsc_controls/tsc_locking_control is not supported
[ 0.5583 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_configuration is not supported
[ 0.5588 ] ERROR: /misc/tsc_controls/tsc_locking_fast_adjust_configuration is not supported
[ 0.5593 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_delta_control is not supported
[ 0.5599 ] ERROR: /misc/tsc_controls/tsc_capture_control_ptx is not supported
[ 0.5599 ] ERROR: /misc/tsc_controls/tsc_capture_config_ptx is not supported
[ 0.5599 ] ERROR: /misc/tsc_controls/tsc_stscrsr is not supported
[ 0.5599 ] ERROR: /misc/tsc_controls/tsc_locking_adjust_num_control is not supported

  1. Observed the following message related to Kernel Image. When I built kernel using the link, in step 7 it was mentioned as copy Image to "Linux_for_Tegra/kernel/Image ". So the following message can be ignored?

gzip: /home/user/Orin/Linux_for_Tegra/kernel/Image: not in gzip format
_BASE_KERNEL_VERSION=5.10.120-tegra

  1. I have built minimal rootfs by refering the link , so can I ignore the following warnings?

cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko
cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko
cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko
cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko
cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko
cp: cannot stat ‘/home/user/Orin/Linux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko’: No such file or directory
warning: cp -f /home/user/Orin/Linux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko /home/user/Orin/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko

  1. Finally the script failed with the following exceptions and exited with error. Can you guide how I can overcome the below errors?

saving flash command in /home/user/Orin/Linux_for_Tegra/bootloader/flashcmd.txt
saving Windows flash command to /home/user/Orin/Linux_for_Tegra/bootloader/flash_win.bat
*** Sign and generate flashing ready partition images… ***
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[ 0.0227 ] tegrasign_v3.py --key None --getmode mode.txt
[ 0.0228 ] Assuming zero filled SBK key
[ 0.0212 ] Parsing partition layout
[ 0.0230 ] tegraparser_v2 --pt flash.xml.tmp
Traceback (most recent call last):
File “/home/user/Orin/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 1401, in tegraflash_update_bpmp_dtb
if bpmp_dtb == None and bpmp_dtb_in_layout == None:
UnboundLocalError: local variable ‘bpmp_dtb’ referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “./tegraflash.py”, line 1383, in
tegraflash_run_commands()
File “./tegraflash.py”, line 1217, in tegraflash_run_commands
interpreter.onecmd(command)
File “/usr/lib/python3.8/cmd.py”, line 217, in onecmd
return func(arg)
File “./tegraflash.py”, line 730, in do_sign
self.chip_inst.tegraflash_sign(exports)
File “/home/user/Orin/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 2594, in tegraflash_sign
self.tegraflash_parse_partitionlayout()
File “/home/user/Orin/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 467, in tegraflash_parse_partitionlayout
self.tegraflash_update_bpmp_dtb()
File “/home/user/Orin/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 1468, in tegraflash_update_bpmp_dtb
raise tegraflash_exception('Unexpected error in updating: ’ + bpmp_dtb + ’ ’ + str(e))
UnboundLocalError: local variable ‘bpmp_dtb’ referenced before assignment
Error: /home/user/Orin/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/user/Orin/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up…

Note: Complete flash log(
Flash_log_failed.zip (5.6 KB)
) attached.

  1. Please just ignore them.
  2. YES. Please ignore them.
  3. I don’t feel like building with minimal rootfs would cause this issue.
    Have you done sudo ./apply_binaries.sh before flashing?
  4. Maybe delete the whole BSP folder and try again.

Finally, are you sure it’s a 2GB SD card?
That’s definitely not enough, and you need at least 64GB for flashing.

Following is the output of apply_binaries.sh.

user:~/Orin/Linux_for_Tegra$ sudo ./apply_binaries.sh
Using rootfs directory of: /home/user/Orin/Linux_for_Tegra/rootfs
Installing extlinux.conf into /boot/extlinux in target rootfs
/home/user/Orin/Linux_for_Tegra/nv_tegra/nv-apply-debs.sh
Root file system directory is /home/user/Orin/Linux_for_Tegra/rootfs
Copying public debian packages to rootfs
Skipping installation of nvidia-l4t-dgpu-apt-source_35.4.1-20230801124926_arm64.deb …
Skipping installation of nvidia-l4t-dgpu-config_35.4.1-20230801124926_arm64.deb …
Skipping installation of nvidia-l4t-factory-service_35.4.1-20230801124926_arm64.deb …
Start L4T BSP package installation
QEMU binary is not available, looking for QEMU from host system
Found /usr/bin/qemu-aarch64-static
Installing QEMU binary in rootfs
mknod: /home/user/Orin/Linux_for_Tegra/rootfs/dev/random: File exists
user:~/Orin/Linux_for_Tegra

Following are the folders in “Linux_for_Tegra”. Deleting “BSP folder” means which one I need to delete?

.
├── bootloader
├── generate_capsule
├── kernel
├── nv_tegra
├── nv_tools
├── rootfs
├── source
└── tools

I didn’t see any error or warning related to microSD card size.

What do you have inside Linux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/?
I mean deleting the whole Linux_for_Tegra folder.

You will definitely see flashing error after all the above issues are solved.
Again, find a 64GB or larger SD card.

Following are the files and folders inside at high levelLinux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/

.
├── build → /usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10
├── extra
│ └── opensrc-disp
├── kernel
│ ├── arch
│ ├── crypto
│ ├── drivers
│ ├── fs
│ ├── lib
│ ├── net
│ └── sound
├── modules.alias
├── modules.alias.bin
├── modules.builtin
├── modules.builtin.alias.bin
├── modules.builtin.bin
├── modules.builtin.modinfo
├── modules.dep
├── modules.dep.bin
├── modules.devname
├── modules.order
├── modules.softdep
├── modules.symbols
└── modules.symbols.bin

I don’t know why you are missing these drivers.
They should have been there.

I faced the above error at the beginning. After running apply_binaries.sh, didn’t see the above error. I am facing the exceptions from tegraflash_impl_t234.py python script, following is the error screenshot. Complete flash log(
Flash_log.zip (5.3 KB)
) attached.

I am creating new Linux_for_Tegra in different path and trying now.

The last time we saw such exception is because someone remove a file in Linux_for_Tegra.

Could you let sdkmanager install the Linux_for_Tegra for you instead of creating it by yourself?

1 Like

I have tried the following Steps with new BSP folder.

  1. Untared the Jetson_Linux_R35.4.1_aarch64.tbz2 . It created Linux_for_Tegra folder with files and folders inside.
  2. Untared public_sources.tbz2. It created sources inside Linux_for_Tegra folder. Untared kernel_src.tbz2 inside Linux_for_Tegra/source/public. Then followed steps 2 to 4 from the link.
  3. For rootfs build, executed the command mentioned at the link from Linux_for_Tegra/tools/samplefs path.
  4. Copied Linux_for_Tegra/tools/samplefs/sample_fs.tbz2 to Linux_for_Tegra/rootfs/ and extracted using sudo.
  5. Executed step 6 and step 7 mentioned at the link. Not able to do step 5 mentioned in this link as there is no folder modules under Linux_for_Tegra/rootfs/usr/lib/. So skiping step 5 is fine?
  6. Try to create user using the below command mentioned at the link, but got error. This user creation is mandatory?

user:~/Jetson/Linux_for_Tegra$ sudo ./tools/l4t_create_default_user.sh -u nvidia -a
[sudo] password for user:
ERROR: Cannot find the Tegra software license agreement
user:~/Jetson/Linux_for_Tegra$

  1. Ran apply_binaries.sh from Linux_for_Tegra.
  2. Placed the development kit in recovery mode and ran the following flash command.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1
-c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml”
–showlogs --network usb0 jetson-agx-orin-devkit internal

This time flash almost completed and failed as the microSD card size is not enough. I am yet to receive 64GB microSD card, so will try soon with 64GB card.
Complate flash log(
Flash_log_latest.zip (34.7 KB)
) attached.

Can you help on the questions I have asked in Step 5 and Step 6 in the above mentioned steps.
Can you help to understand the layout(partitions for boot, kernel and rootfs) used for flashing.

Note: Down the line I need to customize the devicetree, kernel and rootfs for the custom board, so I have flashed using Linux_for_Tegra\tools/kernel_flash/l4t_initrd_flash.sh instead of sdkmanager.

Run sudo ./apply_binaries.sh, your step 7, first.

That’s not mandatory but is suggested.
The error is there because you have not run sudo ./apply_binaries.sh.

I have tried to flash NVMe before getting 64GB microSD card. I have flashed using the following command.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-agx-orin-devkit internal

But it failed at the end with the following error.

writing item=1, 9:0:primary_gpt, 512, 19968, gpt_primary_9_0.bin, 16896, fixed--0, 2e98865fe8738689a4cd97b869b82f2ab77badd6
Error: Could not stat device /dev/nvme0n1 - No such file or directory.
Flash failure
Cleaning up…

complete flash log(
Flash_log_NVMe_failed.zip (28.3 KB)
) attached.

Looks like all previous error is gone. Current situation is your nvme is not able to get detected.

Need to dump serial log from device when flash failure happened.

Your log is just host side log, not jetson side so cannot help.

I have connected micro-USB to the board and open minicom on ttyACM0. Captured host log(
Host_side_log.zip (28.1 KB)
) and device log(
devkit_log.zip (24.4 KB)
).
We have purchased Jetson AGX Orin 32GB Dev-Kit Module, please let me know the command which I used to flash NVMe SSD is fine or any changes are required?

You should first correct the flashing command.

-p “-c bootloader/generic/cfg/flash_t234_qspi.xml”

for rel-36

-p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml”

for rel-35

bash-5.0# 
[   95.200174] NFS: state manager: check lease failed on NFSv4 server fc00:1:1:0::1 with error 13
[  100.318403] NFS: state manager: check lease failed on NFSv4 server fc00:1:1:0::1 with error 13

Please remove the Ethernet cable on the device in case it’s plugged in.
Or find another host PC for testing.

I have used -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" in the flash command.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-agx-orin-devkit internal

Still the command is failing with the same error. Following are the device nodes (starting with nv) available on the development kit.

bash-5.0# ls /dev/nv*
/dev/nvhost-ctrl /dev/nvhost-msenc /dev/nvhost-pva0
/dev/nvhost-ctrl-isp /dev/nvhost-nvcsi /dev/nvhost-tsec
/dev/nvhost-ctrl-nvdec /dev/nvhost-nvdec /dev/nvhost-vi0
/dev/nvhost-ctrl-nvdla0 /dev/nvhost-nvdla0 /dev/nvhost-vi0-thi
/dev/nvhost-ctrl-nvdla1 /dev/nvhost-nvdla1 /dev/nvhost-vi1
/dev/nvhost-ctrl-pva0 /dev/nvhost-nvjpg /dev/nvhost-vi1-thi
/dev/nvhost-isp /dev/nvhost-nvjpg1 /dev/nvhost-vic
/dev/nvhost-isp-thi /dev/nvhost-ofa /dev/nvsciipc
bash-5.0#

Hi,

I would suggest you can dump full log… if you don’t know what to check, then you better dump full info and let us check…

Host log(
Host_log_t186ref.zip (34.4 KB)
) and device log(
devkit_log_t186ref.zip (42.2 KB)
).

Connection timeout: device /dev/nvme0n1 is still not ready.

Grab another NVMe drive for testing.
Or just use an SD card as you originally planed.