summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 9c828e3a3..1861d8e7a 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -467,6 +467,7 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) {
FileListFile: fileListFile,
RootDir: rootDir,
})
+
f.fileListFile = fileListFile
if proptools.Bool(f.properties.Unchecked_module) {
@@ -601,11 +602,16 @@ func (f *filesystem) copyPackagingSpecs(ctx android.ModuleContext, builder *andr
}
func (f *filesystem) copyFilesToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) {
- if f.Name() != ctx.Config().SoongDefinedSystemImage() {
+ if !(f.Name() == ctx.Config().SoongDefinedSystemImage() || proptools.Bool(f.properties.Is_auto_generated)) {
return
}
installPath := android.PathForModuleInPartitionInstall(ctx, f.partitionName())
- builder.Command().Textf("cp -prf %s/* %s", rebasedDir, installPath)
+ builder.Command().Textf("rsync --checksum %s %s", rebasedDir, installPath)
+}
+
+func copyImageFileToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, partition string, output android.Path) {
+ copyDir := android.PathForModuleInPartitionInstall(ctx, "").Join(ctx, fmt.Sprintf("%s.img", partition))
+ builder.Command().Textf("rsync -a %s %s", output, copyDir)
}
func (f *filesystem) rootDirString() string {
@@ -659,6 +665,10 @@ func (f *filesystem) buildImageUsingBuildImage(ctx android.ModuleContext) (andro
Output(output).
Text(rootDir.String()) // directory where to find fs_config_files|dirs
+ if !ctx.Config().KatiEnabled() {
+ copyImageFileToProductOut(ctx, builder, f.partitionName(), output)
+ }
+
// rootDir is not deleted. Might be useful for quick inspection.
builder.Build("build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))