diff options
Diffstat (limited to 'filesystem')
-rw-r--r-- | filesystem/aconfig_files.go | 11 | ||||
-rw-r--r-- | filesystem/filesystem.go | 25 |
2 files changed, 30 insertions, 6 deletions
diff --git a/filesystem/aconfig_files.go b/filesystem/aconfig_files.go index 8af2ffaab..608fccdad 100644 --- a/filesystem/aconfig_files.go +++ b/filesystem/aconfig_files.go @@ -76,10 +76,13 @@ func (f *filesystem) buildAconfigFlagsFiles(ctx android.ModuleContext, builder * cmd.ImplicitOutput(outputPath) f.appendToEntry(ctx, outputPath) } - generatePartitionAconfigStorageFile("package_map", "package.map") - generatePartitionAconfigStorageFile("flag_map", "flag.map") - generatePartitionAconfigStorageFile("flag_val", "flag.val") - generatePartitionAconfigStorageFile("flag_info", "flag.info") + + if ctx.Config().ReleaseCreateAconfigStorageFile() { + 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 a26fac7fc..09d8fba5e 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -35,7 +35,7 @@ func init() { } func registerBuildComponents(ctx android.RegistrationContext) { - ctx.RegisterModuleType("android_filesystem", filesystemFactory) + ctx.RegisterModuleType("android_filesystem", FilesystemFactory) ctx.RegisterModuleType("android_filesystem_defaults", filesystemDefaultsFactory) ctx.RegisterModuleType("android_system_image", SystemImageFactory) ctx.RegisterModuleType("avb_add_hash_footer", avbAddHashFooterFactory) @@ -137,6 +137,12 @@ type FilesystemProperties struct { Gen_aconfig_flags_pb *bool Fsverity fsverityProperties + + // If this property is set to true, the filesystem will call ctx.UncheckedModule(), causing + // it to not be built on checkbuilds. Used for the automatic migration from make to soong + // build modules, where we want to emit some not-yet-working filesystems and we don't want them + // to be built. + Unchecked_module *bool `blueprint:"mutated"` } // android_filesystem packages a set of modules and their transitive dependencies into a filesystem @@ -144,7 +150,7 @@ type FilesystemProperties struct { // modules in the filesystem image are built for the target device (i.e. Android, not Linux host). // The modules are placed in the filesystem image just like they are installed to the ordinary // partitions like system.img. For example, cc_library modules are placed under ./lib[64] directory. -func filesystemFactory() android.Module { +func FilesystemFactory() android.Module { module := &filesystem{} module.filterPackagingSpec = module.filterInstallablePackagingSpec initFilesystemModule(module, module) @@ -177,6 +183,13 @@ const ( unknown ) +type FilesystemInfo struct { + // A text file containing the list of paths installed on the partition. + FileListFile android.Path +} + +var FilesystemProvider = blueprint.NewProvider[FilesystemInfo]() + func (f *filesystem) fsType(ctx android.ModuleContext) fsType { typeStr := proptools.StringDefault(f.properties.Type, "ext4") switch typeStr { @@ -227,6 +240,14 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { f.fileListFile = android.PathForModuleOut(ctx, "fileList").OutputPath android.WriteFileRule(ctx, f.fileListFile, f.installedFilesList()) + + android.SetProvider(ctx, FilesystemProvider, FilesystemInfo{ + FileListFile: f.fileListFile, + }) + + if proptools.Bool(f.properties.Unchecked_module) { + ctx.UncheckedModule() + } } func (f *filesystem) appendToEntry(ctx android.ModuleContext, installedFile android.OutputPath) { |