Problem cloning my TX2

Hi,

I have a TX2 attached to an Orbitty shield that I configured for production with Ubuntu by flashing it properly, installing all required Nvidia drivers and setting up the code that needs to run on the device in production. The whole set up takes about one day. Now I need to scale this and deploy this setup to 100s of TX2s.

To speed up the process I decided to try to clone the whole TX2 so that instead of spending a day on setup for each device I could just clone the original one to any number of new devices which will be a much faster process.

What I did was:

I first booted the correctly configured device to recovery mode. and ran:

sudo ./flash.sh -r -k APP -G my_backup.img jetson-tx2 mmcblk0p1

Then I renamed my_backup.img to bootloader/system.img before flashing the saved image to new board by running:

sudo ./flash.sh -r -k APP jetson-tx2 mmcblk0p1

Both commands executed successfully. However, when I try to boot the new device it fails to boot. The last few lines before the boot stops go like:

VFS: Mounted root (ext4 filesystem) on device 179.1
devtmpfs: mounted
Freeing unused memory...
Freeing alternative memory
tegra-12c 3160000.u2c: no acknowledge from address 0x74
pca953x 0-0074: failed reading register
tegra-12c 3160000.u2c: no acknowledge from address 0x77
pca953x 0-0077: failed reading register

Any ideas how to troubleshoot this?

What you’ve cloned is only the rootfs partition.
It would work to restore this on a TX2 having already been flashed with the same version.

I suspect your new board module has not been flashed (modules alone come unflashed, while modules in devkits have previously been flashed).

So just do a full flash, not only APP partition, so that all partitions (for cboot, device tree, uboot…) are there and it may work. It won’t be much longer, as most of flashing time is used for APP.

Be sure to use a Linux partition on host such as ext4. On a MS partition type, it would turn into permission problems.

You’re absolutely right! The device was completely new, never used.

What I did, and it worked, is I flashed the device twice. First I flashed the device the default way by running

sudo ./flash.sh orbitty mmcblk0p1

what this did is it actually generated a new bootloader/system.img and flashed the device with a brand new install of Ubuntu.

Then I ran the flash.sh for the second time with the cloned version in bootloader/system.img by running:

sudo ./flash.sh -r -k APP orbitty mmcblk0p1

And it worked! now my new device was a complete clone of the original TX2. The only problem is that I had to flash it twice to achieve this.

This approach seems to work but something tells me there must be a way you can do this in one go instead of having to run flash.sh twice. If there is a way to do it, could you please tell me what params I need to run flash.sh to do a full flash with the cloned image in one go?

Once you’ve updated the rootfs image in bootloader directory on host, you may try a full flash of a brand new TX2 using ‘-r’ so that it won’t rebuild rootfs but rather reuse the existing one :

sudo ./flash.sh -r orbitty mmcblk0p1

Looks like that’s it. Thanks!