1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

ovmf: update 202302 -> 202305

(From OE-Core rev: 175927cedffbd9fe5815219984d8b3c4be56ad98)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2023-06-25 23:22:23 +02:00
committed by Richard Purdie
parent 4bd6fb3488
commit f3c0c3a35c
5 changed files with 63 additions and 65 deletions
@@ -1,7 +1,7 @@
From 1125f5a02c2f327aeffe2d6b66a9d816ad2eeec0 Mon Sep 17 00:00:00 2001 From d8df6b6433351763e1db791dd84d432983d2b249 Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Thu, 9 Jun 2016 02:23:01 -0700 Date: Thu, 9 Jun 2016 02:23:01 -0700
Subject: [PATCH 1/6] 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 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. are used during the build process. Thus, they need to be built natively.
@@ -16,7 +16,7 @@ Upstream-Status: Inappropriate [oe-core cross compile specific]
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index 91b1442ade..1858dae31a 100755 index b0334fb76e..094f86f096 100755
--- a/OvmfPkg/build.sh --- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh +++ b/OvmfPkg/build.sh
@@ -24,7 +24,7 @@ then @@ -24,7 +24,7 @@ then
@@ -29,5 +29,5 @@ index 91b1442ade..1858dae31a 100755
source edksetup.sh BaseTools source edksetup.sh BaseTools
else else
-- --
2.32.0 2.30.2
@@ -1,7 +1,7 @@
From 19d4c7f9812062a683b3ba60b35aac0461190456 Mon Sep 17 00:00:00 2001 From 7675a67b8bb207de38ff5a9dc416e8b1028eb8ce Mon Sep 17 00:00:00 2001
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date: Fri, 26 Jul 2019 17:34:26 -0400 Date: Fri, 26 Jul 2019 17:34:26 -0400
Subject: [PATCH 2/6] 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 Prepend the build flags with those of bitbake. This is to build
using the bitbake native sysroot include and library directories. using the bitbake native sysroot include and library directories.
@@ -14,58 +14,56 @@ to fight against how upstream wants to configure the build.
Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com> Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com>
Upstream-Status: Inappropriate [needs to be converted to in-recipe fixups] Upstream-Status: Inappropriate [needs to be converted to in-recipe fixups]
--- ---
BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++-------- BaseTools/Source/C/Makefiles/header.makefile | 15 +++++++--------
1 file changed, 9 insertions(+), 8 deletions(-) 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index 0df728f327..1299d47c87 100644 index 1bf003523b..28757aed63 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile --- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -75,35 +75,36 @@ $(error Bad HOST_ARCH) @@ -82,35 +82,34 @@ $(error Bad HOST_ARCH)
endif endif
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
-BUILD_CPPFLAGS = $(INCLUDE) -CPPFLAGS = $(INCLUDE)
+BUILD_CPPFLAGS += $(INCLUDE) +CPPFLAGS += $(INCLUDE)
# keep EXTRA_OPTFLAGS last # keep EXTRA_OPTFLAGS last
BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS) BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
ifeq ($(DARWIN),Darwin) ifeq ($(DARWIN),Darwin)
# assume clang or clang compatible flags on OS X # assume clang or clang compatible flags on OS X
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ +CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
else else
ifeq ($(CXX), llvm) ifneq ($(CLANG),)
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ +CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
-fno-delete-null-pointer-checks -Wall -Werror \ -fno-delete-null-pointer-checks -Wall -Werror \
-Wno-deprecated-declarations -Wno-self-assign \ -Wno-deprecated-declarations -Wno-self-assign \
-Wno-unused-result -nostdlib -g -Wno-unused-result -nostdlib -g
else else
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ +CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
-fno-delete-null-pointer-checks -Wall -Werror \ -fno-delete-null-pointer-checks -Wall -Werror \
-Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \ -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
-Wno-unused-result -nostdlib -g -Wno-unused-result -nostdlib -g
endif endif
endif endif
ifeq ($(CXX), llvm) ifneq ($(CLANG),)
-BUILD_LFLAGS = -LDFLAGS =
-BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result -CXXFLAGS = -Wno-deprecated-register -Wno-unused-result -std=c++14
+BUILD_LFLAGS = $(LDFLAGS) +CXXFLAGS += -Wno-deprecated-register -Wno-unused-result -std=c++14
+BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result
else else
-BUILD_LFLAGS = -LDFLAGS =
-BUILD_CXXFLAGS = -Wno-unused-result -CXXFLAGS = -Wno-unused-result
+BUILD_LFLAGS = $(LDFLAGS) +CXXFLAGS += -Wno-unused-result
+BUILD_CXXFLAGS += -Wno-unused-result
endif endif
+ +
ifeq ($(HOST_ARCH), IA32) ifeq ($(HOST_ARCH), IA32)
# #
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults # Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
-- --
2.32.0 2.30.2
@@ -1,7 +1,7 @@
From cf6361f27cd6318622fd58ab6c0a9407cc633b1e Mon Sep 17 00:00:00 2001 From 03e536b20d0b72cf078052f6748de8df3836625c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com> From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 14 Jun 2021 19:56:28 +0200 Date: Mon, 14 Jun 2021 19:56:28 +0200
Subject: [PATCH] debug prefix map Subject: [PATCH 3/4] debug prefix map
We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in
--debug-prefix-map to nasm (we carry a patch to nasm for this). The --debug-prefix-map to nasm (we carry a patch to nasm for this). The
@@ -22,10 +22,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 9 insertions(+), 9 deletions(-) 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 471eb67c0c..a16fb5c9f1 100755 index 503a6687c1..10ac38ef9e 100755
--- a/BaseTools/Conf/tools_def.template --- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template
@@ -1849,7 +1849,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N @@ -739,7 +739,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink="$(DEBUG_DIR)/$(MODULE_
*_*_*_DTCPP_PATH = DEF(DTCPP_BIN) *_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
*_*_*_DTC_PATH = DEF(DTC_BIN) *_*_*_DTC_PATH = DEF(DTC_BIN)
@@ -34,7 +34,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie
DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections
DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
@@ -1869,8 +1869,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere @@ -759,8 +759,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere
DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
@@ -45,7 +45,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_ASLCC_FLAGS = -x c
@@ -2022,7 +2022,7 @@ DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF( @@ -913,7 +913,7 @@ DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF(
*_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS) *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
*_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC48_IA32_OBJCOPY_FLAGS = *_GCC48_IA32_OBJCOPY_FLAGS =
@@ -54,7 +54,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS)
RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable
@@ -2050,7 +2050,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set @@ -941,7 +941,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set
*_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS) *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
*_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC48_X64_OBJCOPY_FLAGS = *_GCC48_X64_OBJCOPY_FLAGS =
@@ -63,7 +63,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable
@@ -2159,7 +2159,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s @@ -1050,7 +1050,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
*_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS) *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC49_IA32_OBJCOPY_FLAGS = *_GCC49_IA32_OBJCOPY_FLAGS =
@@ -72,7 +72,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2187,7 +2187,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set @@ -1078,7 +1078,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set
*_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS) *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC49_X64_OBJCOPY_FLAGS = *_GCC49_X64_OBJCOPY_FLAGS =
@@ -81,7 +81,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2302,7 +2302,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 @@ -1337,7 +1337,7 @@ RELEASE_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
*_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC5_IA32_OBJCOPY_FLAGS = *_GCC5_IA32_OBJCOPY_FLAGS =
@@ -90,7 +90,7 @@ index 471eb67c0c..a16fb5c9f1 100755
DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto
DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
@@ -2334,7 +2334,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, @@ -1369,7 +1369,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
*_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
*_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC5_X64_OBJCOPY_FLAGS = *_GCC5_X64_OBJCOPY_FLAGS =
@@ -1,7 +1,7 @@
From 27ed9962f5cb3afcc44d6c96c53277132a999712 Mon Sep 17 00:00:00 2001 From c59850367a190d70dec43e0a66f399a4d8a5ffed Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com> From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 14 Jun 2021 19:57:30 +0200 Date: Mon, 14 Jun 2021 19:57:30 +0200
Subject: [PATCH 6/6] reproducible Subject: [PATCH 4/4] reproducible
This patch fixes various things which make the build more reproducible. Some changes This patch fixes various things which make the build more reproducible. Some changes
here only change intermediate artefacts but that means when you have two build trees here only change intermediate artefacts but that means when you have two build trees
@@ -35,10 +35,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
4 files changed, 24 insertions(+), 16 deletions(-) 4 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index d097db8632..a87ae6f3d0 100644 index 9c17c90b16..fcc7864141 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c --- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -14,6 +14,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __GNUC__ #ifndef __GNUC__
#include <windows.h> #include <windows.h>
#include <io.h> #include <io.h>
@@ -47,35 +47,35 @@ index d097db8632..a87ae6f3d0 100644
#endif #endif
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
@@ -769,7 +771,7 @@ ScanSections64 ( @@ -990,7 +992,7 @@ ScanSections64 (
} }
mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) + mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) +
sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) + sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) +
- strlen(mInImageName) + 1; - strlen(mInImageName) + 1;
+ strlen(basename(mInImageName)) + 1; + strlen(basename(mInImageName)) + 1;
mCoffOffset = CoffAlign(mCoffOffset); //
if (SectionCount == 0) { // Add more space in the .debug data region for the DllCharacteristicsEx
@@ -1608,7 +1610,7 @@ WriteDebug64 ( @@ -2261,7 +2263,7 @@ WriteDebug64 (
EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir; EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10; EFI_IMAGE_DEBUG_EX_DLLCHARACTERISTICS_ENTRY *DllEntry;
- Len = strlen(mInImageName) + 1; - Len = strlen(mInImageName) + 1;
+ Len = strlen(basename(mInImageName)) + 1; + Len = strlen(basename(mInImageName)) + 1;
Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(mCoffFile + mDebugOffset); NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW; DataDir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG];
@@ -1618,7 +1620,7 @@ WriteDebug64 ( @@ -2294,7 +2296,7 @@ WriteDebug64 (
Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1); Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
Nb10->Signature = CODEVIEW_SIGNATURE_NB10; Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
- strcpy ((char *)(Nb10 + 1), mInImageName); - strcpy ((char *)(Nb10 + 1), mInImageName);
+ strcpy ((char *)(Nb10 + 1), basename(mInImageName)); + strcpy ((char *)(Nb10 + 1), basename(mInImageName));
}
STATIC
NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index 722fead75a..8f1c236970 100644 index 752a1a1f6a..02054cccf8 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py --- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py +++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -70,6 +70,9 @@ class TargetDescBlock(object): @@ -70,6 +70,9 @@ class TargetDescBlock(object):
@@ -89,7 +89,7 @@ index 722fead75a..8f1c236970 100644
if Input not in self.Inputs: if Input not in self.Inputs:
self.Inputs.append(Input) self.Inputs.append(Input)
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 961b2ab1c3..23c1592025 100755 index daec9c6d54..0e8cc20efe 100755
--- a/BaseTools/Source/Python/AutoGen/GenMake.py --- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -575,7 +575,7 @@ cleanlib: @@ -575,7 +575,7 @@ cleanlib:
@@ -153,10 +153,10 @@ index 961b2ab1c3..23c1592025 100755
if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros: if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros:
self.FileListMacros[T.FileListMacro] = [] self.FileListMacros[T.FileListMacro] = []
diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
index d70b0d7ae8..25dca9a6df 100755 index d05410b329..99b3f64aba 100755
--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
@@ -1484,6 +1484,9 @@ class ModuleAutoGen(AutoGen): @@ -1474,6 +1474,9 @@ class ModuleAutoGen(AutoGen):
for File in Files: for File in Files:
if File.lower().endswith('.pdb'): if File.lower().endswith('.pdb'):
AsBuiltInfDict['binary_item'].append('DISPOSABLE|' + File) AsBuiltInfDict['binary_item'].append('DISPOSABLE|' + File)
@@ -166,7 +166,7 @@ index d70b0d7ae8..25dca9a6df 100755
HeaderComments = self.Module.HeaderComments HeaderComments = self.Module.HeaderComments
StartPos = 0 StartPos = 0
for Index in range(len(HeaderComments)): for Index in range(len(HeaderComments)):
@@ -1759,7 +1762,7 @@ class ModuleAutoGen(AutoGen): @@ -1749,7 +1752,7 @@ class ModuleAutoGen(AutoGen):
if os.path.exists (self.TimeStampPath): if os.path.exists (self.TimeStampPath):
os.remove (self.TimeStampPath) os.remove (self.TimeStampPath)
@@ -176,5 +176,5 @@ index d70b0d7ae8..25dca9a6df 100755
# Ignore generating makefile when it is a binary module # Ignore generating makefile when it is a binary module
if self.IsBinaryModule: if self.IsBinaryModule:
-- --
2.32.0 2.30.2
+4 -4
View File
@@ -22,12 +22,12 @@ BUILD_CFLAGS += "-Wno-error=stringop-overflow"
SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
file://0001-ovmf-update-path-to-native-BaseTools.patch \ file://0001-ovmf-update-path-to-native-BaseTools.patch \
file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
file://0005-debug-prefix-map.patch \ file://0003-debug-prefix-map.patch \
file://0006-reproducible.patch \ file://0004-reproducible.patch \
" "
PV = "edk2-stable202302" PV = "edk2-stable202305"
SRCREV = "f80f052277c88a67c55e107b550f504eeea947d3" SRCREV = "ba91d0292e593df8528b66f99c1b0b14fadc8e16"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
inherit deploy inherit deploy