summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-21 20:05:43 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-21 20:05:43 -0700
commit1248ced0cad29018090e65e3762585cdd774e864 (patch)
tree2789f57ad33c7bf8a28df9ded872139adcf05ac7 /filesystem/android_device.go
parent29e0a00b2a9010b7b30f004fb9f6a2ad7ea20bcb (diff)
parent716fc3438bce5e2018b47cf906195b4f9aecea5c (diff)
Snap for 13256841 from 716fc3438bce5e2018b47cf906195b4f9aecea5c to 25Q2-release
Change-Id: I4c3a8288d87d662237450f7cb929abe4669668ca
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index feb000dc4..b96c5eae3 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -90,6 +90,10 @@ type DeviceProperties struct {
Releasetools_extension *string `android:"path"`
FastbootInfo *string `android:"path"`
+ Partial_ota_update_partitions []string
+ Flash_block_size *string
+ Bootloader_in_update_package *bool
+
// The kernel version in the build. Will be verified against the actual kernel.
// If not provided, will attempt to extract it from the loose kernel or the kernel inside
// the boot image. The version is later used to decide whether or not to enable uffd_gc
@@ -391,6 +395,13 @@ func (a *androidDevice) distFiles(ctx android.ModuleContext) {
if a.deviceProps.Android_info != nil {
ctx.DistForGoal("droidcore-unbundled", android.PathForModuleSrc(ctx, *a.deviceProps.Android_info))
}
+ if a.miscInfo != nil {
+ ctx.DistForGoal("droidcore-unbundled", a.miscInfo)
+ if a.partitionProps.Super_partition_name != nil {
+ ctx.DistForGoalWithFilename("dist_files", a.miscInfo, "super_misc_info.txt")
+ }
+ }
+
}
}
@@ -840,14 +851,25 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path {
Textf("echo avb_enable=true >> %s", miscInfo).
Textf("&& echo avb_building_vbmeta_image=true >> %s", miscInfo).
Textf("&& echo avb_avbtool=avbtool >> %s", miscInfo)
+
+ var allChainedVbmetaPartitionTypes []string
for _, vbmetaPartitionName := range a.partitionProps.Vbmeta_partitions {
img := ctx.GetDirectDepProxyWithTag(vbmetaPartitionName, filesystemDepTag)
if provider, ok := android.OtherModuleProvider(ctx, img, vbmetaPartitionProvider); ok {
builder.Command().Text("cat").Input(provider.PropFileForMiscInfo).Textf(" >> %s", miscInfo)
+ if provider.FilesystemPartitionType != "" { // the top-level vbmeta.img
+ allChainedVbmetaPartitionTypes = append(allChainedVbmetaPartitionTypes, provider.FilesystemPartitionType)
+ }
} else {
ctx.ModuleErrorf("vbmeta dep %s does not set vbmetaPartitionProvider\n", vbmetaPartitionName)
}
}
+ // Determine the custom vbmeta partitions by removing system and vendor
+ customVbmetaPartitionTypes := android.RemoveListFromList(allChainedVbmetaPartitionTypes, []string{"system", "vendor"})
+ builder.Command().Textf("echo avb_custom_vbmeta_images_partition_list=%s >> %s",
+ strings.Join(android.SortedUniqueStrings(customVbmetaPartitionTypes), " "),
+ miscInfo,
+ )
}
if a.partitionProps.Boot_partition_name != nil {
@@ -883,6 +905,14 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path {
builder.Command().Text("cat").Input(bootImgInfo.PropFileForMiscInfo).Textf(" >> %s", miscInfo)
}
+ builder.Command().Textf("echo blocksize=%s >> %s", proptools.String(a.deviceProps.Flash_block_size), miscInfo)
+ if proptools.Bool(a.deviceProps.Bootloader_in_update_package) {
+ builder.Command().Textf("echo bootloader_in_update_package=true >> %s", miscInfo)
+ }
+ if len(a.deviceProps.Partial_ota_update_partitions) > 0 {
+ builder.Command().Textf("echo partial_ota_update_partitions_list=%s >> %s", strings.Join(a.deviceProps.Partial_ota_update_partitions, " "), miscInfo)
+ }
+
// Sort and dedup
builder.Command().Textf("sort -u %s -o %s", miscInfo, miscInfo)