Add vendor_boot to the composite disk
Give the vendor_boot partition a fixed/maximum size like boot and
recovery and add it to the composite disk. Fix up the a/b slotting for
boot and move misc to the top of the partition table. Move all of the
partitions needed by the bootloader to the top of the disk so they are
less likely to be reordered.
Giving the vendor_boot partition a fixed size allows us to enable AVB.
Bug: 155019925
Bug: 155754955
Change-Id: Ic77fd0cdf8d28ea533610773428a4dbbcd368095
Merged-In: Ic77fd0cdf8d28ea533610773428a4dbbcd368095
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index b16166c..55e6579 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -613,6 +613,26 @@
std::vector<ImagePartition> disk_config() {
std::vector<ImagePartition> partitions;
partitions.push_back(ImagePartition {
+ .label = "misc",
+ .image_file_path = FLAGS_misc_image,
+ });
+ partitions.push_back(ImagePartition {
+ .label = "boot_a",
+ .image_file_path = FLAGS_boot_image,
+ });
+ partitions.push_back(ImagePartition {
+ .label = "boot_b",
+ .image_file_path = FLAGS_boot_image,
+ });
+ partitions.push_back(ImagePartition {
+ .label = "vendor_boot_a",
+ .image_file_path = FLAGS_vendor_boot_image,
+ });
+ partitions.push_back(ImagePartition {
+ .label = "vendor_boot_b",
+ .image_file_path = FLAGS_vendor_boot_image,
+ });
+ partitions.push_back(ImagePartition {
.label = "super",
.image_file_path = FLAGS_super_image,
});
@@ -628,14 +648,6 @@
.label = "metadata",
.image_file_path = FLAGS_metadata_image,
});
- partitions.push_back(ImagePartition {
- .label = "boot",
- .image_file_path = FLAGS_boot_image,
- });
- partitions.push_back(ImagePartition {
- .label = "misc",
- .image_file_path = FLAGS_misc_image
- });
return partitions;
}