1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-07 16:59:30 +00:00

arm/edk2: update version and relocate edk2-basetools to be with edk2

Update to the latest version of EDK2.  There is an issue with memory not
being initialized and hanging boot.  So revert the patch that is causing
the issue until the proper solution can be found.

Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Jon Mason
2023-02-16 10:23:54 -05:00
parent dcc81b56ff
commit b39fc31d76
11 changed files with 398 additions and 47 deletions
@@ -10,7 +10,7 @@ LICENSE = "BSD-2-Clause-Patent"
SRC_URI = "git://github.com/tianocore/edk2.git;branch=master;protocol=https"
LIC_FILES_CHKSUM = "file://License.txt;md5=2b415520383f7964e96700ae12b4570a"
SRCREV = "fff6d81270b57ee786ea18ad74f43149b9f03494"
SRCREV = "f80f052277c88a67c55e107b550f504eeea947d3"
S = "${WORKDIR}/git"
@@ -18,7 +18,6 @@ SRCBRANCH_edk2_platforms = "master"
SRC_URI = "\
${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
file://unaligned.patch \
file://default.patch;patchdir=edk2-platforms \
"
@@ -7,6 +7,10 @@ COMPATIBLE_MACHINE:qemuarm64 = "qemuarm64"
EDK2_PLATFORM:qemuarm64 = "ArmVirtQemu-AARCH64"
EDK2_PLATFORM_DSC:qemuarm64 = "ArmVirtPkg/ArmVirtQemu.dsc"
EDK2_BIN_NAME:qemuarm64 = "QEMU_EFI.fd"
SRC_URI:append:qemuarm64 = " \
file://0001-Revert-ArmVirtPkg-QemuVirtMemInfoLib-use-HOB-not-PCD.patch \
file://0002-Revert-ArmVirtPkg-ArmVirtQemu-omit-PCD-PEIM-unless-T.patch \
"
COMPATIBLE_MACHINE:qemuarm = "qemuarm"
EDK2_PLATFORM:qemuarm = "ArmVirtQemu-ARM"
@@ -1,4 +0,0 @@
SRCREV_edk2 ?= "16779ede2d366bfc6b702e817356ccf43425bcc8"
SRCREV_edk2-platforms ?= "3b896d1a325686de3942723c42f286090453e37a"
require edk2-firmware.inc
@@ -0,0 +1,4 @@
SRCREV_edk2 ?= "f80f052277c88a67c55e107b550f504eeea947d3"
SRCREV_edk2-platforms ?= "65e001a7f2abedf7799cfb36b057326c1540bd47"
require edk2-firmware.inc
@@ -0,0 +1,290 @@
From 44b69c8d7c8ed665b4f8d8a9953ea23a731d221f Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Fri, 10 Mar 2023 18:46:49 +0000
Subject: [PATCH] Revert "ArmVirtPkg/QemuVirtMemInfoLib: use HOB not PCD to
record the memory size"
This reverts commit 7136d5491e225c57f1d73e4a1b7ac27ed656ff72.
Upstream-Status: Inappropriate [other]
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
ArmVirtPkg/ArmVirtPkg.dec | 1 -
ArmVirtPkg/ArmVirtQemu.dsc | 6 ++--
.../ArmVirtMemoryInitPeiLib.c | 14 ++------
.../ArmVirtMemoryInitPeiLib.inf | 1 -
.../QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 35 ++-----------------
.../QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf | 5 +--
.../QemuVirtMemInfoPeiLib.inf | 8 ++---
.../QemuVirtMemInfoPeiLibConstructor.c | 30 +++++++---------
8 files changed, 25 insertions(+), 75 deletions(-)
diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec
index 4645c91a83..d2d325d71e 100644
--- a/ArmVirtPkg/ArmVirtPkg.dec
+++ b/ArmVirtPkg/ArmVirtPkg.dec
@@ -32,7 +32,6 @@
gArmVirtTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } }
gEarlyPL011BaseAddressGuid = { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } }
gEarly16550UartBaseAddressGuid = { 0xea67ca3e, 0x1f54, 0x436b, { 0x97, 0x88, 0xd4, 0xeb, 0x29, 0xc3, 0x42, 0x67 } }
- gArmVirtSystemMemorySizeGuid = { 0x504eccb9, 0x1bf0, 0x4420, { 0x86, 0x5d, 0xdc, 0x66, 0x06, 0xd4, 0x13, 0xbf } }
[PcdsFeatureFlag]
#
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 72a0cacab4..2e786dad12 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -226,9 +226,6 @@
# Shadowing PEI modules is absolutely pointless when the NOR flash is emulated
gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnBoot|FALSE
- # System Memory Size -- 128 MB initially, actual size will be fetched from DT
- gArmTokenSpaceGuid.PcdSystemMemorySize|0x8000000
-
[PcdsFixedAtBuild.AARCH64]
# Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
# if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
@@ -245,6 +242,9 @@
# enumeration to complete before installing ACPI tables.
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
+ # System Memory Size -- 1 MB initially, actual size will be fetched from DT
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x00100000
+
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c
index 72e5c65af7..98d90ad420 100644
--- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c
+++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c
@@ -52,19 +52,10 @@ MemoryPeim (
{
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes;
UINT64 SystemMemoryTop;
- UINT64 SystemMemorySize;
- VOID *Hob;
// Ensure PcdSystemMemorySize has been set
ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);
- SystemMemorySize = PcdGet64 (PcdSystemMemorySize);
-
- Hob = GetFirstGuidHob (&gArmVirtSystemMemorySizeGuid);
- if (Hob != NULL) {
- SystemMemorySize = *(UINT64 *)GET_GUID_HOB_DATA (Hob);
- }
-
//
// Now, the permanent memory has been installed, we can call AllocatePages()
//
@@ -75,7 +66,8 @@ MemoryPeim (
EFI_RESOURCE_ATTRIBUTE_TESTED
);
- SystemMemoryTop = PcdGet64 (PcdSystemMemoryBase) + SystemMemorySize;
+ SystemMemoryTop = PcdGet64 (PcdSystemMemoryBase) +
+ PcdGet64 (PcdSystemMemorySize);
if (SystemMemoryTop - 1 > MAX_ALLOC_ADDRESS) {
BuildResourceDescriptorHob (
@@ -95,7 +87,7 @@ MemoryPeim (
EFI_RESOURCE_SYSTEM_MEMORY,
ResourceAttributes,
PcdGet64 (PcdSystemMemoryBase),
- SystemMemorySize
+ PcdGet64 (PcdSystemMemorySize)
);
}
diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf
index 48d9c66b22..21327f79f4 100644
--- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf
@@ -34,7 +34,6 @@
CacheMaintenanceLib
[Guids]
- gArmVirtSystemMemorySizeGuid
gEfiMemoryTypeInformationGuid
[FeaturePcd]
diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c
index 9cf43f06c0..cf569bed99 100644
--- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c
+++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c
@@ -6,12 +6,10 @@
**/
-#include <Uefi.h>
-#include <Pi/PiMultiPhase.h>
+#include <Base.h>
#include <Library/ArmLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
-#include <Library/HobLib.h>
#include <Library/MemoryAllocationLib.h>
// Number of Virtual Memory Map Descriptors
@@ -26,28 +24,6 @@
#define MACH_VIRT_PERIPH_BASE 0x08000000
#define MACH_VIRT_PERIPH_SIZE SIZE_128MB
-/**
- Default library constructur that obtains the memory size from a PCD.
-
- @return Always returns RETURN_SUCCESS
-
-**/
-RETURN_STATUS
-EFIAPI
-QemuVirtMemInfoLibConstructor (
- VOID
- )
-{
- UINT64 Size;
- VOID *Hob;
-
- Size = PcdGet64 (PcdSystemMemorySize);
- Hob = BuildGuidDataHob (&gArmVirtSystemMemorySizeGuid, &Size, sizeof Size);
- ASSERT (Hob != NULL);
-
- return RETURN_SUCCESS;
-}
-
/**
Return the Virtual Memory Map of your platform
@@ -67,16 +43,9 @@ ArmVirtGetMemoryMap (
)
{
ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable;
- VOID *MemorySizeHob;
ASSERT (VirtualMemoryMap != NULL);
- MemorySizeHob = GetFirstGuidHob (&gArmVirtSystemMemorySizeGuid);
- ASSERT (MemorySizeHob != NULL);
- if (MemorySizeHob == NULL) {
- return;
- }
-
VirtualMemoryTable = AllocatePool (
sizeof (ARM_MEMORY_REGION_DESCRIPTOR) *
MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS
@@ -90,7 +59,7 @@ ArmVirtGetMemoryMap (
// System DRAM
VirtualMemoryTable[0].PhysicalBase = PcdGet64 (PcdSystemMemoryBase);
VirtualMemoryTable[0].VirtualBase = VirtualMemoryTable[0].PhysicalBase;
- VirtualMemoryTable[0].Length = *(UINT64 *)GET_GUID_HOB_DATA (MemorySizeHob);
+ VirtualMemoryTable[0].Length = PcdGet64 (PcdSystemMemorySize);
VirtualMemoryTable[0].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK;
DEBUG ((
diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
index 6acad8bbd7..7150de6c10 100644
--- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
+++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
@@ -14,7 +14,6 @@
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = ArmVirtMemInfoLib
- CONSTRUCTOR = QemuVirtMemInfoLibConstructor
[Sources]
QemuVirtMemInfoLib.c
@@ -31,9 +30,7 @@
BaseMemoryLib
DebugLib
MemoryAllocationLib
-
-[Guids]
- gArmVirtSystemMemorySizeGuid
+ PcdLib
[Pcd]
gArmTokenSpaceGuid.PcdFvBaseAddress
diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
index f045e39a41..7ecf6dfbb7 100644
--- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
+++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
@@ -32,16 +32,16 @@
BaseMemoryLib
DebugLib
FdtLib
+ PcdLib
MemoryAllocationLib
-[Guids]
- gArmVirtSystemMemorySizeGuid
-
-[FixedPcd]
+[Pcd]
gArmTokenSpaceGuid.PcdFdBaseAddress
gArmTokenSpaceGuid.PcdFvBaseAddress
gArmTokenSpaceGuid.PcdSystemMemoryBase
gArmTokenSpaceGuid.PcdSystemMemorySize
+
+[FixedPcd]
gArmTokenSpaceGuid.PcdFdSize
gArmTokenSpaceGuid.PcdFvSize
gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c
index c47ab82966..33d3597d57 100644
--- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c
+++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c
@@ -6,10 +6,9 @@
**/
-#include <Uefi.h>
-#include <Pi/PiMultiPhase.h>
+#include <Base.h>
#include <Library/DebugLib.h>
-#include <Library/HobLib.h>
+#include <Library/PcdLib.h>
#include <libfdt.h>
RETURN_STATUS
@@ -18,14 +17,14 @@ QemuVirtMemInfoPeiLibConstructor (
VOID
)
{
- VOID *DeviceTreeBase;
- INT32 Node, Prev;
- UINT64 NewBase, CurBase;
- UINT64 NewSize, CurSize;
- CONST CHAR8 *Type;
- INT32 Len;
- CONST UINT64 *RegProp;
- VOID *Hob;
+ VOID *DeviceTreeBase;
+ INT32 Node, Prev;
+ UINT64 NewBase, CurBase;
+ UINT64 NewSize, CurSize;
+ CONST CHAR8 *Type;
+ INT32 Len;
+ CONST UINT64 *RegProp;
+ RETURN_STATUS PcdStatus;
NewBase = 0;
NewSize = 0;
@@ -87,13 +86,8 @@ QemuVirtMemInfoPeiLibConstructor (
// Make sure the start of DRAM matches our expectation
//
ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) == NewBase);
-
- Hob = BuildGuidDataHob (
- &gArmVirtSystemMemorySizeGuid,
- &NewSize,
- sizeof NewSize
- );
- ASSERT (Hob != NULL);
+ PcdStatus = PcdSet64S (PcdSystemMemorySize, NewSize);
+ ASSERT_RETURN_ERROR (PcdStatus);
//
// We need to make sure that the machine we are running on has at least
@@ -0,0 +1,89 @@
From caef501f2c05ba2170d0a449856900919021d6f6 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Fri, 10 Mar 2023 18:47:09 +0000
Subject: [PATCH] Revert "ArmVirtPkg/ArmVirtQemu: omit PCD PEIM unless TPM
support is enabled"
This reverts commit b6efc505e4d6eb2055a39afd0a1ee67846a1e5f9.
Upstream-Status: Inappropriate [other]
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
ArmVirtPkg/ArmVirtQemu.dsc | 22 +++++-----------------
ArmVirtPkg/ArmVirtQemu.fdf | 2 +-
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 2e786dad12..0f8157a032 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -293,15 +293,10 @@
#
# TPM2 support
#
-!if $(TPM2_ENABLE) == TRUE
gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
+!if $(TPM2_ENABLE) == TRUE
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0
-!else
-[PcdsPatchableInModule]
- # make this PCD patchable instead of dynamic when TPM support is not enabled
- # this permits setting the PCD in unreachable code without pulling in dynamic PCD support
- gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
!endif
[PcdsDynamicHii]
@@ -314,13 +309,6 @@
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5
-[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
-!if $(TPM2_ENABLE) == TRUE
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-!else
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-!endif
-
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform
@@ -332,6 +320,10 @@
#
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
MdeModulePkg/Core/Pei/PeiMain.inf
+ MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
ArmPlatformPkg/PlatformPei/PlatformPeim.inf
ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf {
<LibraryClasses>
@@ -342,10 +334,6 @@
ArmPkg/Drivers/CpuPei/CpuPei.inf
!if $(TPM2_ENABLE) == TRUE
- MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf {
<LibraryClasses>
ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
index 764f652afd..c85e36b185 100644
--- a/ArmVirtPkg/ArmVirtQemu.fdf
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
@@ -109,10 +109,10 @@ READ_LOCK_STATUS = TRUE
INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
INF ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
INF ArmPkg/Drivers/CpuPei/CpuPei.inf
+ INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
!if $(TPM2_ENABLE) == TRUE
- INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
INF MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf
INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
@@ -1,34 +0,0 @@
From 17f490101f51b03c1ffc7151cc35e9fbd42b6060 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Tue, 22 Feb 2022 10:38:13 +0000
Subject: [PATCH] Latest clang is causing build failures because -Werror is
used
edk2/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h:78:47:
error: field Guid within 'FPDT_GUID_EVENT_RECORD' is less aligned than 'EFI_GUID'
and is usually due to 'FPDT_GUID_EVENT_RECORD' being packed, which can lead to
unaligned accesses [-Werror,-Wunaligned-access]
This has been reported upstream[1] so until this is resolved, ignore the warnings.
[1] https://edk2.groups.io/g/devel/message/86838
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
BaseTools/Conf/tools_def.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 5ed19810b7..9b4f173519 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2548,7 +2548,7 @@ DEFINE CLANG38_X64_PREFIX = ENV(CLANG38_BIN)
DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu
DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu
-DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable
+DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-error=unaligned-access -Wno-unused-command-line-argument
DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
###########################
@@ -1,4 +1,7 @@
Enforce using good old BFD linker
From 6673fb1de490575a414de7e4dd9442c921383019 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 7 Apr 2021 00:16:07 -0700
Subject: [PATCH] Enforce using good old BFD linker
some distros may use gold as system linker and it crashes while linking the app
@@ -15,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 9b4f173519..ea78e81d31 100755
index bca09e4648..b775391675 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1856,7 +1856,7 @@ DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
@@ -1858,7 +1858,7 @@ DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only
DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie
@@ -26,4 +29,4 @@ index 9b4f173519..ea78e81d31 100755
+DEFINE GCC_DLINK2_FLAGS_COMMON = -fuse-ld=bfd -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections
DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 -Wl,--pic-veneer
DEFINE GCC_LOONGARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+3 -3
View File
@@ -1,4 +1,4 @@
require recipes-bsp/uefi/edk2-firmware_202205.bb
require recipes-bsp/uefi/edk2-firmware_202302.bb
PROVIDES:remove = "virtual/bootloader"
LICENSE += "& Apache-2.0"
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM += "file://ShellPkg/Application/sbsa-acs/LICENSE.md;md5=2a94494
SRC_URI += "git://github.com/ARM-software/sbsa-acs;destsuffix=edk2/ShellPkg/Application/sbsa-acs;protocol=https;branch=master;name=acs \
git://github.com/tianocore/edk2-libc;destsuffix=edk2/edk2-libc;protocol=https;branch=master;name=libc \
file://shell.patch \
file://use_bfd_linker.patch \
file://0002-Patch-in-the-paths-to-the-SBSA-test-suite.patch \
file://0003-Enforce-using-good-old-BFD-linker.patch \
file://0001-Fix-function-protype-mismatches.patch;patchdir=ShellPkg/Application/sbsa-acs \
file://0001-Fix-for-issue-245.patch;patchdir=ShellPkg/Application/sbsa-acs \
"