Add a Stem property to filesystem
If set, it will be used as the filename of the final .img artifact
instead of the $module_name +.img. The use case for this is to make the
filenames of the img files consistent in target_files.zip irrespective
of $TARGET_PRODUCT.
Test: built the filesystems locally
Bug: 388635097
Change-Id: I13310d609bb6170b52f92c284b933cee2a646254
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index b112568..0534635 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -215,6 +215,9 @@
// Additional dependencies used for building android products
Android_filesystem_deps AndroidFilesystemDeps
+
+ // Name of the output. Default is $(module_name).img
+ Stem *string
}
type AndroidFilesystemDeps struct {
@@ -384,7 +387,7 @@
}
func (f *filesystem) installFileName() string {
- return f.BaseModuleName() + ".img"
+ return proptools.StringDefault(f.properties.Stem, f.BaseModuleName()+".img")
}
func (f *filesystem) partitionName() string {