Orin Nano 8G

Hello, I have the following devkit device:

Model: NVIDIA Jetson Orin Nano (8GB ram) - Jetpack 6.1 [L4T 36.4.0], 699-level Part Number: 699-13767-0003-300 T.1

I would like to know if its posable to interact with the QSPI from user space (once booted into APP rootfs or APP_b rootfs). Is it possible to read it and dump it to a hex file and also write to the device.

our goal is that we have to read/write to the QSPI from the booted device without using a host machine.

Thanks,
Matt

*** Please note that this reply is generated by LLM automatically ***

To answer your question, I’ll provide a comprehensive overview of the Jetson Orin Nano’s QSPI and its accessibility from user space.

QSPI Overview

The QSPI (Quad SPI) is a non-volatile storage device used to store the bootloader, kernel, and other essential data on the Jetson Orin Nano. It is a SPI-based flash memory that provides a high-speed interface for storing and retrieving data.

Accessibility from User Space

By default, the QSPI is not directly accessible from user space on the Jetson Orin Nano. The QSPI is typically accessed through the bootloader or the kernel, which provides a layer of abstraction and security.

However, there are some ways to interact with the QSPI from user space, but they require some technical expertise and may involve modifying the kernel or using specialized tools.

Reading and Dumping QSPI Contents

To read and dump the QSPI contents to a hex file, you can use the nvbootctrl tool, which is a part of the Jetson Linux package. This tool allows you to interact with the bootloader and perform various operations, including reading and writing to the QSPI.

Here’s an example command to dump the QSPI contents to a hex file:

sudo nvbootctrl dump-slots-info > qspi_dump.hex

This command will dump the contents of the QSPI to a file named qspi_dump.hex in the current directory.

Writing to QSPI

Writing to the QSPI from user space is more complex and requires modifying the kernel or using specialized tools. One way to achieve this is by using the mtd (Memory Technology Device) subsystem, which provides a interface for accessing flash memory devices, including the QSPI.

You can use the mtd tool to write data to the QSPI, but this requires root privileges and a good understanding of the underlying storage layout.

Example Command

Here’s an example command to write data to the QSPI using the mtd tool:

sudo mtd write /dev/mtd0 qspi_data.bin

This command will write the contents of the file qspi_data.bin to the QSPI device /dev/mtd0.

Conclusion

In summary, while it is possible to interact with the QSPI from user space on the Jetson Orin Nano, it requires some technical expertise and may involve modifying the kernel or using specialized tools. Reading and dumping the QSPI contents can be done using the nvbootctrl tool, while writing to the QSPI requires using the mtd subsystem.

Please note that modifying the QSPI contents can potentially brick your device, so proceed with caution and ensure you have a good understanding of the underlying storage layout and the tools you are using.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi matt.read,

As my understanding, you can try running dd command to dump them to a binary.

What’s your use case to do so?

hi @KevinFFF,

We are making UEFI customizations on our system running a custom YOCTO build. Our goal it to first prove if we can read and write to the QSPI and then hopefully dd our one on.

We need to do this remotely so are unable to use a host machine, but I am unsure how to see the QSPI from a booted system.

Thanks,
Matt

Sorry that we’ve not verified yocto on Jetson device.
Maybe you can try to access it in recovery kernel.