How to Clone eMMC Image of NVIDIA® Jetson™ Xavier™ NX Module?
WHAT YOU WILL LEARN?
1- How to check the Jetson device in Recovery Mode
2- How to get backup image from Jetson modules
3- How to burn image to Jetson modules
ENVIRONMENT
Hardware 1: DSBOX-NX2
Hardware 2: DSBOARD-NX2 with Xavier NX Module
OS: JetPack: 4.5 (L4T-32.5.0)
Putting Source Device into Recovery Mode
In this blog post, we will clone a Jetson module and restore another module with “flash.sh” script file.
First, we will put the source device into Recovery Mode and clone the file system of target module. Next, we will put the target device into Recovery Mode and burn the file system with the backup image.
After putting your source device in recovery mode, open a terminal and type this command:
watch lsusb
As you can see below, the source module has inserted in Recovery Mode successfully.
Now, you can clone the file system. Exit this script (Ctrl+C) and continue to the next step.
Jetson Xavier NX in Recovery Mode (0955:7e19)
Cloning The File System
You should change the current directory to the Jetson SDK folder and backup the module. JetPack version of our source module is 4.5. So that, our working directory is:
/home/user/nvidia/nvidia_sdk/JetPack_4.5_Linux_JETSON_XAVIER_NX/Linux_for_Tegra
Jetson SDK Folder
Change the current directory (If you use another version of JetPack, your “cd” command will change.) and create the backup image with these commands below:
cd /home/user/nvidia/nvidia_sdk/JetPack_4.5_Linux_JETSON_XAVIER_NX/Linux_for_Tegra
sudo ./flash.sh -r -k APP -G backup.img jetson-xavier-nx-devkit-emmc mmcblk0p1
After typing the clone command into the terminal, the processes look like this:
Beginning of the Cloning
This process took about 10 minutes in our system.
At the end of the clone command, the “backup.img.raw” file was saved and the “backup.img” file was created.
End of the Cloning Step
Putting Target Device into Recovery Mode
After putting your target device in recovery mode, open a terminal and type this command:
watch lsusb
As you can see below, the target module has inserted in Recovery Mode successfully. Now, you can restore the file system. Exit this script (Ctrl+C) and continue to the next step.
Jetson Xavier NX in Recovery Mode (0955:7e19)
Restoring The File System
Now, move the default system image to another path, move the RAW image as “system.img” to the “bootloader” folder and burn the backup image with these commands:
sudo mv bootloader/system.img* .
sudo mv backup.img.raw bootloader/system.img
sudo ./flash.sh -r jetson-xavier-nx-devkit-emmc mmcblk0p1
A few seconds later, the writing status looks like this:
A Moment During the Restore Process
This process took more than 12 minutes in our system.
End of Restoring Image
At the end of the image burning process, the target device will reboot.
Thank you for reading our blog post.