diff options
author | 2025-01-10 00:51:25 +0000 | |
---|---|---|
committer | 2025-01-10 00:57:34 +0000 | |
commit | c49b85e5d8eb338601e1d96a06ba4c39076fdd72 (patch) | |
tree | a6de96232ed7dab6c525efb58ac85fc8917e95a9 /filesystem/filesystem.go | |
parent | 3ec6d067389a74ea01b86e6cc16c8cfb5ba14afc (diff) |
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
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |