Skip invalid slot_suffix argument

Many Amlogic devices (e.g. FireTV 2nd gen Cube, Vero 4k+, MI Smart Speaker, etc.) are A-only with androidboot.slot_suffix=normal argument. I think "normal" actually means A-only in this case so just ignore it.

Fix topjohnwu#5806
This commit is contained in:
残页 2022-05-10 11:57:14 +08:00 committed by John Wu
parent 575c417403
commit 7505599ea0

View File

@ -163,6 +163,11 @@ void setup_klog() {
void BootConfig::set(const kv_pairs &kv) {
for (const auto &[key, value] : kv) {
if (key == "androidboot.slot_suffix") {
// Many Amlogic devices are A-only but have slot_suffix...
if (value == "normal") {
LOGW("Skip invalid androidboot.slot_suffix=[normal]\n");
continue;
}
strlcpy(slot, value.data(), sizeof(slot));
} else if (key == "androidboot.slot") {
slot[0] = '_';