I am wanting to be able to preserve a sizeable chunk of data in the eMMC while performing the recovery flash process. My initial thought was to put the data that should be persistent across the flashing process in the UDA partition. However, one of the steps during the flashing process is erasing the eMMC, including the UDA partition, so all the data is erased in the process. My second attempt was to perform a partition read of UDA before beginning to flash in order to allow restoring the UDA partition following the flashing process. However, it does not appear that the reading the UDA partition is supported by the flashing utilities:
sudo ./flash.sh -r -k UDA -G uda.img jetson-tx2 mmcblk0p1
*** Update [UDA] is not supported. ***
I am looking for a solution that only requires the device to be able to boot into recovery mode with functional USB support. I am not interested in any ideas to use an SD card, write the data to an external device on your board, save it in the EEPROM, etc.
So my question, is there a way to preserve several MBs of data while flashing an entire system image through the Recovery mechanism?
I understand how to store data in a file system that is in the APP partition. I need a solution for storing data somewhere else on the eMMC that can be preserved through the Recovery mode.
The APP partition is a read-only partition and the customer data never goes in there as it creates many difficult situations. By separating the customer data that needs to be preserved into a separate partition we can provide root file system updates, cleanly re-image the entire eMMC and not lose the customer data.
On my PC I use a separate partition for “/home”, so I think the question is how to create other partitions which live well with the existing partitions. Once this is achieved there is no difference between doing this on a Jetson versus any PC. I have not tried to create custom partitions, but I believe there is some way through one of the “.cfg” files…not sure.
Yes, I can create custom partitions. The problem is how can I get them off of the eMMC using Recovery Mode (I can do it with my own U-Boot or kernel/ramdisk image, but I would like a Recovery Mode solution). Recovery Mode does not appear to allow downloading just any partition you want. Also, I cannot preserve areas of the eMMC as the flashing process does an entire eMMC erase before starting.
It seems like lots of people have been asking for an entire system clone and NVIDIA needs to add some support to make this (and my use case) possible with the existing tools. Right now my solution is to do a Recovery Mode RAM boot to U-Boot and use my own U-Boot code to the retrieve the necessary eMMC data off of the device.
Recovery mode temporarily turns the Jetson into a custom USB device (there are no default drivers available, e.g., it is not mass storage and cannot be treated like a removable hard drive). The driver package (installed on the host when running SDK Manager/JetPack) is the only thing which understands this. There is no current method for the driver package to be prompted to copy one partition into the other.
However, that would be a very useful feature. Perhaps someone at NVIDIA could provide a method in the driver package which is an extension to cloning: Copy not to the PC, but from one partition to another (only the non-boot partitions would be useful for this since boot partitions are signed).