summaryrefslogtreecommitdiff
path: root/fsgen/filesystem_creator.go
diff options
context:
space:
mode:
author Zi Wang <mrziwang@google.com> 2024-12-05 18:44:06 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-12-05 18:44:06 +0000
commit6cba6573f7ff997a14fc05fda064c2855fb3669c (patch)
tree83e5ae43d66905c34629ad3ea5f4b012128b15da /fsgen/filesystem_creator.go
parentac486a68217f0cb1c0ddf65db60a4e7376375407 (diff)
parentdb55b7aaf42941ff026d66bcb707460019969cd4 (diff)
Merge "Add super_image module type and create super image module in fsgen" into main am: a242492bb7 am: db55b7aaf4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3389110 Change-Id: Iec678109d2e55a40d0877ce6b3ae7e2e030c6f3b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'fsgen/filesystem_creator.go')
-rw-r--r--fsgen/filesystem_creator.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 6ded3aaa5..8d355dda9 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -52,6 +52,7 @@ type filesystemCreatorProps struct {
Boot_image string `blueprint:"mutated" android:"path_device_first"`
Vendor_boot_image string `blueprint:"mutated" android:"path_device_first"`
Init_boot_image string `blueprint:"mutated" android:"path_device_first"`
+ Super_image string `blueprint:"mutated" android:"path_device_first"`
}
type filesystemCreator struct {
@@ -158,6 +159,11 @@ func (f *filesystemCreator) createInternalModules(ctx android.LoadHookContext) {
f.properties.Vbmeta_partition_names = append(f.properties.Vbmeta_partition_names, x.partitionName)
}
+ if buildingSuperImage(partitionVars) {
+ createSuperImage(ctx, finalSoongGeneratedPartitions, partitionVars)
+ f.properties.Super_image = ":" + generatedModuleName(ctx.Config(), "super")
+ }
+
ctx.Config().Get(fsGenStateOnceKey).(*FsGenState).soongGeneratedPartitions = finalSoongGeneratedPartitions
f.createDeviceModule(ctx, finalSoongGeneratedPartitions, f.properties.Vbmeta_module_names)
}
@@ -998,6 +1004,14 @@ func (f *filesystemCreator) GenerateAndroidBuildActions(ctx android.ModuleContex
diffTestFiles = append(diffTestFiles, diffTestFile)
ctx.Phony("soong_generated_init_boot_filesystem_test", diffTestFile)
}
+ if f.properties.Super_image != "" {
+ diffTestFile := android.PathForModuleOut(ctx, "super_diff_test.txt")
+ soongSuperImg := android.PathForModuleSrc(ctx, f.properties.Super_image)
+ makeSuperImage := android.PathForArbitraryOutput(ctx, fmt.Sprintf("target/product/%s/super.img", ctx.Config().DeviceName()))
+ createDiffTest(ctx, diffTestFile, soongSuperImg, makeSuperImage)
+ diffTestFiles = append(diffTestFiles, diffTestFile)
+ ctx.Phony("soong_generated_super_filesystem_test", diffTestFile)
+ }
ctx.Phony("soong_generated_filesystem_tests", diffTestFiles...)
}