Skip to content

feat: add option to preserve user partition #40

@MatteoPologruto

Description

@MatteoPologruto

Add a flag to the flash command to allow the user to preserve the home partition. When the flag (for example --preserve-user) is passed to the command, the Flasher CLI should:

  1. check if the current image on the board supports home partition preservation (so it's not a R0 image)
  2. check if the target image has the file rawprogram0.nouser.xml
  3. warn the user when one of the above fails and a complete flash is required, otherwise procede with the flash preserving user partition

Steps to check if the current image is R0:

  1. create a read.xml file
<?xml version="1.0" ?>
<data>
 <read SECTOR_SIZE_IN_BYTES="512" filename="dump.bin" physical_partition_number="0" num_partition_sectors="19" start_sector="1"/>
</data>
  1. run qdl --storage emmc prog_firehose_ddr.elf read.xml. NOTE: prog_firehose_ddr.elf does not have to be the one from the original image on the board
  2. run xxd dump.bin | less to examine the resulting file
  3. count the partitions, starting from the address 0x200 with an offset of 80h: if the number of entries in the GPT, stored in 4 bytes starting at the address 0x50 is 76 and the actual number of partitions is 73, then the image is R0

Related issue: Move examples (and other data) out of the Arduino home folder

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions