Merge "Handle "hardware" bootconfig parameter as "androidboot.hardware"" am: 394a1ede40 am: 330ade5851
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1624139 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id9ac4e15b432086b7ceca9bf5e474d92a5b4fe02
This commit is contained in:
commit
0ca6f1617b
3 changed files with 12 additions and 2 deletions
|
|
@ -91,6 +91,12 @@ bool fs_mgr_get_boot_config_from_bootconfig(const std::string& bootconfig,
|
||||||
if (key == bootconfig_key) {
|
if (key == bootconfig_key) {
|
||||||
*out_val = value;
|
*out_val = value;
|
||||||
return true;
|
return true;
|
||||||
|
} else if (android_key == "hardware" && android_key == key) {
|
||||||
|
// bootconfig doesn't allow subkeys and values to coexist, so
|
||||||
|
// "androidboot.hardware" cannot be used. It is replaced in
|
||||||
|
// bootconfig with "hardware"
|
||||||
|
*out_val = value;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ const std::string bootconfig =
|
||||||
"androidboot.serialno = \"BLAHBLAHBLAH\"\n"
|
"androidboot.serialno = \"BLAHBLAHBLAH\"\n"
|
||||||
"androidboot.slot_suffix = \"_a\"\n"
|
"androidboot.slot_suffix = \"_a\"\n"
|
||||||
"androidboot.hardware.platform = \"sdw813\"\n"
|
"androidboot.hardware.platform = \"sdw813\"\n"
|
||||||
"androidboot.hardware = \"foo\"\n"
|
"hardware = \"foo\"\n"
|
||||||
"androidboot.revision = \"EVT1.0\"\n"
|
"androidboot.revision = \"EVT1.0\"\n"
|
||||||
"androidboot.bootloader = \"burp-0.1-7521\"\n"
|
"androidboot.bootloader = \"burp-0.1-7521\"\n"
|
||||||
"androidboot.hardware.sku = \"mary\"\n"
|
"androidboot.hardware.sku = \"mary\"\n"
|
||||||
|
|
@ -159,7 +159,7 @@ const std::vector<std::pair<std::string, std::string>> bootconfig_result_space =
|
||||||
{"androidboot.serialno", "BLAHBLAHBLAH"},
|
{"androidboot.serialno", "BLAHBLAHBLAH"},
|
||||||
{"androidboot.slot_suffix", "_a"},
|
{"androidboot.slot_suffix", "_a"},
|
||||||
{"androidboot.hardware.platform", "sdw813"},
|
{"androidboot.hardware.platform", "sdw813"},
|
||||||
{"androidboot.hardware", "foo"},
|
{"hardware", "foo"},
|
||||||
{"androidboot.revision", "EVT1.0"},
|
{"androidboot.revision", "EVT1.0"},
|
||||||
{"androidboot.bootloader", "burp-0.1-7521"},
|
{"androidboot.bootloader", "burp-0.1-7521"},
|
||||||
{"androidboot.hardware.sku", "mary"},
|
{"androidboot.hardware.sku", "mary"},
|
||||||
|
|
|
||||||
|
|
@ -1184,6 +1184,10 @@ static void ProcessBootconfig() {
|
||||||
ImportBootconfig([&](const std::string& key, const std::string& value) {
|
ImportBootconfig([&](const std::string& key, const std::string& value) {
|
||||||
if (StartsWith(key, "androidboot.")) {
|
if (StartsWith(key, "androidboot.")) {
|
||||||
InitPropertySet("ro.boot." + key.substr(12), value);
|
InitPropertySet("ro.boot." + key.substr(12), value);
|
||||||
|
} else if (key == "hardware") {
|
||||||
|
// "hardware" in bootconfig replaces "androidboot.hardware" kernel
|
||||||
|
// cmdline parameter
|
||||||
|
InitPropertySet("ro.boot." + key, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue