summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghavendra Rao Ananta <rananta@codeaurora.org>2020-01-13 18:20:02 -0800
committerAmit Pundir <amit.pundir@linaro.org>2020-12-14 13:14:22 +0530
commit9a50b116fcfcd1fa0a7a560b7a2de6b1fa00bee6 (patch)
tree2c2273c2edf59164d54e0ad1cc8c5c6a16a68cd5
parent7f217df25f4cbdae385606d218d0c460c504590d (diff)
QcomModulePkg: Rename the partition to vendor_boot
(cherry picked from commit c3668a21695731454239daa8d5aee8e0660e5752) https://source.codeaurora.org/quic/la/abl/tianocore/edk2/log/?h=LA.UM.9.12.r1-08000-SMxx50.0 For the boot-image header v3, the image that's generated is named vendor_boot.img. Hence, keeping with the consistency, the partition is named "vendor_boot". However, the bootloader refers to the partition as "vendor-boot" (with a hiphen). Hence, rename the references to match the partition name. Change-Id: I4dce7a376d43acaa34cb0d14fc3a3a669d6a295c Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--QcomModulePkg/Include/Library/BootLinux.h2
-rw-r--r--QcomModulePkg/Library/BootLib/BootLinux.c10
-rw-r--r--QcomModulePkg/Library/BootLib/LocateDeviceTree.c4
-rw-r--r--QcomModulePkg/Library/avb/VerifiedBoot.c22
4 files changed, 19 insertions, 19 deletions
diff --git a/QcomModulePkg/Include/Library/BootLinux.h b/QcomModulePkg/Include/Library/BootLinux.h
index c048af925a..42d0882a1c 100644
--- a/QcomModulePkg/Include/Library/BootLinux.h
+++ b/QcomModulePkg/Include/Library/BootLinux.h
@@ -174,7 +174,7 @@ typedef struct BootLinuxParamlist {
UINT32 PatchedKernelHdrSize;
UINT32 DtbOffset;
- // Get the below fields info from the vendor-boot image header
+ // Get the below fields info from the vendor_boot image header
// Valid only for boot image header version greater than 2
UINT32 VendorRamdiskSize;
diff --git a/QcomModulePkg/Library/BootLib/BootLinux.c b/QcomModulePkg/Library/BootLib/BootLinux.c
index d1ff523fd0..cf28a1d402 100644
--- a/QcomModulePkg/Library/BootLib/BootLinux.c
+++ b/QcomModulePkg/Library/BootLib/BootLinux.c
@@ -452,7 +452,7 @@ DTBImgCheckAndAppendDT (BootInfo *Info, BootParamlist *BootParamlistPtr)
ImageSize = VendorBootImgHdrV3->dtb_size +
BootParamlistPtr->DtbOffset;
- // DTB is a part of vendor-boot image
+ // DTB is a part of vendor_boot image
ImageBuffer = BootParamlistPtr->VendorImageBuffer;
}
}
@@ -1039,7 +1039,7 @@ CatCmdLine (BootParamlist *BootParamlistPtr,
return EFI_OUT_OF_RESOURCES;
}
- /* Place the vendor-boot image cmdline first so that the cmdline
+ /* Place the vendor_boot image cmdline first so that the cmdline
* from boot image takes precedence in case of duplicates.
*/
AsciiStrCpyS (BootParamlistPtr->CmdLine, MaxCmdLineLen,
@@ -1078,10 +1078,10 @@ UpdateBootParamsSizeAndCmdLine (BootInfo *Info, BootParamlist *BootParamlistPtr)
BootImgHdrV3 = BootParamlistPtr->ImageBuffer;
Status = GetImage (Info, (VOID **)&VendorBootImgHdrV3,
- &VendorBootImgSize, "vendor-boot");
+ &VendorBootImgSize, "vendor_boot");
if (Status != EFI_SUCCESS) {
DEBUG ((EFI_D_ERROR,
- "UpdateBootParamsSizeAndCmdLine: Failed to find vendor-boot image\n"));
+ "UpdateBootParamsSizeAndCmdLine: Failed to find vendor_boot image\n"));
return Status;
}
@@ -1459,7 +1459,7 @@ CheckImageHeader (VOID *ImageHdrBuffer,
if (CompareMem ((VOID *)((vendor_boot_img_hdr_v3 *)
(VendorImageHdrBuffer))->magic,
VENDOR_BOOT_MAGIC, VENDOR_BOOT_MAGIC_SIZE)) {
- DEBUG ((EFI_D_ERROR, "Invalid vendor-boot image header\n"));
+ DEBUG ((EFI_D_ERROR, "Invalid vendor_boot image header\n"));
return EFI_NO_MEDIA;
}
diff --git a/QcomModulePkg/Library/BootLib/LocateDeviceTree.c b/QcomModulePkg/Library/BootLib/LocateDeviceTree.c
index 3d4db2ccb0..cab043bfda 100644
--- a/QcomModulePkg/Library/BootLib/LocateDeviceTree.c
+++ b/QcomModulePkg/Library/BootLib/LocateDeviceTree.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -914,7 +914,7 @@ cleanup:
/*
* For Header Version 2, the arguments Kernel and KernelSize will be
* the entire bootimage and the bootimage size.
- * For Header Version 3, Kernel holds the base of the vendor-boot
+ * For Header Version 3, Kernel holds the base of the vendor_boot
* image and KernelSize holds its size.
*/
VOID *
diff --git a/QcomModulePkg/Library/avb/VerifiedBoot.c b/QcomModulePkg/Library/avb/VerifiedBoot.c
index ce6a066fe7..c08e4280ae 100644
--- a/QcomModulePkg/Library/avb/VerifiedBoot.c
+++ b/QcomModulePkg/Library/avb/VerifiedBoot.c
@@ -53,7 +53,7 @@ static CHAR8 *avb_verify_partition_name[] = {
"vbmeta",
"recovery",
"vm-linux",
- "vendor-boot"
+ "vendor_boot"
};
STATIC struct verified_boot_verity_mode VbVm[] = {
@@ -296,9 +296,9 @@ NoAVBLoadVendorBootImage (BootInfo *Info)
Status = NoAVBLoadReqImage (Info,
(VOID **)&(Info->Images[ImgIdx].ImageBuffer),
(UINT32 *)&(Info->Images[ImgIdx].ImageSize),
- Pname, (CHAR16 *)L"vendor-boot");
+ Pname, (CHAR16 *)L"vendor_boot");
if (Status == EFI_NO_MEDIA) {
- DEBUG ((EFI_D_INFO, "No vendor-boot partition is found, Skipping\n"));
+ DEBUG ((EFI_D_INFO, "No vendor_boot partition is found, Skipping\n"));
if (Info->Images[ImgIdx].ImageBuffer != NULL) {
FreePool (Info->Images[ImgIdx].ImageBuffer);
}
@@ -306,7 +306,7 @@ NoAVBLoadVendorBootImage (BootInfo *Info)
}
else if (Status != EFI_SUCCESS) {
DEBUG ((EFI_D_ERROR,
- "ERROR: Failed to load vendor-boot from partition: %r\n", Status));
+ "ERROR: Failed to load vendor_boot from partition: %r\n", Status));
if (Info->Images[ImgIdx].ImageBuffer != NULL) {
goto Err;
}
@@ -337,7 +337,7 @@ LoadVendorBootImageHeader (BootInfo *Info,
CHAR16 Pname[MAX_GPT_NAME_SIZE] = {0};
StrnCpyS (Pname, ARRAY_SIZE (Pname),
- (CHAR16 *)L"vendor-boot", StrLen ((CHAR16 *)L"vendor-boot"));
+ (CHAR16 *)L"vendor_boot", StrLen ((CHAR16 *)L"vendor_boot"));
if (Info->MultiSlotBoot) {
GUARD (StrnCatS (Pname, ARRAY_SIZE (Pname),
@@ -388,7 +388,7 @@ LoadBootImageNoAuth (BootInfo *Info, UINT32 *PageSize, BOOLEAN *FastbootPath)
Info->HeaderVersion = ((boot_img_hdr *)(ImageHdrBuffer))->header_version;
- /* Additional vendor-boot image header needs be loaded for header
+ /* Additional vendor_boot image header needs be loaded for header
* versions than 3. Consider both the headers for validation.
*/
if (Info->HeaderVersion >= BOOT_HEADER_VERSION_THREE) {
@@ -396,7 +396,7 @@ LoadBootImageNoAuth (BootInfo *Info, UINT32 *PageSize, BOOLEAN *FastbootPath)
&VendorImageHdrSize);
if (Status != EFI_SUCCESS) {
DEBUG ((EFI_D_ERROR,
- "ERROR: Failed to load vendor-boot Image header: %r\n", Status));
+ "ERROR: Failed to load vendor_boot Image header: %r\n", Status));
goto ErrV3;
}
}
@@ -436,7 +436,7 @@ LoadBootImageNoAuth (BootInfo *Info, UINT32 *PageSize, BOOLEAN *FastbootPath)
Status = NoAVBLoadVendorBootImage (Info);
if (Status != EFI_SUCCESS) {
DEBUG ((EFI_D_ERROR,
- "ERROR: Failed to load vendor-boot Image : %r\n", Status));
+ "ERROR: Failed to load vendor_boot Image : %r\n", Status));
goto ErrImgName;
}
}
@@ -1237,11 +1237,11 @@ LoadImageAndAuthVB2 (BootInfo *Info)
}
}
- if (IsValidPartition (&CurrentSlot, L"vendor-boot")) {
+ if (IsValidPartition (&CurrentSlot, L"vendor_boot")) {
AddRequestedPartition (RequestedPartitionAll, IMG_VENDOR_BOOT);
NumRequestedPartition += 1;
} else {
- DEBUG ((EFI_D_VERBOSE, "Invalid vendor-boot partition. Skipping\n"));
+ DEBUG ((EFI_D_VERBOSE, "Invalid vendor_boot partition. Skipping\n"));
}
Result = avb_slot_verify (Ops, (CONST CHAR8 *CONST *)RequestedPartition,
@@ -1336,7 +1336,7 @@ LoadImageAndAuthVB2 (BootInfo *Info)
if (BootImgHdr->header_version >= BOOT_HEADER_VERSION_THREE) {
GUARD_OUT (GetImage (Info, &VendorBootImageBuffer,
- &VendorBootImageSize, "vendor-boot"));
+ &VendorBootImageSize, "vendor_boot"));
}
Status = CheckImageHeader (ImageBuffer, ImageHdrSize,