summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-28 07:45:30 +0000
committer Spandan Das <spandandas@google.com> 2025-02-28 08:29:28 +0000
commit9da8a2dc1d3c8d09d6cf7cb69390ebbd60810476 (patch)
treed4b50fb2872f66249890d55478a097c4730d695a
parentf079f0d018a6a5d806d3c0b2a875e8ffc54104df (diff)
Add Super_image_in_update_package prop to super_image
This property will be used to generate misc_info.txt Test: compared misc_info.txt of soong and make super.img Bug: 399788100 Change-Id: I1354dffb37688414c2ecad22fcbde05fe08383e8
-rw-r--r--android/variable.go1
-rw-r--r--filesystem/super_image.go5
-rw-r--r--fsgen/super_img.go11
3 files changed, 12 insertions, 5 deletions
diff --git a/android/variable.go b/android/variable.go
index 81999f340..7ac9f08e0 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -667,6 +667,7 @@ type PartitionVariables struct {
AbOtaPartitions []string `json:",omitempty"`
AbOtaKeys []string `json:",omitempty"`
AbOtaPostInstallConfig []string `json:",omitempty"`
+ BoardSuperImageInUpdatePackage bool `json:",omitempty"`
// Avb (android verified boot) stuff
BoardAvbEnable bool `json:",omitempty"`
diff --git a/filesystem/super_image.go b/filesystem/super_image.go
index 74c7b659e..5e62fa702 100644
--- a/filesystem/super_image.go
+++ b/filesystem/super_image.go
@@ -78,6 +78,8 @@ type SuperImageProperties struct {
// specified we default to COW version 2 in update_engine for backwards compatibility
Cow_version *int64
}
+ // Whether the super image will be disted in the update package
+ Super_image_in_update_package *bool
}
type PartitionGroupsInfo struct {
@@ -304,6 +306,9 @@ func (s *superImage) dumpDynamicPartitionInfo(ctx android.ModuleContext, sb *str
if len(s.properties.Block_devices) > 0 {
addStr("super_block_devices", strings.Join(s.properties.Block_devices, " "))
}
+ if proptools.Bool(s.properties.Super_image_in_update_package) {
+ addStr("super_image_in_update_package", "true")
+ }
addStr("super_partition_size", strconv.Itoa(proptools.Int(s.properties.Size)))
// TODO: In make, there's more complicated logic than just this surrounding super_*_device_size
addStr("super_super_device_size", strconv.Itoa(proptools.Int(s.properties.Size)))
diff --git a/fsgen/super_img.go b/fsgen/super_img.go
index 569f780fd..f5646365f 100644
--- a/fsgen/super_img.go
+++ b/fsgen/super_img.go
@@ -40,11 +40,12 @@ func createSuperImage(
}
superImageProps := &filesystem.SuperImageProperties{
- Metadata_device: proptools.StringPtr(partitionVars.BoardSuperPartitionMetadataDevice),
- Block_devices: partitionVars.BoardSuperPartitionBlockDevices,
- Ab_update: proptools.BoolPtr(partitionVars.AbOtaUpdater),
- Retrofit: proptools.BoolPtr(partitionVars.ProductRetrofitDynamicPartitions),
- Use_dynamic_partitions: proptools.BoolPtr(partitionVars.ProductUseDynamicPartitions),
+ Metadata_device: proptools.StringPtr(partitionVars.BoardSuperPartitionMetadataDevice),
+ Block_devices: partitionVars.BoardSuperPartitionBlockDevices,
+ Ab_update: proptools.BoolPtr(partitionVars.AbOtaUpdater),
+ Retrofit: proptools.BoolPtr(partitionVars.ProductRetrofitDynamicPartitions),
+ Use_dynamic_partitions: proptools.BoolPtr(partitionVars.ProductUseDynamicPartitions),
+ Super_image_in_update_package: proptools.BoolPtr(partitionVars.BoardSuperImageInUpdatePackage),
}
if partitionVars.ProductVirtualAbOta {
superImageProps.Virtual_ab.Enable = proptools.BoolPtr(true)