Allow android_dt_dir to be set by bootconfig
The androidboot.android_dt_dir property is special, because it is loaded to find out where to get the other DT properties from, and those DT properties are supposed to override the cmdline/bootconfig ones. So, it need special casing, and that special case lacked bootconfig support. Bug: 173815685 Test: launch_cvd -extra_kernel_cmdline androidboot.android_dt_dir=/tmp [..] init: Using Android DT directory /tmp [..] Change-Id: Ie0958dd0a96394d65f6568653b754ea6f885212e
This commit is contained in:
parent
f0e39a9dfe
commit
3bb240bd4c
1 changed files with 9 additions and 0 deletions
|
|
@ -376,6 +376,15 @@ static std::string init_android_dt_dir() {
|
||||||
android_dt_dir = value;
|
android_dt_dir = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// ..Or bootconfig
|
||||||
|
if (android_dt_dir == kDefaultAndroidDtDir) {
|
||||||
|
ImportBootconfig([&](const std::string& key, const std::string& value) {
|
||||||
|
if (key == "androidboot.android_dt_dir") {
|
||||||
|
android_dt_dir = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
LOG(INFO) << "Using Android DT directory " << android_dt_dir;
|
LOG(INFO) << "Using Android DT directory " << android_dt_dir;
|
||||||
return android_dt_dir;
|
return android_dt_dir;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue