[L4T 32.3.1] Verify successful system.img flash in Jetson Nano

We are flashing our products with these commands.

  1. sudo cp backup.img /home/user/Linux_for_Tegra/bootloader/system.img
  2. sudo cp backup.img.raw /home/user/Linux_for_Tegra/bootloader/system.img.raw
  3. sudo ./flash.sh -r jetson-nano-emmc mmcblk0p1

We can see a “flashing successful” message at the end, but I was wondering if there’s a command that verifies the img on the target Nano with the backup.img we tried to flash it with.

Please let me know if you need more information.

The only way I know to verify, assuming it said successful, would be to clone the unit again and read a checksum (e.g., md5sum or sha256sum, so on). for comparing the new clone and the old system.img.raw. It might help if you provide a use-case of what you want to accomplish.

I did think of using sha256sum or even “diff” between the two images, but I was just wondering if NVIDIA provided anything for that.

When we mass-produce units with the Nano on it, it would just be convenient for the production team to see “Flashing successful” and then something like “Verify successful” before moving our product to the next stage of production.

Or even if we find an issue with one of the products, we can compare the img on that Nano to the one that was originally flashed to see if they are different.

Seeing “verify successful” would help us prevent defects and help us in troubleshooting, as you can imagine.

I am not aware of any such tool. If you want a tool which can compare a running system (mounting will change the mount count, so that implies a binary compare is then out of the picture), then it has to be aware of actual filesystem content. To that extent you can use the “rsync” backup tool to compare, and this will be a high quality comparison.

As background, rsync has the ability to back up to a remote system. Presumably a copy of your used system.img.raw would be loopback mounted on the remote system (probably your PC which performed the flash). Then you would use rsync with options to only create an incremental backup of changes. If no changes are logged during the backup, then it means the images match. If there are items being backed up as changed, then you know how it differed.