diff options
Diffstat (limited to 'meta/recipes-core/ovmf')
9 files changed, 244 insertions, 30 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Basetools-genffs-fix-gcc12-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Basetools-genffs-fix-gcc12-warning.patch new file mode 100644 index 0000000000..4418d52898 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-Basetools-genffs-fix-gcc12-warning.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 7b005f344e533cd913c3ca05b266f9872df886d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gerd Hoffmann <kraxel@redhat.com> | ||
3 | Date: Thu, 24 Mar 2022 20:04:34 +0800 | ||
4 | Subject: [PATCH] BaseTools: fix gcc12 warning | ||
5 | |||
6 | GenFfs.c:545:5: error: pointer ?InFileHandle? used after ?fclose? [-Werror=use-after-free] | ||
7 | 545 | Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); | ||
8 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
9 | GenFfs.c:544:5: note: call to ?fclose? here | ||
10 | 544 | fclose (InFileHandle); | ||
11 | | ^~~~~~~~~~~~~~~~~~~~~ | ||
12 | |||
13 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
14 | Reviewed-by: Bob Feng <bob.c.feng@intel.com> | ||
15 | |||
16 | Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/7b005f344e533cd913c3ca05b266f9872df886d1] | ||
17 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
18 | |||
19 | --- | ||
20 | BaseTools/Source/C/GenFfs/GenFfs.c | 2 +- | ||
21 | BaseTools/Source/C/GenSec/GenSec.c | 2 +- | ||
22 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c | ||
25 | index 949025c33325..d78d62ab3689 100644 | ||
26 | --- a/BaseTools/Source/C/GenFfs/GenFfs.c | ||
27 | +++ b/BaseTools/Source/C/GenFfs/GenFfs.c | ||
28 | @@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment) | ||
29 | PeFileBuffer = (UINT8 *) malloc (PeFileSize); | ||
30 | if (PeFileBuffer == NULL) { | ||
31 | fclose (InFileHandle); | ||
32 | - Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); | ||
33 | + Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); | ||
34 | return EFI_OUT_OF_RESOURCES; | ||
35 | } | ||
36 | fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); | ||
37 | diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c | ||
38 | index d54a4f9e0a7d..b1d05367ec0b 100644 | ||
39 | --- a/BaseTools/Source/C/GenSec/GenSec.c | ||
40 | +++ b/BaseTools/Source/C/GenSec/GenSec.c | ||
41 | @@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment) | ||
42 | PeFileBuffer = (UINT8 *) malloc (PeFileSize); | ||
43 | if (PeFileBuffer == NULL) { | ||
44 | fclose (InFileHandle); | ||
45 | - Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); | ||
46 | + Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); | ||
47 | return EFI_OUT_OF_RESOURCES; | ||
48 | } | ||
49 | fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); | ||
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Basetools-lzmaenc-fix-gcc12-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Basetools-lzmaenc-fix-gcc12-warning.patch new file mode 100644 index 0000000000..a6ef87aa79 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-Basetools-lzmaenc-fix-gcc12-warning.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 24551a99d1f765c891a4dc21a36f18ccbf56e612 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Tue, 10 Jan 2023 06:15:00 -1000 | ||
4 | Subject: [PATCH] BaseTools: fix gcc12 warning | ||
5 | |||
6 | Sdk/C/LzmaEnc.c: In function ?LzmaEnc_CodeOneMemBlock?: | ||
7 | Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*p.rc.outStream? [-Werror=dangling-pointer=] | ||
8 | 2828 | p->rc.outStream = &outStream.vt; | ||
9 | | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | ||
10 | Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here | ||
11 | 2811 | CLzmaEnc_SeqOutStreamBuf outStream; | ||
12 | | ^~~~~~~~~ | ||
13 | Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here | ||
14 | Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*(CLzmaEnc *)pp.rc.outStream? [-Werror=dangling-pointer=] | ||
15 | 2828 | p->rc.outStream = &outStream.vt; | ||
16 | | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | ||
17 | Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here | ||
18 | 2811 | CLzmaEnc_SeqOutStreamBuf outStream; | ||
19 | | ^~~~~~~~~ | ||
20 | Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here | ||
21 | cc1: all warnings being treated as errors | ||
22 | |||
23 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
24 | Reviewed-by: Bob Feng <bob.c.feng@intel.com> | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/85021f8cf22d1bd4114803c6c610dea5ef0059f1] | ||
27 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
28 | --- | ||
29 | BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++- | ||
30 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | ||
33 | index e281716fee..b575c4f888 100644 | ||
34 | --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | ||
35 | +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | ||
36 | @@ -2638,12 +2638,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit, | ||
37 | |||
38 | nowPos64 = p->nowPos64; | ||
39 | RangeEnc_Init(&p->rc); | ||
40 | - p->rc.outStream = &outStream.vt; | ||
41 | |||
42 | if (desiredPackSize == 0) | ||
43 | return SZ_ERROR_OUTPUT_EOF; | ||
44 | |||
45 | + p->rc.outStream = &outStream.vt; | ||
46 | res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); | ||
47 | + p->rc.outStream = NULL; | ||
48 | |||
49 | *unpackSize = (UInt32)(p->nowPos64 - nowPos64); | ||
50 | *destLen -= outStream.rem; | ||
51 | -- | ||
52 | 2.25.1 | ||
53 | |||
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch new file mode 100644 index 0000000000..73a432684c --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c Mon Sep 17 00:00:00 2001 | ||
2 | From: Gerd Hoffmann <kraxel@redhat.com> | ||
3 | Date: Thu, 24 Mar 2022 20:04:36 +0800 | ||
4 | Subject: [PATCH] Basetools: turn off gcc12 warning | ||
5 | |||
6 | In function ?SetDevicePathEndNode?, | ||
7 | inlined from ?FileDevicePath? at DevicePathUtilities.c:857:5: | ||
8 | DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] | ||
9 | 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); | ||
10 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
11 | In file included from UefiDevicePathLib.h:22, | ||
12 | from DevicePathUtilities.c:16: | ||
13 | ../Include/Protocol/DevicePath.h: In function ?FileDevicePath?: | ||
14 | ../Include/Protocol/DevicePath.h:51:9: note: destination object ?Type? of size 1 | ||
15 | 51 | UINT8 Type; ///< 0x01 Hardware Device Path. | ||
16 | | ^~~~ | ||
17 | |||
18 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
19 | Reviewed-by: Bob Feng <bob.c.feng@intel.com> | ||
20 | |||
21 | Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c] | ||
22 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
23 | |||
24 | --- | ||
25 | BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++ | ||
26 | 1 file changed, 3 insertions(+) | ||
27 | |||
28 | diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile | ||
29 | index 7ca08af9662d..b05d2bddfa68 100644 | ||
30 | --- a/BaseTools/Source/C/DevicePath/GNUmakefile | ||
31 | +++ b/BaseTools/Source/C/DevicePath/GNUmakefile | ||
32 | @@ -13,6 +13,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili | ||
33 | |||
34 | include $(MAKEROOT)/Makefiles/app.makefile | ||
35 | |||
36 | +# gcc 12 trips over device path handling | ||
37 | +BUILD_CFLAGS += -Wno-error=stringop-overflow | ||
38 | + | ||
39 | LIBS = -lCommon | ||
40 | ifeq ($(CYGWIN), CYGWIN) | ||
41 | LIBS += -L/lib/e2fsprogs -luuid | ||
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch new file mode 100644 index 0000000000..d658123b81 --- /dev/null +++ b/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 498627ebda6271b59920f43a0b9b6187edeb7b09 Mon Sep 17 00:00:00 2001 | ||
2 | From: Adrian Herrera <adr.her.arc.95@gmail.com> | ||
3 | Date: Mon, 22 Mar 2021 21:06:47 +0000 | ||
4 | Subject: [PATCH] Fix VLA parameter warning | ||
5 | |||
6 | Make VLA buffer types consistent in declarations and definitions. | ||
7 | Resolves build crash when using -Werror due to "vla-parameter" warning. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/google/brotli/pull/893] | ||
10 | Signed-off-by: Adrian Herrera <adr.her.arc.95@gmail.com> | ||
11 | --- | ||
12 | c/dec/decode.c | 6 ++++-- | ||
13 | c/enc/encode.c | 5 +++-- | ||
14 | 2 files changed, 7 insertions(+), 4 deletions(-) | ||
15 | |||
16 | diff --git a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c | ||
17 | index 114c505..bb6f1ab 100644 | ||
18 | --- a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c | ||
19 | +++ b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c | ||
20 | @@ -2030,8 +2030,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands( | ||
21 | } | ||
22 | |||
23 | BrotliDecoderResult BrotliDecoderDecompress( | ||
24 | - size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size, | ||
25 | - uint8_t* decoded_buffer) { | ||
26 | + size_t encoded_size, | ||
27 | + const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)], | ||
28 | + size_t* decoded_size, | ||
29 | + uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) { | ||
30 | BrotliDecoderState s; | ||
31 | BrotliDecoderResult result; | ||
32 | size_t total_out = 0; | ||
33 | diff --git a/c/enc/encode.c b/c/enc/encode.c | ||
34 | index 68548ef..ab0a490 100644 | ||
35 | --- a/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c | ||
36 | +++ c/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c | ||
37 | @@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream( | ||
38 | |||
39 | BROTLI_BOOL BrotliEncoderCompress( | ||
40 | int quality, int lgwin, BrotliEncoderMode mode, size_t input_size, | ||
41 | - const uint8_t* input_buffer, size_t* encoded_size, | ||
42 | - uint8_t* encoded_buffer) { | ||
43 | + const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)], | ||
44 | + size_t* encoded_size, | ||
45 | + uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) { | ||
46 | BrotliEncoderState* s; | ||
47 | size_t out_size = *encoded_size; | ||
48 | const uint8_t* input_start = input_buffer; | ||
49 | -- | ||
50 | 2.31.1 | ||
51 | |||
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 @@ | |||
1 | From 0a8362cfb9f00870d70687475665b131dd82c947 Mon Sep 17 00:00:00 2001 | 1 | From 200ff35c6545b4ab85f5ea7a6096fbaec3d82f6d Mon Sep 17 00:00:00 2001 |
2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> |
3 | Date: Thu, 9 Jun 2016 02:23:01 -0700 | 3 | Date: Thu, 9 Jun 2016 02:23:01 -0700 |
4 | Subject: [PATCH 1/5] ovmf: update path to native BaseTools | 4 | Subject: [PATCH 1/4] ovmf: update path to native BaseTools |
5 | 5 | ||
6 | BaseTools is a set of utilities to build EDK-based firmware. These utilities | 6 | BaseTools is a set of utilities to build EDK-based firmware. These utilities |
7 | are used during the build process. Thus, they need to be built natively. | 7 | are used during the build process. Thus, they need to be built natively. |
@@ -30,5 +30,5 @@ index 91b1442ade..1858dae31a 100755 | |||
30 | source edksetup.sh BaseTools | 30 | source edksetup.sh BaseTools |
31 | else | 31 | else |
32 | -- | 32 | -- |
33 | 2.17.1 | 33 | 2.28.0 |
34 | 34 | ||
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 @@ | |||
1 | From a8bceaec1b16fffbf6810df05503d8ae9092b735 Mon Sep 17 00:00:00 2001 | 1 | From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001 |
2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> |
3 | Date: Fri, 26 Jul 2019 17:34:26 -0400 | 3 | Date: Fri, 26 Jul 2019 17:34:26 -0400 |
4 | Subject: [PATCH 2/5] BaseTools: makefile: adjust to build in under bitbake | 4 | Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake |
5 | 5 | ||
6 | Prepend the build flags with those of bitbake. This is to build | 6 | Prepend the build flags with those of bitbake. This is to build |
7 | using the bitbake native sysroot include and library directories. | 7 | using the bitbake native sysroot include and library directories. |
@@ -10,14 +10,14 @@ Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com> | |||
10 | Upstream-Status: Pending | 10 | Upstream-Status: Pending |
11 | 11 | ||
12 | --- | 12 | --- |
13 | BaseTools/Source/C/Makefiles/header.makefile | 10 +++++----- | 13 | BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++-------- |
14 | 1 file changed, 5 insertions(+), 5 deletions(-) | 14 | 1 file changed, 9 insertions(+), 8 deletions(-) |
15 | 15 | ||
16 | diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile | 16 | diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile |
17 | index 4e9b36d98b..eb03ee33fa 100644 | 17 | index 1c105ee7d4..d5eea3864e 100644 |
18 | --- a/BaseTools/Source/C/Makefiles/header.makefile | 18 | --- a/BaseTools/Source/C/Makefiles/header.makefile |
19 | +++ b/BaseTools/Source/C/Makefiles/header.makefile | 19 | +++ b/BaseTools/Source/C/Makefiles/header.makefile |
20 | @@ -62,23 +62,23 @@ $(error Bad HOST_ARCH) | 20 | @@ -69,35 +69,36 @@ $(error Bad HOST_ARCH) |
21 | endif | 21 | endif |
22 | 22 | ||
23 | INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) | 23 | 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 | |||
33 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ | 33 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ |
34 | -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g | 34 | -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g |
35 | else | 35 | else |
36 | ifeq ($(CXX), llvm) | ||
37 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ | ||
38 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ | ||
39 | -fno-delete-null-pointer-checks -Wall -Werror \ | ||
40 | -Wno-deprecated-declarations -Wno-self-assign \ | ||
41 | -Wno-unused-result -nostdlib -g | ||
42 | else | ||
36 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ | 43 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ |
37 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ | 44 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ |
38 | -fno-delete-null-pointer-checks -Wall -Werror \ | 45 | -fno-delete-null-pointer-checks -Wall -Werror \ |
39 | -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \ | 46 | -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \ |
40 | -Wno-unused-result -nostdlib -g | 47 | -Wno-unused-result -nostdlib -g |
41 | endif | 48 | endif |
49 | endif | ||
50 | ifeq ($(CXX), llvm) | ||
51 | -BUILD_LFLAGS = | ||
52 | -BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result | ||
53 | +BUILD_LFLAGS = $(LDFLAGS) | ||
54 | +BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result | ||
55 | else | ||
42 | -BUILD_LFLAGS = | 56 | -BUILD_LFLAGS = |
43 | -BUILD_CXXFLAGS = -Wno-unused-result | 57 | -BUILD_CXXFLAGS = -Wno-unused-result |
44 | +BUILD_LFLAGS = $(LDFLAGS) | 58 | +BUILD_LFLAGS = $(LDFLAGS) |
45 | +BUILD_CXXFLAGS += -Wno-unused-result | 59 | +BUILD_CXXFLAGS += -Wno-unused-result |
46 | 60 | endif | |
61 | + | ||
47 | ifeq ($(HOST_ARCH), IA32) | 62 | ifeq ($(HOST_ARCH), IA32) |
48 | # | 63 | # |
64 | # Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults | ||
49 | -- | 65 | -- |
50 | 2.17.1 | 66 | 2.28.0 |
51 | 67 | ||
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 @@ | |||
1 | From 60a5f953f747e1e9e05a40157b651cba8ea57b91 Mon Sep 17 00:00:00 2001 | 1 | From e19481e5a64f8915ac118899b10c40d12c0f9daa Mon Sep 17 00:00:00 2001 |
2 | From: Dengke Du <dengke.du@windriver.com> | 2 | From: Dengke Du <dengke.du@windriver.com> |
3 | Date: Mon, 11 Sep 2017 02:21:55 -0400 | 3 | Date: Mon, 11 Sep 2017 02:21:55 -0400 |
4 | Subject: [PATCH 3/5] ovmf: enable long path file | 4 | Subject: [PATCH 3/4] ovmf: enable long path file |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | 7 | Signed-off-by: Dengke Du <dengke.du@windriver.com> |
@@ -24,5 +24,5 @@ index e1cce985f7..d67d03c70c 100644 | |||
24 | #define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL) | 24 | #define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL) |
25 | #define MAX_UINT32 ((UINT32)0xFFFFFFFF) | 25 | #define MAX_UINT32 ((UINT32)0xFFFFFFFF) |
26 | -- | 26 | -- |
27 | 2.17.1 | 27 | 2.28.0 |
28 | 28 | ||
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 index c10a39d95d..128438b201 100644 --- a/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch +++ b/meta/recipes-core/ovmf/ovmf/0004-ovmf-Update-to-latest.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 94eff316b31b4d0348af28c77be5c00bc09fe8e7 Mon Sep 17 00:00:00 2001 | 1 | From ad06fcf1e08736e79221cd6863ff2e3c9254f261 Mon Sep 17 00:00:00 2001 |
2 | From: Steve Langasek <steve.langasek@ubuntu.com> | 2 | From: Steve Langasek <steve.langasek@ubuntu.com> |
3 | Date: Sat, 10 Jun 2017 01:39:36 -0700 | 3 | Date: Sat, 10 Jun 2017 01:39:36 -0700 |
4 | Subject: [PATCH 4/5] ovmf: Update to latest | 4 | Subject: [PATCH 4/4] ovmf: Update to latest |
5 | 5 | ||
6 | Description: pass -fno-stack-protector to all GCC toolchains | 6 | Description: pass -fno-stack-protector to all GCC toolchains |
7 | The upstream build rules inexplicably pass -fno-stack-protector only | 7 | The upstream build rules inexplicably pass -fno-stack-protector only |
@@ -15,15 +15,15 @@ Upstream-Status: Pending | |||
15 | 1 file changed, 4 insertions(+), 4 deletions(-) | 15 | 1 file changed, 4 insertions(+), 4 deletions(-) |
16 | 16 | ||
17 | diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template | 17 | diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template |
18 | index ca0b122dbb..b0066c2ab8 100755 | 18 | index 933b3160fd..c2fbbf0c38 100755 |
19 | --- a/BaseTools/Conf/tools_def.template | 19 | --- a/BaseTools/Conf/tools_def.template |
20 | +++ b/BaseTools/Conf/tools_def.template | 20 | +++ b/BaseTools/Conf/tools_def.template |
21 | @@ -1941,10 +1941,10 @@ DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 | 21 | @@ -1952,10 +1952,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv |
22 | DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii | 22 | # GCC Build Flag for included header file list generation |
23 | DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii | 23 | DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps |
24 | 24 | ||
25 | -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 | 25 | -DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings |
26 | +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 | 26 | +DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -fno-stack-protector -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings |
27 | DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 | 27 | DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 |
28 | -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 | 28 | -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 |
29 | -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 | 29 | -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 |
@@ -32,7 +32,7 @@ index ca0b122dbb..b0066c2ab8 100755 | |||
32 | DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable | 32 | DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable |
33 | 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 | 33 | 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 |
34 | DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) | 34 | DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) |
35 | @@ -1953,7 +1953,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF | 35 | @@ -1964,7 +1964,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF |
36 | DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS) | 36 | DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS) |
37 | DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian | 37 | DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian |
38 | DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian | 38 | DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian |
@@ -42,5 +42,5 @@ index ca0b122dbb..b0066c2ab8 100755 | |||
42 | DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) | 42 | DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) |
43 | DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) | 43 | DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) |
44 | -- | 44 | -- |
45 | 2.17.1 | 45 | 2.28.0 |
46 | 46 | ||
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 9667fa0c86..a487f77e3c 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb | |||
@@ -12,15 +12,19 @@ LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776 | |||
12 | PACKAGECONFIG ??= "" | 12 | PACKAGECONFIG ??= "" |
13 | PACKAGECONFIG[secureboot] = ",,," | 13 | PACKAGECONFIG[secureboot] = ",,," |
14 | 14 | ||
15 | SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=git \ | 15 | SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ |
16 | file://0001-ovmf-update-path-to-native-BaseTools.patch \ | 16 | file://0001-ovmf-update-path-to-native-BaseTools.patch \ |
17 | file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ | 17 | file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ |
18 | file://0003-ovmf-enable-long-path-file.patch \ | 18 | file://0003-ovmf-enable-long-path-file.patch \ |
19 | file://0004-ovmf-Update-to-latest.patch \ | 19 | file://0004-ovmf-Update-to-latest.patch \ |
20 | " | 20 | file://0001-Fix-VLA-parameter-warning.patch \ |
21 | 21 | file://0001-Basetools-genffs-fix-gcc12-warning.patch \ | |
22 | PV = "edk2-stable201911" | 22 | file://0001-Basetools-lzmaenc-fix-gcc12-warning.patch \ |
23 | SRCREV = "bd85bf54c268204c7a698a96f3ccd96cd77952cd" | 23 | file://0001-Basetools-turn-off-gcc12-warning.patch \ |
24 | " | ||
25 | |||
26 | PV = "edk2-stable202008" | ||
27 | SRCREV = "06dc822d045c2bb42e497487935485302486e151" | ||
24 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" | 28 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" |
25 | 29 | ||
26 | inherit deploy | 30 | inherit deploy |
@@ -37,7 +41,7 @@ EDK_TOOLS_DIR="edk2_basetools" | |||
37 | BUILD_OPTIMIZATION="-pipe" | 41 | BUILD_OPTIMIZATION="-pipe" |
38 | 42 | ||
39 | # OVMF supports IA only, although it could conceivably support ARM someday. | 43 | # OVMF supports IA only, although it could conceivably support ARM someday. |
40 | COMPATIBLE_HOST='(i.86|x86_64).*' | 44 | COMPATIBLE_HOST_class-target='(i.86|x86_64).*' |
41 | 45 | ||
42 | # Additional build flags for OVMF with Secure Boot. | 46 | # Additional build flags for OVMF with Secure Boot. |
43 | # Fedora also uses "-D SMM_REQUIRE -D EXCLUDE_SHELL_FROM_FD". | 47 | # Fedora also uses "-D SMM_REQUIRE -D EXCLUDE_SHELL_FROM_FD". |