diff options
| author | 2024-11-12 20:04:52 +0000 | |
|---|---|---|
| committer | 2024-11-12 20:04:52 +0000 | |
| commit | 410a80a278abfe5d47c0266cd14db74daa4987d6 (patch) | |
| tree | 8e4f725daa366cb6256d202b5ab65b5fe0f05107 /filesystem/filesystem.go | |
| parent | ba4351440019f24fd0887208ff8e871a320688c3 (diff) | |
| parent | f1c83ad42b4fb8f1ec875d580605b25e8cb3209c (diff) | |
Merge "Add GSI support for android_system_image" into main am: f1c83ad42b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3334196
Change-Id: I7901c28d7ab9a28660eb9cd621e4f7244bd02e6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'filesystem/filesystem.go')
| -rw-r--r-- | filesystem/filesystem.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 78e24e296..29e5ec378 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -67,6 +67,10 @@ type filesystemBuilder interface { BuildLinkerConfigFile(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) // Function that filters PackagingSpec in PackagingBase.GatherPackagingSpecs() FilterPackagingSpec(spec android.PackagingSpec) bool + // Function that modifies PackagingSpec in PackagingBase.GatherPackagingSpecs() to customize. + // For example, GSI system.img contains system_ext and product artifacts and their + // relPathInPackage need to be rebased to system/system_ext and system/system_product. + ModifyPackagingSpec(spec *android.PackagingSpec) } var _ filesystemBuilder = (*filesystem)(nil) @@ -302,6 +306,10 @@ func (f *filesystem) FilterPackagingSpec(ps android.PackagingSpec) bool { return true } +func (f *filesystem) ModifyPackagingSpec(ps *android.PackagingSpec) { + // do nothing by default +} + var pctx = android.NewPackageContext("android/soong/filesystem") func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { @@ -792,7 +800,7 @@ func (f *filesystem) SignedOutputPath() android.Path { // Note that "apex" module installs its contents to "apex"(fake partition) as well // for symbol lookup by imitating "activated" paths. func (f *filesystem) gatherFilteredPackagingSpecs(ctx android.ModuleContext) map[string]android.PackagingSpec { - specs := f.PackagingBase.GatherPackagingSpecsWithFilter(ctx, f.filesystemBuilder.FilterPackagingSpec) + specs := f.PackagingBase.GatherPackagingSpecsWithFilterAndModifier(ctx, f.filesystemBuilder.FilterPackagingSpec, f.filesystemBuilder.ModifyPackagingSpec) return specs } @@ -818,13 +826,7 @@ type filesystemDefaults struct { android.ModuleBase android.DefaultsModuleBase - properties filesystemDefaultsProperties -} - -type filesystemDefaultsProperties struct { - // Identifies which partition this is for //visibility:any_system_image (and others) visibility - // checks, and will be used in the future for API surface checks. - Partition_type *string + properties FilesystemProperties } // android_filesystem_defaults is a default module for android_filesystem and android_system_image |