Skip to content

[BOOTSCRIPT][U-BOOT] Add dymanic partition selection to bootscript

Davide Cardillo requested to merge davc/bootscript into scarthgap_kickoff

The partitions of the kernel/dtb/ramfs and rootfs are no dynamically selected based on the GPT GUID partition type assigned to he various Clea Os partitions. The added bussiness logic is compatible also with the SysData and double slot partitioning. Algorithm Implemented:

  1. obtain the list of the partition IDs for kernel, dtb, ramfs and rootfs. These are list of numeric ID space separated. Usuusally will there be only and ID but for those partitions that are present twice (or more) the IDs will be space separated and treated as a list.
  2. Set slot_id to 1. This last is usde to point to the partition ID to use for the current boot. If the slot_id is 1 then the first partition ID in the list will be used, if it is 2 then the second one will be used. This is used to manage the double slot partitioning.
  3. Check the presence of SysData tool.
  4. In case of SysData tool present: a. Read the slot_id from the SysData table (A or B). b. set the slot_id to 1 or 2 based on the SysData table (A = 1 and B = 2).
  5. set the u-boot environment variables for the kernel, dtb, ramfs and rootfs partitions using the slot_id and the list of partition IDs.

Signed-off-by: default avatarDavide Cardillo davide.cardillo@seco.com

Merge request reports

Loading