From b6041594220958506e9ca81a45ccefb471ac70f3 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 28 Oct 2020 22:05:33 +0100 Subject: ovmf: update edk2-stable202005 -> edk2-stable202008 (From OE-Core rev: 6075d688dc7b0c20b5eadb4db2c78d50466be7e7) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie (cherry picked from commit 61cc9acb54be09a12aac7c79f4b14e7e525d5596) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- .../ovmf/ovmf/0001-ovmf-Update-to-latest.patch | 46 ---------------------- ...0001-ovmf-update-path-to-native-BaseTools.patch | 6 +-- ...makefile-adjust-to-build-in-under-bitbake.patch | 32 +++++++++++---- .../ovmf/0003-ovmf-enable-long-path-file.patch | 6 +-- .../ovmf/ovmf/0004-ovmf-Update-to-latest.patch | 46 ++++++++++++++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 6 +-- 6 files changed, 79 insertions(+), 63 deletions(-) delete mode 100644 meta/recipes-core/ovmf/ovmf/0001-ovmf-Update-to-latest.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch diff --git a/meta/recipes-core/ovmf/ovmf/0001-ovmf-Update-to-latest.patch b/meta/recipes-core/ovmf/ovmf/0001-ovmf-Update-to-latest.patch deleted file mode 100644 index 1d4273cdc1..0000000000 --- a/meta/recipes-core/ovmf/ovmf/0001-ovmf-Update-to-latest.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 640a634936ba8eca4778470fb14c6eb9cfd19953 Mon Sep 17 00:00:00 2001 -From: Steve Langasek -Date: Sat, 10 Jun 2017 01:39:36 -0700 -Subject: [PATCH 1/2] ovmf: Update to latest - -Description: pass -fno-stack-protector to all GCC toolchains - The upstream build rules inexplicably pass -fno-stack-protector only - when building for i386 and amd64. Add this essential argument to the - generic rules for gcc 4.4 and later. -Last-Updated: 2016-04-12 -Upstream-Status: Pending - ---- - BaseTools/Conf/tools_def.template | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 2b17d3b297..4cd2567c2a 100755 ---- a/BaseTools/Conf/tools_def.template -+++ b/BaseTools/Conf/tools_def.template -@@ -1950,10 +1950,10 @@ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 - # GCC Build Flag for included header file list generation - DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps - --DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -+DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings - DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 --DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address --DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -+DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -+DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address - DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable - DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive - DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) -@@ -1962,7 +1962,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF - DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS) - DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian - DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian --DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations -+DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mword-relocations - DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) - DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) - DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) --- -2.24.0 - diff --git a/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch b/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch index 6ecb23b29f..c32963a807 100644 --- a/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch +++ b/meta/recipes-core/ovmf/ovmf/0001-ovmf-update-path-to-native-BaseTools.patch @@ -1,7 +1,7 @@ -From 0a8362cfb9f00870d70687475665b131dd82c947 Mon Sep 17 00:00:00 2001 +From 200ff35c6545b4ab85f5ea7a6096fbaec3d82f6d Mon Sep 17 00:00:00 2001 From: Ricardo Neri Date: Thu, 9 Jun 2016 02:23:01 -0700 -Subject: [PATCH 1/5] ovmf: update path to native BaseTools +Subject: [PATCH 1/4] ovmf: update path to native BaseTools BaseTools is a set of utilities to build EDK-based firmware. These utilities are used during the build process. Thus, they need to be built natively. @@ -30,5 +30,5 @@ index 91b1442ade..1858dae31a 100755 source edksetup.sh BaseTools else -- -2.17.1 +2.28.0 diff --git a/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch b/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch index f37ed018ab..c61a08f022 100644 --- a/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch +++ b/meta/recipes-core/ovmf/ovmf/0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch @@ -1,7 +1,7 @@ -From a8bceaec1b16fffbf6810df05503d8ae9092b735 Mon Sep 17 00:00:00 2001 +From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001 From: Ricardo Neri Date: Fri, 26 Jul 2019 17:34:26 -0400 -Subject: [PATCH 2/5] BaseTools: makefile: adjust to build in under bitbake +Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake Prepend the build flags with those of bitbake. This is to build using the bitbake native sysroot include and library directories. @@ -10,14 +10,14 @@ Signed-off-by: Ricardo Neri Upstream-Status: Pending --- - BaseTools/Source/C/Makefiles/header.makefile | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile -index 4e9b36d98b..eb03ee33fa 100644 +index 1c105ee7d4..d5eea3864e 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile -@@ -62,23 +62,23 @@ $(error Bad HOST_ARCH) +@@ -69,35 +69,36 @@ $(error Bad HOST_ARCH) endif INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) @@ -33,19 +33,35 @@ index 4e9b36d98b..eb03ee33fa 100644 +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g else + ifeq ($(CXX), llvm) +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ ++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ + -fno-delete-null-pointer-checks -Wall -Werror \ + -Wno-deprecated-declarations -Wno-self-assign \ + -Wno-unused-result -nostdlib -g + else -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ -fno-delete-null-pointer-checks -Wall -Werror \ -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \ -Wno-unused-result -nostdlib -g endif + endif + ifeq ($(CXX), llvm) +-BUILD_LFLAGS = +-BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result ++BUILD_LFLAGS = $(LDFLAGS) ++BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result + else -BUILD_LFLAGS = -BUILD_CXXFLAGS = -Wno-unused-result +BUILD_LFLAGS = $(LDFLAGS) +BUILD_CXXFLAGS += -Wno-unused-result - + endif ++ ifeq ($(HOST_ARCH), IA32) # + # Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults -- -2.17.1 +2.28.0 diff --git a/meta/recipes-core/ovmf/ovmf/0003-ovmf-enable-long-path-file.patch b/meta/recipes-core/ovmf/ovmf/0003-ovmf-enable-long-path-file.patch index ab1e7db31f..df1d159011 100644 --- a/meta/recipes-core/ovmf/ovmf/0003-ovmf-enable-long-path-file.patch +++ b/meta/recipes-core/ovmf/ovmf/0003-ovmf-enable-long-path-file.patch @@ -1,7 +1,7 @@ -From 60a5f953f747e1e9e05a40157b651cba8ea57b91 Mon Sep 17 00:00:00 2001 +From e19481e5a64f8915ac118899b10c40d12c0f9daa Mon Sep 17 00:00:00 2001 From: Dengke Du Date: Mon, 11 Sep 2017 02:21:55 -0400 -Subject: [PATCH 3/5] ovmf: enable long path file +Subject: [PATCH 3/4] ovmf: enable long path file Upstream-Status: Pending Signed-off-by: Dengke Du @@ -24,5 +24,5 @@ index e1cce985f7..d67d03c70c 100644 #define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL) #define MAX_UINT32 ((UINT32)0xFFFFFFFF) -- -2.17.1 +2.28.0 diff --git a/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch b/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch new file mode 100644 index 0000000000..128438b201 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch @@ -0,0 +1,46 @@ +From ad06fcf1e08736e79221cd6863ff2e3c9254f261 Mon Sep 17 00:00:00 2001 +From: Steve Langasek +Date: Sat, 10 Jun 2017 01:39:36 -0700 +Subject: [PATCH 4/4] ovmf: Update to latest + +Description: pass -fno-stack-protector to all GCC toolchains + The upstream build rules inexplicably pass -fno-stack-protector only + when building for i386 and amd64. Add this essential argument to the + generic rules for gcc 4.4 and later. +Last-Updated: 2016-04-12 +Upstream-Status: Pending + +--- + BaseTools/Conf/tools_def.template | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template +index 933b3160fd..c2fbbf0c38 100755 +--- a/BaseTools/Conf/tools_def.template ++++ b/BaseTools/Conf/tools_def.template +@@ -1952,10 +1952,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv + # GCC Build Flag for included header file list generation + DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps + +-DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings ++DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -fno-stack-protector -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings + DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 +-DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address +-DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address ++DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -D EFI32 -fno-asynchronous-unwind-tables -Wno-address ++DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address + DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable + DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive + DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) +@@ -1964,7 +1964,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF + DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS) + DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian + DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian +-DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations ++DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mword-relocations + DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) + DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) + DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) +-- +2.28.0 + diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 91c1b6ba14..088e348bdc 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb @@ -16,11 +16,11 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0001-ovmf-update-path-to-native-BaseTools.patch \ file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ file://0003-ovmf-enable-long-path-file.patch \ - file://0001-ovmf-Update-to-latest.patch \ + file://0004-ovmf-Update-to-latest.patch \ " -PV = "edk2-stable202005" -SRCREV = "ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9" +PV = "edk2-stable202008" +SRCREV = "06dc822d045c2bb42e497487935485302486e151" UPSTREAM_CHECK_GITTAGREGEX = "(?Pedk2-stable.*)" inherit deploy -- cgit v1.2.3-54-g00ecf