Make dirs a configurable property
The microdroid system image customizes dirs using soong config variables, make it configurable so that selects can be used instead. Bug: 342006386 Test: Presubmits Change-Id: I4fbf4dc0a04ad1d1f6539476408606028390cd64
This commit is contained in:
parent
e0d5ea1d7c
commit
d9c6a5b802
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ type filesystemProperties struct {
|
||||||
Base_dir *string
|
Base_dir *string
|
||||||
|
|
||||||
// Directories to be created under root. e.g. /dev, /proc, etc.
|
// Directories to be created under root. e.g. /dev, /proc, etc.
|
||||||
Dirs []string
|
Dirs proptools.Configurable[[]string]
|
||||||
|
|
||||||
// Symbolic links to be created under root with "ln -sf <target> <name>".
|
// Symbolic links to be created under root with "ln -sf <target> <name>".
|
||||||
Symlinks []symlinkDefinition
|
Symlinks []symlinkDefinition
|
||||||
|
@ -243,7 +243,7 @@ func validatePartitionType(ctx android.ModuleContext, p partition) {
|
||||||
// already in `rootDir`.
|
// already in `rootDir`.
|
||||||
func (f *filesystem) buildNonDepsFiles(ctx android.ModuleContext, builder *android.RuleBuilder, rootDir android.OutputPath) {
|
func (f *filesystem) buildNonDepsFiles(ctx android.ModuleContext, builder *android.RuleBuilder, rootDir android.OutputPath) {
|
||||||
// create dirs and symlinks
|
// create dirs and symlinks
|
||||||
for _, dir := range f.properties.Dirs {
|
for _, dir := range f.properties.Dirs.GetOrDefault(ctx, nil) {
|
||||||
// OutputPath.Join verifies dir
|
// OutputPath.Join verifies dir
|
||||||
builder.Command().Text("mkdir -p").Text(rootDir.Join(ctx, dir).String())
|
builder.Command().Text("mkdir -p").Text(rootDir.Join(ctx, dir).String())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue