I am trying to create a custom image to load onto Jetson AGX orin. The whole process was successfully done and had an error at the end in converting raw image to sparse. The error is:
Converting RAW image to Sparse image… size of /home/qi/Linux_for_Tegra/system.img.raw is not mulple of 4096
The command I used is: sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1
And I’ve already patched rel-35.1GA
2.sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1 to flash the original system
3.After flash, setup ubuntu with username passwd, etc till i can see a normal desktop show up.
4. reboot device into recovery mode
5. sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1 to back up
Then error is: Converting RAW image to Sparse image… size of /home/qi/Linux_for_Tegra/system.img.raw is not mulple of 4096
may I know where you download the image,
for example, are you download JetPack-5.0.2 release via SDKManager, or you’re using sampleFS via Jetson Linux 35.1 | NVIDIA Developer?
hello,
I change APP partition’s allocation_attribute to 0x808,then I ran : sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1 sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1
The error is:
Converting RAW image to Sparse image… size of /home/qi/Linux_for_Tegra/system.img.raw is not mulple of 4096
I change APP partition’s allocation_attribute to 0x8,then I ran : sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1 sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1
Then system.img. raw is a multiple of 4096 to generate system.img
But this new system.img does not flash orin,the error is:
if change APP partition’s allocation_attribute to 0x808,the orin can be flashed successfully to use the new system.img,but when i want to clone a system.img after I flash orin, I get this error again:
Converting RAW image to Sparse image… size of /home/qi/Linux_for_Tegra/system.img.raw is not mulple of 4096
I just thought of something to test. You know that the raw image (system.img.raw) is a true multiple of 4096. You don’t need to use the sparse image, you can copy “system.img.raw” to “system.img” and flash with that with the “-r” option just as you have before. The file size would mean a much longer flash, but it would bypass any raw->sparse->raw conversion. Perhaps it will work if you use raw the entire time?
hello,
You mean do not change the allocation_attribute of the APP partition to 0x808 after clone system.img,then copy “system.img.raw ” to “system.img ” and flash orin?
hello,Now the problem is that when I modify the allocation_attribute of the APP partition to 0x808, and then use the cloned system.img or downloaded system.img to refresh the orin (including copy “system.img.raw” to “system.img”), and then clone the orin:
sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1
I get this error again:
Converting RAW image to Sparse image… size of /home/qi/Linux_for_Tegra/system.img.raw is not mulple of 4096
system.img.raw size of 62091116032.
if don’t change APP partition’s allocation_attribute to 0x808,clone succeeded,system.img.raw size of 62090379264 ,it is a multiple of 4096.
But if I don’t change APP partition’s allocation_attribute to 0x808,failed to flash orin using the “system.img” obtained by clone orin(include copy “system.img.raw” to “system.img”),
The above is not a multiple of 4096: 62091116032 / 4096 = 15158963.875
It isn’t even a multiple of 1024: 62091116032 /1024 = 60635855.5
I was under the impression that the original raw clone was a multiple of 4096. However, can you verify the exact size of “system.img.raw” from the clone being “62091116032” bytes? If the Jetson boots, can you also verify size from: sudo blockdev --getsize64 /dev/mmcblk0p1
If it turns out that the raw clone is truly an exact match in size to the running partition, then it gets a lot more interesting because it means the original flash is why the partition size is not evenly divisible by 4096 (or even 1024). If the raw clone is the wrong size compared to the partition, then it is still interesting, but the problem will be quite different.
0x8 produces a valid size in terms of being divisible by 4096. 0x808 apparently produces an invalid size that is not divisible by either 1024 or 4096. I don’t know if perhaps the Jetson is able to use this “odd” size, but it seems that sanity checking steps in the flash believe that only a size divisible by 4096 is valid.