Hi,
I followed
https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/FlashingSupport.html#to-clone-a-jetson-device-and-flash
to retrieve a clone of APP partition system.img.
I did it twice: from the original rootfs, which results in system.img of size 5.6 GB.
Then I installed nvidia-jetpack and again saved a clone of APP partition - this time it is 23 GB.
Then I tried to flash entire device with the small system.img - it works OK.
But when I tried to flash entire device with the large system.img - it fails.
It shows lines:
[ 443.0871 ] Writing partition APP with system.img [ 23773838668 bytes ]
[ 443.0927 ] [ ] 000%
and freezes. Then, after a long time it shows
Error: Return value 3
Note that if I first flash entire device with the small system.img (successfully)
then I can flash APP partition only with the large system.img (successfully)
but I would like to install entire device at once.
Why flashing with large system.img fails?
These are the steps to reproduce (very reliable):
-
Prepare a clean rootfs:
export JETPACK=$HOME/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra
mkdir $JETPACK/rootfs
cd $JETPACK/rootfs
sudo tar xpf …/Tegra_Linux_Sample-Root-Filesystem_R35.1.0_aarch64.tbz2
sudo $JETPACK/apply_binaries.sh
sudo $JETPACK/tools/l4t_create_default_user.sh -u me -p 00 -n orinX
Apply patch to nvresizefs.sh file according to
https://developer.download.nvidia.com/embedded/L4T/r35_Release_v1.0/Jetson_Linux_Release_Notes_r35.1.pdf
Flash device:
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
Device boots normally -
Save clone:
Enter recovery mode on Orin
cd $JETPACK
sudo ./flash.sh -r -k APP -G system_clean.img jetson-agx-orin-devkit mmcblk0p1 -
Boot device and install nvidia-jetpack
sudo apt update
sudo apt upgrade
sudo apt install nvidia-jetpack
sync -
Save clone:
Enter recovery mode on Orin
cd $JETPACK
sudo ./flash.sh -r -k APP -G system_full.img jetson-agx-orin-devkit mmcblk0p1 -
Try to reflash device with clean image:
Enter recovery mode on Orin
cd $JETPACK
cp system_clean.img bootloader/system.img
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
success:
…
[ 442.5626 ] Writing partition APP with system.img [ 5650417108 bytes ]
[ 442.5679 ] […] 100%
…
*** The target t186ref has been flashed successfully. *** -
Try to reflash device with full image:
Enter recovery mode on Orin
cd $JETPACK
cp system_full.img bootloader/system.img
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
Fails:
[ 435.5842 ] Writing partition APP with system.img [ 23412348940 bytes ]
[ 435.5996 ] [ ] 000%
Freezes and eventually shows error:
Error: Return value 3 -
If I make full flash with clean image and then separately flash full one, then it works,
but this adds extra step to flash process, which shuold be avoided:
Enter recovery mode on Orin
cd $JETPACK
cp system_clean.img bootloader/system.img
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
Again Enter recovery mode on Orin
sudo ./flash.sh -r -k APP jetson-agx-orin-devkit mmcblk0p1
Now success:
[ 12.8846 ] Writing partition APP with /home/me/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/bootloader/system.img [ 23412348940 bytes ]
[ 12.8858 ] […] 100%
So, why it failed to install full image during full flash?
Thank you