From c49b85e5d8eb338601e1d96a06ba4c39076fdd72 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Fri, 10 Jan 2025 00:51:25 +0000 Subject: 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 --- filesystem/filesystem.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'filesystem/filesystem.go') diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index b112568f6..0534635f7 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -215,6 +215,9 @@ type FilesystemProperties struct { // 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) fsType(ctx android.ModuleContext) fsType { } func (f *filesystem) installFileName() string { - return f.BaseModuleName() + ".img" + return proptools.StringDefault(f.properties.Stem, f.BaseModuleName()+".img") } func (f *filesystem) partitionName() string { -- cgit v1.2.3-59-g8ed1b