AGX Orin clone failed, because system.img.raw is not a multiple of 4096

hello 1457420441,

are you using SDKManager? we’ve test this before and cannot reproduce the same failure.

hello
This is what I did

  1. Modify the patch

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

hello 1457420441,

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,
using sample filesystem of JetPack 5.0.2 (L4T r35.1).
Thanks.

hello 1457420441,

we cannot reproduce the failure, suggest you should re-install the file system for confirmation.

hello,
The file system has been reinstalled,but it’s still not a multiple of 4096

hello 1457420441,

I’m wondering what’s your host environment, are you using VM? please share the OS version for reference.

hello,
it is a ubuntu 20.04. Not VM.

please have a try to change APP partition’s allocation_attribute to 0x808 , thanks

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

hello,
Is there any update on this issue?
thanks

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.

hello,
when i change APP partition’s allocation_attribute to 0x808,then flash orin,
then i ran:
sudo blockdev --getsize64 /dev/mmcblk0p1


if change APP partition’s allocation_attribute to 0x8
the exact size of “system.img.raw” is 62090379264

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.

hello,
Can this problem be solved? Because 0x808 cannot clone orin.

hello SevenTian,

besides using -k APP -G commands…
could you please try this script file, $OUT/Linux_for_Tegra/tools/backup_restore/ to generate the backup image.
you may see-also README_backup_restore.txt for sample command-line.
thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.