I am currently working with Jetson Xavier NX based custom device. I have to boot this device using the external storage device. I am following the steps mentioned in below attached url:
In this example, it will flash the signed images to the Jetson Xavier NX device. But My requirement is to flash the unsigned images to the Jetson Xavier NX device.
I have doubt, if I follow all the steps mentioned in above url, is it damage the NX SoM device? are those scripts fusing the NX SoM registers?
Thank you for the quick response. For executing the flashing script, it will require kernel_flash directory in “Linux_for_Tegra/tools/kernel_flash” path. Whichever source code we are using do not have this directory under “Linux_for_Tegra/tools” path.
To getting the kernel_flash directory, I executed “get_jetson_files.sh” script and checked all the content of source code.
I am attaching here the kernel_flash directory. It will generating the signed images first and then it will flash the images.
So can you please check once, Is those scripts fusing the registers? I verified in logs, it will fusing the soft registers.
Also it is using another one script, tegraflash.sh. I am attaching that script also here. nvautoflash.sh (15.0 KB) tegraflash.py (48.8 KB)
Thank you for your helping me. I am able to boot the NX devkit using the external device (M.2 Key-M SSD). I have to perform the same task with my custom board.
In our architecture, C5 connector is connected with the PCIe switch and M.2 Key-M connector is connected with the PCIe switch endpoint. From NX devkit, C5 connector is directly connected with the M.2 Key-M connector. So it is the difference.
Whenever I am trying to boot the device from the SSD then it will give the error in nvme_init function. Error logs are attached here.
I have one doubt, whenever cbootloader tries to boot from the external device (SSD), at that time SSD gets detected or not. In custom device, M.2 Key-M connector connected with PCIe switch and PCIe switch will take 100 ms of time to boot. So it must require to complete PCIe switch bootup to detect M.2 Key-M SSD.
For that, I updated the CBOOT bootloader code and added delay before the tegrabl_pcie_get_dev API. Still after that I am not able to boot the custom device with it.
Perform flashing and booting from external device (SSD) with the NX devkit. I flashed the image in SSD successfully as well as booting the NX SoM from SSD successfully. I do not have to execute any other command to boot from the SSD. Below image covers the NX architecture for the M.2 Key-M connector.
I removed the SSD from the NX devkit and connected with my custom device. But in custom device, I am not able to boot the NX SoM from the SSD. It is giving the error like below.
There is one difference in NX devkit architecture and my custom device architecture. Below image covers the custom device architecture for the M.2 Key-M connector.
In custom device architecture, PCIe switch booting process complete within 100 ms of time. So M.2 Key-M SSD will detect within 2-3 second of time. For that I added 10 second delay at the time of NVME_INIT api and added 5 retries to detect the NVMe SSD successfully with the custom device.
So can you please suggest how can I move ahead to resolve this issue. If It needs to update the cboot bootloader, so what kind of changes require. I have SSD ready with the flashed image.
I have doubt on NVME_CLASS_CODE variable. Please let me know if I have to update NVME_CLASS_CODE variable with the port number where NVME SSD gets detected.
Thank you for the quick response. I performed 3 experiments to answering your questions, and all the logs are attached here.
1. Is the nvme drive able to detect after entering kernel?
→ When I am booting my custom device with the SD card, it will detect the NVME drive. I am attaching my custom device logs where nvme ssd is getting detected.