diff options
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index a8f97e3b7..a26fac7fc 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -37,7 +37,7 @@ func init() { func registerBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("android_filesystem", filesystemFactory) ctx.RegisterModuleType("android_filesystem_defaults", filesystemDefaultsFactory) - ctx.RegisterModuleType("android_system_image", systemImageFactory) + ctx.RegisterModuleType("android_system_image", SystemImageFactory) ctx.RegisterModuleType("avb_add_hash_footer", avbAddHashFooterFactory) ctx.RegisterModuleType("avb_add_hash_footer_defaults", avbAddHashFooterDefaultsFactory) ctx.RegisterModuleType("avb_gen_vbmeta_image", avbGenVbmetaImageFactory) @@ -49,7 +49,7 @@ type filesystem struct { android.PackagingBase android.DefaultableModuleBase - properties filesystemProperties + properties FilesystemProperties // Function that builds extra files under the root directory and returns the files buildExtraFiles func(ctx android.ModuleContext, root android.OutputPath) android.OutputPaths @@ -71,7 +71,7 @@ type symlinkDefinition struct { Name *string } -type filesystemProperties struct { +type FilesystemProperties struct { // When set to true, sign the image with avbtool. Default is false. Use_avb *bool @@ -136,9 +136,6 @@ type filesystemProperties struct { // Install aconfig_flags.pb file for the modules installed in this partition. Gen_aconfig_flags_pb *bool - // Update the Base_dir of the $PRODUCT_OUT directory with the packaging files. - Update_product_out *bool - Fsverity fsverityProperties } @@ -150,14 +147,14 @@ type filesystemProperties struct { func filesystemFactory() android.Module { module := &filesystem{} module.filterPackagingSpec = module.filterInstallablePackagingSpec - initFilesystemModule(module) + initFilesystemModule(module, module) return module } -func initFilesystemModule(module *filesystem) { - module.AddProperties(&module.properties) - android.InitPackageModule(module) - module.PackagingBase.DepsCollectFirstTargetOnly = true +func initFilesystemModule(module android.DefaultableModule, filesystemModule *filesystem) { + module.AddProperties(&filesystemModule.properties) + android.InitPackageModule(filesystemModule) + filesystemModule.PackagingBase.DepsCollectFirstTargetOnly = true android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon) android.InitDefaultableModule(module) } @@ -335,7 +332,7 @@ func (f *filesystem) copyPackagingSpecs(ctx android.ModuleContext, builder *andr } func (f *filesystem) copyFilesToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) { - if !proptools.Bool(f.properties.Update_product_out) { + if f.Name() != ctx.Config().SoongDefinedSystemImage() { return } installPath := android.PathForModuleInPartitionInstall(ctx, f.partitionName()) |