diff options
author | 2025-01-08 17:10:03 -0800 | |
---|---|---|
committer | 2025-01-08 17:10:03 -0800 | |
commit | e525ef76bf5f2d09674ce672a21a21e7e92da357 (patch) | |
tree | a7437bd27e76cfb19f38d27994c99279b6792fa6 /filesystem/filesystem.go | |
parent | 9b0233409474248210646735308841b5c53caedd (diff) | |
parent | e90cebec929b320d7d7315c90906bd8167574bd8 (diff) |
Merge changes I68c6319a,I21c9ddc2 into main
* changes:
Update $PRODUCT_OUT for auto generated partitions
Copy partition image files to PRODUCT_OUT
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index bd8018b80..64b79319f 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -593,11 +593,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 { @@ -651,6 +656,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())) |