summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/aconfig_files.go1
-rw-r--r--filesystem/filesystem.go21
-rw-r--r--filesystem/system_image.go10
-rw-r--r--filesystem/vbmeta.go24
4 files changed, 28 insertions, 28 deletions
diff --git a/filesystem/aconfig_files.go b/filesystem/aconfig_files.go
index 5c047bc83..8af2ffaab 100644
--- a/filesystem/aconfig_files.go
+++ b/filesystem/aconfig_files.go
@@ -79,6 +79,7 @@ func (f *filesystem) buildAconfigFlagsFiles(ctx android.ModuleContext, builder *
generatePartitionAconfigStorageFile("package_map", "package.map")
generatePartitionAconfigStorageFile("flag_map", "flag.map")
generatePartitionAconfigStorageFile("flag_val", "flag.val")
+ generatePartitionAconfigStorageFile("flag_info", "flag.info")
android.WriteExecutableFileRuleVerbatim(ctx, aconfigFlagsBuilderPath, sb.String())
}
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())
diff --git a/filesystem/system_image.go b/filesystem/system_image.go
index a8fd36822..57239ae3f 100644
--- a/filesystem/system_image.go
+++ b/filesystem/system_image.go
@@ -27,21 +27,25 @@ type systemImage struct {
type systemImageProperties struct {
// Path to the input linker config json file.
- Linker_config_src *string
+ Linker_config_src *string `android:"path"`
}
// android_system_image is a specialization of android_filesystem for the 'system' partition.
// Currently, the only difference is the inclusion of linker.config.pb file which specifies
// the provided and the required libraries to and from APEXes.
-func systemImageFactory() android.Module {
+func SystemImageFactory() android.Module {
module := &systemImage{}
module.AddProperties(&module.properties)
module.filesystem.buildExtraFiles = module.buildExtraFiles
module.filesystem.filterPackagingSpec = module.filterPackagingSpec
- initFilesystemModule(&module.filesystem)
+ initFilesystemModule(module, &module.filesystem)
return module
}
+func (s systemImage) FsProps() FilesystemProperties {
+ return s.filesystem.properties
+}
+
func (s *systemImage) buildExtraFiles(ctx android.ModuleContext, root android.OutputPath) android.OutputPaths {
if s.filesystem.properties.Partition_type != nil {
ctx.PropertyErrorf("partition_type", "partition_type must be unset on an android_system_image module. It is assumed to be 'system'.")
diff --git a/filesystem/vbmeta.go b/filesystem/vbmeta.go
index 3a9a64daa..1d647965a 100644
--- a/filesystem/vbmeta.go
+++ b/filesystem/vbmeta.go
@@ -213,6 +213,7 @@ func (v *vbmeta) GenerateAndroidBuildActions(ctx android.ModuleContext) {
ctx.InstallFile(v.installDir, v.installFileName(), v.output)
ctx.SetOutputFiles([]android.Path{v.output}, "")
+ android.SetProvider(ctx, android.AndroidMkInfoProvider, v.prepareAndroidMKProviderInfo())
}
// Returns the embedded shell command that prints the rollback index
@@ -265,20 +266,17 @@ func (v *vbmeta) extractPublicKeys(ctx android.ModuleContext) map[string]android
return result
}
-var _ android.AndroidMkEntriesProvider = (*vbmeta)(nil)
-
-// Implements android.AndroidMkEntriesProvider
-func (v *vbmeta) AndroidMkEntries() []android.AndroidMkEntries {
- return []android.AndroidMkEntries{android.AndroidMkEntries{
- Class: "ETC",
- OutputFile: android.OptionalPathForPath(v.output),
- ExtraEntries: []android.AndroidMkExtraEntriesFunc{
- func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
- entries.SetString("LOCAL_MODULE_PATH", v.installDir.String())
- entries.SetString("LOCAL_INSTALLED_MODULE_STEM", v.installFileName())
- },
+func (v *vbmeta) prepareAndroidMKProviderInfo() *android.AndroidMkProviderInfo {
+ providerData := android.AndroidMkProviderInfo{
+ PrimaryInfo: android.AndroidMkInfo{
+ Class: "ETC",
+ OutputFile: android.OptionalPathForPath(v.output),
+ EntryMap: make(map[string][]string),
},
- }}
+ }
+ providerData.PrimaryInfo.SetString("LOCAL_MODULE_PATH", v.installDir.String())
+ providerData.PrimaryInfo.SetString("LOCAL_INSTALLED_MODULE_STEM", v.installFileName())
+ return &providerData
}
var _ Filesystem = (*vbmeta)(nil)