summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-20 16:11:36 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-20 16:11:36 -0700
commit29e0a00b2a9010b7b30f004fb9f6a2ad7ea20bcb (patch)
treecb888af41cf7962e5243791334e27beb1d7007b0 /filesystem/filesystem.go
parent36e0719e9ef8f0969254c7fd7aac355288e8e63e (diff)
parent8c31132dba8e206387296ec2a9d850832794d9b4 (diff)
Snap for 13248265 from 8c31132dba8e206387296ec2a9d850832794d9b4 to 25Q2-release
Change-Id: If932ac6e530acdff73391ec4a2b3afb3a7adc401
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index f8faa496f..e86ebf4fa 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -455,6 +455,14 @@ type FilesystemInfo struct {
HasFsverity bool
PropFileForMiscInfo android.Path
+
+ // Additional avb and partition size information.
+ // `system_other` will use this information of `system` dep for misc_info.txt processing.
+ PartitionSize *int64
+ UseAvb bool
+ AvbAlgorithm string
+ AvbHashAlgorithm string
+ AvbKey android.Path
}
// FullInstallPathInfo contains information about the "full install" paths of all the files
@@ -711,6 +719,15 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) {
Owners: f.gatherOwners(specs),
HasFsverity: f.properties.Fsverity.Inputs.GetOrDefault(ctx, nil) != nil,
PropFileForMiscInfo: propFileForMiscInfo,
+ PartitionSize: f.properties.Partition_size,
+ }
+ if proptools.Bool(f.properties.Use_avb) {
+ fsInfo.UseAvb = true
+ fsInfo.AvbAlgorithm = proptools.StringDefault(f.properties.Avb_algorithm, "SHA256_RSA4096")
+ fsInfo.AvbHashAlgorithm = proptools.StringDefault(f.properties.Avb_hash_algorithm, "sha256")
+ if f.properties.Avb_private_key != nil {
+ fsInfo.AvbKey = android.PathForModuleSrc(ctx, *f.properties.Avb_private_key)
+ }
}
android.SetProvider(ctx, FilesystemProvider, fsInfo)