Merge "Package META/system_other_filesystem_config.txt" into main
diff --git a/filesystem/system_other.go b/filesystem/system_other.go
index 5309e90..cbfd78b 100644
--- a/filesystem/system_other.go
+++ b/filesystem/system_other.go
@@ -172,9 +172,10 @@
builder.Build("build_system_other_hermetic", "build system other")
fsInfo := FilesystemInfo{
- Output: output,
- OutputHermetic: outputHermetic,
- RootDir: stagingDir,
+ Output: output,
+ OutputHermetic: outputHermetic,
+ RootDir: stagingDir,
+ FilesystemConfig: m.generateFilesystemConfig(ctx, stagingDir, stagingDirTimestamp),
}
android.SetProvider(ctx, FilesystemProvider, fsInfo)
@@ -183,6 +184,20 @@
ctx.CheckbuildFile(output)
}
+func (s *systemOtherImage) generateFilesystemConfig(ctx android.ModuleContext, stagingDir, stagingDirTimestamp android.Path) android.Path {
+ out := android.PathForModuleOut(ctx, "filesystem_config.txt")
+ ctx.Build(pctx, android.BuildParams{
+ Rule: fsConfigRule,
+ Input: stagingDirTimestamp, // assemble the staging directory
+ Output: out,
+ Args: map[string]string{
+ "rootDir": stagingDir.String(),
+ "prefix": "system/",
+ },
+ })
+ return out
+}
+
func (f *systemOtherImage) propFileForHermeticImg(ctx android.ModuleContext, builder *android.RuleBuilder, inputPropFile android.Path) android.Path {
propFilePinnedTimestamp := android.PathForModuleOut(ctx, "for_target_files", "prop")
builder.Command().Textf("cat").Input(inputPropFile).Flag(">").Output(propFilePinnedTimestamp).