diff options
author | 2024-11-05 17:21:37 +0900 | |
---|---|---|
committer | 2024-11-12 17:02:10 +0900 | |
commit | 3c0a042d2056f35ffa7859c72d0aea1c9592e449 (patch) | |
tree | 4023a5bfa28def3935fbfa60a9d8c61113eed934 /android/packaging.go | |
parent | 25777477593f60273be433e44ee9e49897bdab23 (diff) |
Add GSI support for android_system_image
GSI's system.img includes system_ext and product artifacts. This patches
android_system_image module so it can include such artifacts when
building GSI.
Bug: 370351758
Test: m android_gsi
Change-Id: Id29678b1101e787e88dbedae38cdbf6d82d1cb95
Diffstat (limited to 'android/packaging.go')
-rw-r--r-- | android/packaging.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/android/packaging.go b/android/packaging.go index 98c85fa0c..635922cfa 100644 --- a/android/packaging.go +++ b/android/packaging.go @@ -165,6 +165,10 @@ func (p *PackagingSpec) Partition() string { return p.partition } +func (p *PackagingSpec) SetPartition(partition string) { + p.partition = partition +} + func (p *PackagingSpec) SkipInstall() bool { return p.skipInstall } @@ -186,6 +190,7 @@ type PackageModule interface { // GatherPackagingSpecs gathers PackagingSpecs of transitive dependencies. GatherPackagingSpecs(ctx ModuleContext) map[string]PackagingSpec GatherPackagingSpecsWithFilter(ctx ModuleContext, filter func(PackagingSpec) bool) map[string]PackagingSpec + GatherPackagingSpecsWithFilterAndModifier(ctx ModuleContext, filter func(PackagingSpec) bool, modifier func(*PackagingSpec)) map[string]PackagingSpec // CopyDepsToZip zips the built artifacts of the dependencies into the given zip file and // returns zip entries in it. This is expected to be called in GenerateAndroidBuildActions, @@ -444,7 +449,8 @@ func (p *PackagingBase) AddDeps(ctx BottomUpMutatorContext, depTag blueprint.Dep } } -func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter func(PackagingSpec) bool) map[string]PackagingSpec { +// See PackageModule.GatherPackagingSpecs +func (p *PackagingBase) GatherPackagingSpecsWithFilterAndModifier(ctx ModuleContext, filter func(PackagingSpec) bool, modifier func(*PackagingSpec)) map[string]PackagingSpec { // packaging specs gathered from the dep that are not high priorities. var regularPriorities []PackagingSpec @@ -491,6 +497,10 @@ func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter } } + if modifier != nil { + modifier(&ps) + } + if _, ok := depTag.(highPriorityDepTag); ok { highPriorities = append(highPriorities, ps) } else { @@ -552,6 +562,11 @@ func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter } // See PackageModule.GatherPackagingSpecs +func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter func(PackagingSpec) bool) map[string]PackagingSpec { + return p.GatherPackagingSpecsWithFilterAndModifier(ctx, filter, nil) +} + +// See PackageModule.GatherPackagingSpecs func (p *PackagingBase) GatherPackagingSpecs(ctx ModuleContext) map[string]PackagingSpec { return p.GatherPackagingSpecsWithFilter(ctx, nil) } |