arm/edk2: update version and relocate edk2-basetools to be with edk2
PATCH 1/2 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.
---
.../uefi/edk2-basetools-native_202302.bb} | 2 +-
meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 1 -
.../recipes-bsp/uefi/edk2-firmware_%.bbappend | 4 +
.../recipes-bsp/uefi/edk2-firmware_202205.bb | 4 -
.../recipes-bsp/uefi/edk2-firmware_202302.bb | 4 +
...g-QemuVirtMemInfoLib-use-HOB-not-PCD.patch | 290 ++++++++++++++++++
...g-ArmVirtQemu-omit-PCD-PEIM-unless-T.patch | 89 ++++++
.../recipes-bsp/uefi/files/unaligned.patch | 34 --
...in-the-paths-to-the-SBSA-test-suite.patch} | 0
...3-Enforce-using-good-old-BFD-linker.patch} | 11 +-
meta-arm/recipes-bsp/uefi/sbsa-acs_6.1.0.bb | 6 +-
11 files changed, 398 insertions(+), 47 deletions(-)
rename meta-arm/{recipes-devtools/edk2-basetools/edk2-basetools-native_202211.bb => recipes-bsp/uefi/edk2-basetools-native_202302.bb} (93%)
delete mode 100644 meta-arm/recipes-bsp/uefi/edk2-firmware_202205.bb
create mode 100644 meta-arm/recipes-bsp/uefi/edk2-firmware_202302.bb
create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Revert-ArmVirtPkg-QemuVirtMemInfoLib-use-HOB-not-PCD.patch
create mode 100644 meta-arm/recipes-bsp/uefi/files/0002-Revert-ArmVirtPkg-ArmVirtQemu-omit-PCD-PEIM-unless-T.patch
delete mode 100644 meta-arm/recipes-bsp/uefi/files/unaligned.patch
rename meta-arm/recipes-bsp/uefi/sbsa-acs/{shell.patch => 0002-Patch-in-the-paths-to-the-SBSA-test-suite.patch} (100%)
rename meta-arm/recipes-bsp/uefi/sbsa-acs/{use_bfd_linker.patch => 0003-Enforce-using-good-old-BFD-linker.patch} (81%)meta-arm/recipes-bsp/uefi/edk2-basetools-native_202302.bb renamed from meta-arm/recipes-devtools/edk2-basetools/edk2-basetools-native_202211.bb +1 -1
@@ -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"
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +0 -1
@@ -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 \ "
meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend +4 -0
@@ -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"
meta-arm/recipes-bsp/uefi/edk2-firmware_202205.bb deleted +0 -4
@@ -1,4 +0,0 @@ -SRCREV_edk2 ?= "16779ede2d366bfc6b702e817356ccf43425bcc8" -SRCREV_edk2-platforms ?= "3b896d1a325686de3942723c42f286090453e37a" - -require edk2-firmware.inc
meta-arm/recipes-bsp/uefi/edk2-firmware_202302.bb new file +4 -0
@@ -0,0 +1,4 @@ +SRCREV_edk2 ?= "f80f052277c88a67c55e107b550f504eeea947d3" +SRCREV_edk2-platforms ?= "65e001a7f2abedf7799cfb36b057326c1540bd47" + +require edk2-firmware.inc
meta-arm/recipes-bsp/uefi/files/0001-Revert-ArmVirtPkg-QemuVirtMemInfoLib-use-HOB-not-PCD.patch new file +290 -0
290 lines not on this page · raw message
meta-arm/recipes-bsp/uefi/files/0002-Revert-ArmVirtPkg-ArmVirtQemu-omit-PCD-PEIM-unless-T.patch new file +89 -0
89 lines not on this page · raw message
meta-arm/recipes-bsp/uefi/files/unaligned.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 17f490101f51b03c1ffc7151cc35e9fbd42b6060 Mon Sep 17 00:00:00 2001 -From: Ross Burton <[email protected]> -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 <[email protected]> ---- - 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 - - ###########################
meta-arm/recipes-bsp/uefi/sbsa-acs/0002-Patch-in-the-paths-to-the-SBSA-test-suite.patch renamed from meta-arm/recipes-bsp/uefi/sbsa-acs/shell.patch +0 -0
meta-arm/recipes-bsp/uefi/sbsa-acs/0003-Enforce-using-good-old-BFD-linker.patch renamed from meta-arm/recipes-bsp/uefi/sbsa-acs/use_bfd_linker.patch +7 -4
@@ -1,4 +1,7 @@ -Enforce using good old BFD linker +From 6673fb1de490575a414de7e4dd9442c921383019 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> 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
meta-arm/recipes-bsp/uefi/sbsa-acs_6.1.0.bb +3 -3
@@ -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 \ "
Signature · 1 line
2.25.1
PATCH 2/2 arm-bsp/fvp-base: Add edk2 build testing
The infrastructure for edk2 and fvp-base is already present, but not being used. Make the changes to get it compiling cleanly, and add it to CI.
Note: testing is not passing because edk2 isn't booting an image
--- .gitlab-ci.yml | 1 + meta-arm-bsp/conf/machine/include/fvp-common.inc | 2 +- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)
.gitlab-ci.yml +1 -0
@@ -103,6 +103,7 @@ fvp-base: parallel: matrix: - TESTING: testimage + - FIRMWARE: edk2 fvp-baser-aemv8r64: extends: .build
meta-arm-bsp/conf/machine/include/fvp-common.inc +1 -1
@@ -16,7 +16,7 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" KERNEL_DEVICETREE = "arm/fvp-base-revc.dtb" -EXTRA_IMAGEDEPENDS += "trusted-firmware-a u-boot" +EXTRA_IMAGEDEPENDS += "trusted-firmware-a" # As this is a virtual target that will not be used in the real world there is # no need for real SSH keys.
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc +1 -1
@@ -8,5 +8,5 @@ COMPATIBLE_MACHINE = "fvp-base" TFA_PLATFORM = "fvp" TFA_DEBUG = "1" TFA_MBEDTLS = "1" -TFA_UBOOT = "1" +TFA_UBOOT ?= "1" TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fip"
Signature · 1 line
2.25.1
Jon Mason
AppliedQuoted 3 lines · Jon Mason
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.
Applied, thanks!
[1/2] arm/edk2: update version and relocate edk2-basetools to be with edk2
commit: b39fc31d761f185d92e6e7b2f7d20f30621e96b5
[2/2] arm-bsp/fvp-base: Add edk2 build testing
commit: 99a3b07d522be82222952257a108034fc687a97bBest regards,
Signature · 1 line
Jon Mason <[email protected]>