diff options
Diffstat (limited to 'filesystem/filesystem.go')
| -rw-r--r-- | filesystem/filesystem.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index c6181bc15..2b3fbaeac 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -46,7 +46,10 @@ func filesystemFactory() android.Module { return module } -var dependencyTag = struct{ blueprint.BaseDependencyTag }{} +var dependencyTag = struct { + blueprint.BaseDependencyTag + android.InstallAlwaysNeededDependencyTag +}{} func (f *filesystem) DepsMutator(ctx android.BottomUpMutatorContext) { f.AddDeps(ctx, dependencyTag) @@ -80,7 +83,7 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { Text(">").Output(propFile). Implicit(mkuserimg) - f.output = android.PathForModuleOut(ctx, "filesystem.img").OutputPath + f.output = android.PathForModuleOut(ctx, f.installFileName()).OutputPath builder.Command().BuiltTool("build_image"). Text(rootDir.String()). // input directory Input(propFile). @@ -109,3 +112,16 @@ func (f *filesystem) AndroidMkEntries() []android.AndroidMkEntries { }, }} } + +// Filesystem is the public interface for the filesystem struct. Currently, it's only for the apex +// package to have access to the output file. +type Filesystem interface { + android.Module + OutputPath() android.Path +} + +var _ Filesystem = (*filesystem)(nil) + +func (f *filesystem) OutputPath() android.Path { + return f.output +} |