I had some difficulty cloning a Jetson, but was able to pull it off. I compiled some steps to help some of you so you don’t have to go through the trouble I did. Happy coding!
- Put the Jetson you wish to copy from into recovery mode: https://www.youtube.com/watch?v=HaDy9tryzWc
- On your host machine, enter into the Linux_for_Tegra (or equivalent) directory which has the script “flash.sh” and your various other L4T files.
- Perform the following command. This will take around 30 minutes.
sudo ./flash.sh -r -k APP -G backup.img jetson-tx2 mmcblk0p1
- These files are both quite large, so your file explorer GUI will have difficulty copy and pasting them from one destination to another. The mv command is much more convenient.
cd bootloader
sudo mv system.img ~/Desktop
sudo mv system.img.raw ~/Desktop
cd ..
sudo cp backup.img bootloader/system.img
sudo cp backup.img.raw booloader/system.img.raw
sudo ./flash.sh -r -K kernel/Image -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb jetson-tx2 mmcblk0p1
This Jetson should now have all of the files that your other Jetson has on it.
NOTE:
These steps are for copying a root file system and all files within. This, however, will NOT change the device tree or the modules included within your newly flashed copy. Changing those is a manual step. There are very many posts here detailing how to implement modules and modify your device tree. Here is an example in implementing SPIDev: https://devtalk.nvidia.com/default/topic/1024806/how-to-enable-spi-spidev-on-28-1-on-target-/