diff options
author | qctecmdr <qctecmdr@localhost> | 2021-06-29 09:07:29 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-06-29 09:07:29 -0700 |
commit | 969dae11ce21fe29a09f6260015df0d3a25b6060 (patch) | |
tree | fb502a9805afddb262b78a67786c0bb2e989d7d6 | |
parent | b5520d4eb1117007895c05ea163c78fa361fc5f7 (diff) | |
parent | dd9c346c0435511429ebd833af7f25ba626c2a04 (diff) |
Merge "QcomModulePkg: Moving androidboot.slot_suffix param"
-rw-r--r-- | QcomModulePkg/Library/BootLib/UpdateCmdLine.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/QcomModulePkg/Library/BootLib/UpdateCmdLine.c b/QcomModulePkg/Library/BootLib/UpdateCmdLine.c index 877804e41f..d47b567a3a 100644 --- a/QcomModulePkg/Library/BootLib/UpdateCmdLine.c +++ b/QcomModulePkg/Library/BootLib/UpdateCmdLine.c @@ -575,13 +575,23 @@ UpdateCmdLineParams (UpdateCmdLineParamList *Param, if (Param->MultiSlotBoot && !IsBootDevImage ()) { /* Slot suffix */ - Src = Param->AndroidSlotSuffix; - AsciiStrCatS (Dst, MaxCmdLineLen, Src); + if (Param->HeaderVersion <= BOOT_HEADER_VERSION_THREE) { + Src = Param->AndroidSlotSuffix; + AsciiStrCatS (Dst, MaxCmdLineLen, Src); + } UnicodeStrToAsciiStr (GetCurrentSlotSuffix ().Suffix, Param->SlotSuffixAscii); - Src = Param->SlotSuffixAscii; - AsciiStrCatS (Dst, MaxCmdLineLen, Src); + if (Param->HeaderVersion <= BOOT_HEADER_VERSION_THREE) { + Src = Param->SlotSuffixAscii; + AsciiStrCatS (Dst, MaxCmdLineLen, Src); + } else { + AddtoBootConfigList (BootConfigFlag, Param->AndroidSlotSuffix, + Param->SlotSuffixAscii, + BootConfigListHead, + AsciiStrLen (Param->AndroidSlotSuffix), + AsciiStrLen (Param->SlotSuffixAscii)); + } } if ((IsBuildAsSystemRootImage () && @@ -1035,7 +1045,11 @@ UpdateCmdLine (CONST CHAR8 *CmdLine, if (MultiSlotBoot && !IsBootDevImage ()) { /* Add additional length for slot suffix */ - CmdLineLen += AsciiStrLen (AndroidSlotSuffix) + MAX_SLOT_SUFFIX_SZ; + ParamLen = AsciiStrLen (AndroidSlotSuffix) + MAX_SLOT_SUFFIX_SZ; + BootConfigFlag = IsAndroidBootParam (AndroidSlotSuffix, + ParamLen, HeaderVersion); + ADD_PARAM_LEN (BootConfigFlag, ParamLen, CmdLineLen, + BootConfigLen); } if ((IsBuildAsSystemRootImage () && |