From 2241aef3e3014c5e985a17d85024e70a5241ca79 Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@yoctoproject.org>
Date: Thu, 1 Sep 2022 05:53:29 +0000
Subject: [PATCH] ovmf: upgrade edk2-stable202205 -> edk2-stable202208

---
 ...006-Committing-changes-from-do_patch.patch | 64 +++++++++++++++++++
 meta/recipes-core/ovmf/ovmf_git.bb            |  5 +-
 2 files changed, 67 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/ovmf/ovmf/0006-Committing-changes-from-do_patch.patch

diff --git a/meta/recipes-core/ovmf/ovmf/0006-Committing-changes-from-do_patch.patch b/meta/recipes-core/ovmf/ovmf/0006-Committing-changes-from-do_patch.patch
new file mode 100644
index 0000000000..383e3cbaca
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0006-Committing-changes-from-do_patch.patch
@@ -0,0 +1,64 @@
+From 94c3c6bdad06b862dff9d4a623be82bf04af1462 Mon Sep 17 00:00:00 2001
+From: OpenEmbedded <oe.patch@oe>
+Date: Thu, 1 Sep 2022 05:52:52 +0000
+Subject: [PATCH] Committing changes from do_patch
+
+---
+ BaseTools/Source/C/Makefiles/app.makefile |  6 ++++++
+ BaseTools/Source/C/VfrCompile/GNUmakefile | 10 ++++++++++
+ OvmfPkg/build.sh                          |  2 +-
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile
+index 6a2a8f5e8a..aba765687e 100644
+--- a/BaseTools/Source/C/Makefiles/app.makefile
++++ b/BaseTools/Source/C/Makefiles/app.makefile
+@@ -10,6 +10,12 @@ MAKEROOT ?= ../..
+ include $(MAKEROOT)/Makefiles/header.makefile
+ 
+ APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
++CC = x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++CXX = x86_64-poky-linux-g++  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++AS = x86_64-poky-linux-as  
++AR = x86_64-poky-linux-gcc-ar
++LD = x86_64-poky-linux-ld --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot  
++LINKER = $(CC)
+ 
+ .PHONY:all
+ all: $(MAKEROOT)/bin $(APPLICATION)
+diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile
+index fc329944b9..29ea7654ed 100644
+--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
++++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
+@@ -18,8 +18,18 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn
+           VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
+ ifeq ($(CXX), llvm)
+ VFR_CPPFLAGS = -Wno-deprecated-register -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
++CC = x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++CXX = x86_64-poky-linux-g++  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++AS = x86_64-poky-linux-as  
++AR = x86_64-poky-linux-gcc-ar
++LD = x86_64-poky-linux-ld --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot  
+ else
+ VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
++CC = x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++CXX = x86_64-poky-linux-g++  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot
++AS = x86_64-poky-linux-as  
++AR = x86_64-poky-linux-gcc-ar
++LD = x86_64-poky-linux-ld --sysroot=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot  
+ endif
+ # keep BUILD_OPTFLAGS last
+ VFR_CXXFLAGS = $(BUILD_OPTFLAGS)
+diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
+index 1858dae31a..a2969d3d1c 100755
+--- a/OvmfPkg/build.sh
++++ b/OvmfPkg/build.sh
+@@ -24,7 +24,7 @@ then
+ # this assumes svn pulls have the same root dir
+ #  export EDK_TOOLS_PATH=`pwd`/../BaseTools
+ # This version is for the tools source in edk2
+-  export EDK_TOOLS_PATH=BBAKE_EDK_TOOLS_PATH/BaseTools
++  export EDK_TOOLS_PATH=/home/pokybuild/yocto-worker/auh/build/build/build/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202205-r0/devtooltmp-itvyz4xn/workdir/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools
+   echo $EDK_TOOLS_PATH
+   source edksetup.sh BaseTools
+ else
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index aac30ead30..5a3479c5f5 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -25,10 +25,11 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
            file://0003-ovmf-Update-to-latest.patch \
            file://0005-debug-prefix-map.patch \
            file://0006-reproducible.patch \
+           file://0006-Committing-changes-from-do_patch.patch \
            "
 
-PV = "edk2-stable202205"
-SRCREV = "16779ede2d366bfc6b702e817356ccf43425bcc8"
+PV = "edk2-stable202208"
+SRCREV = "ba0e0e4c6a174b71b18ccd6e47319cc45878893c"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
 
 inherit deploy
-- 
2.31.1

