Just some general information you might find useful…
A clone is an exact bit-for-bit copy of the rootfs partition as a whole. This means it includes the ext4 file system and is not just a copy of files. Flashing a clone implies flashing an image (the ext4 file system is built in…the flash software does not need to understand ext4 as it only treats this as binary data).
During a normal flash an empty file is created which is the exact size of the rootfs partition. That file is covered with loopback, and because of this the file can be treated exactly the same as a partition. That loopback file is formatted with ext4. Once that is done the files of the “rootfs/” directory have some boot-related content added (which isn’t a lot of content), and then copied into the loopback file. This file becomes “bootloader/system.img.raw”. If you create a clone, and the clone is from a freshly flashed Jetson which has never booted, then the clone is an exact match of the “system.img.raw” down to the last bit.
During flash the “system.img.raw” is used to create a “sparse” version of this (a sort of poor man’s compression for lower size). That file becomes “bootloader/system.img”. This file is then flashed to the actual TX2. The TX2 itself automatically understands a sparse image versus raw image, and will unpack the sparse image back into the full size raw image before writing it to eMMC.
If you were to replace “system.img” by overwriting it with the larger “system.img.raw”, then the resulting flash would be exactly the same other than taking much longer (sending a couple of GB over USB2 is much faster than sending 16GB over USB2).
To reiterate, when you flash normally an image is created from “rootfs/” content. The “system.img” and “system.img.raw” files remain after flash. If you were to then use the “-r” option on command line flash to “reuse” the image, then “rootfs/” would be ignored and whatever sits at “bootloader/system.img” is flashed.
Placing a clone at “bootloader/system.img” and then reusing the image (the “-r” option) causes the clone to be stored directly on eMMC without modifying it. Placing the clone in “rootfs/” instead, and not reusing the image (not using “-r”) causes nearly the same thing…only some of the boot content is freshened to this L4T driver package release, but otherwise it is a 100% exact match for everything else.
Summary:
- Normal flash generates an image from "rootfs/" which is populated by the Ubuntu sample rootfs.
- Normal flash with a clone in "rootfs/" generates an image which is populated by your clone.
- Flash which reuses the image depends on the image previously created and does not know what the image source was.
- Flash which reuses the image, where the image happens to be from a clone, flashes that image and does not know, nor does it care, that the image is from another Jetson and not freshly generated from a sample rootfs.
Something @Andrey1984 was mentioning is important in some cases because a clone copies everything. Passwords are copied, network setup is copied, so on. This is probably what you want, but if you are going to a new TX2, then something dependent upon serial numbers or MAC addresses might be looking for a serial number or MAC address from the previous module. This part would have to be edited to work again on the new module. The udev system for renaming certain interfaces sometimes gets customized to rename a network based on the hardware MAC address…and that udev rule would fail on a new module until the MAC address is edited. Most of the time MAC and serial numbers are not used and so it won’t matter…in the few cases where MAC address or a serial number is used and something odd doesn’t work, then it is worth investigating udev for whether MAC address/serial number was hard wired in some customization. Assuming your network works as it should, then this won’t be an issue and MAC customization did not exist on the prior board.
As an example, imagine if you have a firewall rule which applies to the MAC address. The firewall rule would become inert on a new module until the MAC is fixed.