Error when trying to Clone TX2 - Could not find tegraparser_v2

Hi,
I’m trying to clone the TX2 image using:
sudo ./flash.sh -r -k APP -G backup.img jetson-tx2 mmcblk0p1
But I’m getting this error:
7.1796 ] Parsing partition layout
Error: Could not find tegraparser_v2
*** The [APP] has been read successfully. ***

Any idea what I can do?
Thanks

What directory were you in at the time when you ran this? Sometimes the release version of the software matters (earlier releases used different cloning procedures), and if you installed via JetPack/SDKM, then the location will be at:
~/nvidia/nvidia_sdk/JetPack...version.../Linux_for_Tegra/

Knowing the release version, and whether this was from the “standard” location for install might help.

This is the location I was in:
~/nvidia_files/JetPack_4.4.1_Linux_JETSON_TX2/Linux_for_Tegra

JetPack 4.4.1 instructions for clone are standard, so if you flashed once by means of 4.4.1, then it should work if run from the “Linux_for_Tegra/” subdirectory.

If you cd ~/nvidia/nvidia_sdk/JetPack_4.4.1_Linux_JETSON_TX2/Linux_for_Tegra/, what do you see from:
ls -l ./bootloader/tegraparser_v2

When running from Linux_for_Tegra/ that bootloader/ location is where flash will look for tegraparser_v2.

If you have not actually flashed from here before, then likely the content of Linux_for_Tegra/ will be at least partially missing. Manually downloading content could work if that is the case.

I don’t know why but the tegraparser_v2 is getting deleted, any reason for that?

Do you mean you do not see this before starting? Or do you mean that when you flash the file is shown as being deleted? Normally the file should stay there.

There is a chance that if there is an update, then running sdkmanager might remove this in order to put the new release in place, but otherwise it should always be there.

Note that the file’s original existence is from when SDKM unpacks the L4T driver package. The driver package is unpacked only for flash. If flash has occurred once, then Linux_for_Tegra/bootloader/tegraparser_v2 should remain after the flash and after other manual use.

I think that there is some bug with the sdkmanager that removes it but doesn’t put the new release in place. Is there any way to put the right release of the tegraparser_v2 file manually using the sdkmanager or something else?

Someone from NVIDIA may need to give an answer since I don’t know about the internal workings of SDKM, but as a general theme, SDKM downloads content when the content is (A) missing, or (B) a version with a different checksum than needed is found. The metadata about that content is generally here:
~/.nvsdkm/

The file Linux_for_Tegra/bootloader/tegraparser_v2 is actually part of the “driver package”, and if you were to recursively delete both the “~/.nvsdkm” content and the particular “Linux_for_Tegra/” content, then SDKM would download this again and start fresh.

If you do not flash, then I would expect much of that content to remain missing until you actually flash. You can expect that the version of tegraparser_v2 would always be correct once put in place. I have not experienced this being deleted after a flash, but in cases where I’ve run SDKM without flashing that content will remain missing.

You could manually unpack the “driver package” and “sample root filesystem” (along with correctly using sudo for the rootfs, then running the “sudo ./apply_binaries.sh” command from “Linux_for_Tegra/”), and this would also provide “Linux_for_Tegra/bootloader/tegraparser_v2”.

If you are somehow trying to mix and match incompatible releases, then beware that content from one release is likely incompatible with another release and behavior might be undefined. Should SDKM be installed using the “.deb” package system, then I would expect this to not be a problem. If there is some sort of manual process for installing content, then it is possible you are running into some odd behavior.