summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2021-06-29 09:07:29 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2021-06-29 09:07:29 -0700
commit969dae11ce21fe29a09f6260015df0d3a25b6060 (patch)
treefb502a9805afddb262b78a67786c0bb2e989d7d6
parentb5520d4eb1117007895c05ea163c78fa361fc5f7 (diff)
parentdd9c346c0435511429ebd833af7f25ba626c2a04 (diff)
Merge "QcomModulePkg: Moving androidboot.slot_suffix param"
-rw-r--r--QcomModulePkg/Library/BootLib/UpdateCmdLine.c24
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 () &&