Forward-port patches from f31 and rebase from git

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2020-01-28 14:24:49 -05:00
parent bdf5ded18f
commit d85ffee356
49 changed files with 620 additions and 752 deletions

View File

@ -1,7 +1,7 @@
From 5bb5032fdacf183d53b1e0154d281a223d684eea Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com> From: Gary Lin <glin@suse.com>
Date: Tue, 9 Oct 2018 18:35:21 +0800 Date: Tue, 9 Oct 2018 18:35:21 +0800
Subject: [PATCH 01/45] Set '\0' properly in StrnCpy() Subject: [PATCH] Set '\0' properly in StrnCpy()
The arguments to SetMem() were wrong. Besides, SetMem() should start at The arguments to SetMem() were wrong. Besides, SetMem() should start at
"Dest + Size" since "Size" will be smaller than "Len" if they are not "Dest + Size" since "Size" will be smaller than "Len" if they are not
@ -26,6 +26,3 @@ index 129c9f21ad5..73965cae192 100644
RtCopyMem(Dest, Src, Size * sizeof(CHAR16)); RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
} }
--
2.24.1

View File

@ -1,8 +1,7 @@
From 5d0d538c2574dfe32e87e87ff977f2830ae2990c Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Tue, 8 Jan 2019 11:19:25 -0500 Date: Tue, 8 Jan 2019 11:19:25 -0500
Subject: [PATCH 02/45] Fix typeo in efierr.h EFI_WARN_UNKNOWN_GLYPH Subject: [PATCH] Fix typeo in efierr.h EFI_WARN_UNKNOWN_GLYPH definition.
definition.
Signed-off-by: Nigel Croxon <ncroxon@redhat.com> Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: manison <manison@users.sf.net> Signed-off-by: manison <manison@users.sf.net>
@ -23,6 +22,3 @@ index dfd3d3cf486..d351c1ca225 100644
#define EFI_WARN_DELETE_FAILURE EFIWARN(2) #define EFI_WARN_DELETE_FAILURE EFIWARN(2)
#define EFI_WARN_WRITE_FAILURE EFIWARN(3) #define EFI_WARN_WRITE_FAILURE EFIWARN(3)
#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN(4) #define EFI_WARN_BUFFER_TOO_SMALL EFIWARN(4)
--
2.24.1

View File

@ -1,14 +1,14 @@
From d34132e62f666904158c7ec2f1eef5a9d5281c36 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Wed, 9 Jan 2019 07:03:46 -0500 Date: Wed, 9 Jan 2019 07:03:46 -0500
Subject: [PATCH 03/45] * Fixed typeo lib/error.c EFI_WARN_UNKNOWN_GLYPH Subject: [PATCH] * Fixed typeo lib/error.c EFI_WARN_UNKNOWN_GLYPH definition.
definition. On couple of locations in runtime string library (rtstr.c) there On couple of locations in runtime string library (rtstr.c) there are calls to
are calls to non-runtime variant of StrLen function. * Another issue is with non-runtime variant of StrLen function. * Another issue is with formatting
formatting 1394 paths. The F1394_DEVICE_PATH::Guid is formatted as %g, but 1394 paths. The F1394_DEVICE_PATH::Guid is formatted as %g, but 1394 GUID is
1394 GUID is 8 byte integer, not EFI_GUID and therefore should be formatted 8 byte integer, not EFI_GUID and therefore should be formatted as e.g. %016lx
as e.g. %016lx (as edk2 does). * Beyond what's mentioned above, changed the (as edk2 does). * Beyond what's mentioned above, changed the format of the
format of the harddrive path, so it's in line with edk2 format and spec (2.7 harddrive path, so it's in line with edk2 format and spec (2.7 errata A,
errata A, chapter 10.6.1.6, table 102). chapter 10.6.1.6, table 102).
Signed-off-by: Nigel Croxon <ncroxon@redhat.com> Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: manison <manison@users.sf.net> Signed-off-by: manison <manison@users.sf.net>
@ -183,6 +183,3 @@ index 73965cae192..802e7f43309 100644
return i; return i;
} }
--
2.24.1

View File

@ -1,7 +1,7 @@
From 6335e5c697c57d8b5854b8202de3733bcb151ca6 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com> From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 18 Jan 2019 22:05:37 +0100 Date: Fri, 18 Jan 2019 22:05:37 +0100
Subject: [PATCH 04/45] efilink: fix build with gcc 4.8 Subject: [PATCH] efilink: fix build with gcc 4.8
intptr_t is undefined without an include on stdint.h intptr_t is undefined without an include on stdint.h
@ -28,6 +28,3 @@ index cc5aa2dc57b..b69a6fd5cf5 100644
/*++ /*++
Copyright (c) 1998 Intel Corporation Copyright (c) 1998 Intel Corporation
--
2.24.1

View File

@ -1,7 +1,7 @@
From 1a53d8f88a452847b25f9689f9a08dbcf82c86e4 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben@esben1.localdomain> From: Esben Haabendal <esben@esben1.localdomain>
Date: Fri, 15 Mar 2019 11:57:51 +0100 Date: Fri, 15 Mar 2019 11:57:51 +0100
Subject: [PATCH 05/45] Fix for problem with undeclared intptr_t type Subject: [PATCH] Fix for problem with undeclared intptr_t type
When building gnu-efi with old compilers with pre C90 compilers: When building gnu-efi with old compilers with pre C90 compilers:
@ -106,6 +106,3 @@ index 4309f9f0e17..ae40595be0b 100644
#elif defined(__GNUC__) #elif defined(__GNUC__)
#include <stdint.h> #include <stdint.h>
#endif #endif
--
2.24.1

View File

@ -1,7 +1,7 @@
From 5b74db0e154ffd2fba4bcc254069844f21913988 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Fri, 15 Mar 2019 09:32:06 -0400 Date: Fri, 15 Mar 2019 09:32:06 -0400
Subject: [PATCH 06/45] Redefine jmp_buf to comply with C calling convention. Subject: [PATCH] Redefine jmp_buf to comply with C calling convention.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com> Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
@ -129,6 +129,3 @@ index a489993c174..b1ad1fe3087 100644
+} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} ALIGN(JMPBUF_ALIGN) jmp_buf[1];
#endif /* GNU_EFI_X86_64_SETJMP_H */ #endif /* GNU_EFI_X86_64_SETJMP_H */
--
2.24.1

View File

@ -1,7 +1,7 @@
From de4e5e4e3b6faaf05b0b9a9a7ead882269078dc3 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Fri, 15 Mar 2019 09:48:10 -0400 Date: Fri, 15 Mar 2019 09:48:10 -0400
Subject: [PATCH 07/45] Make.rules incomplete/wrong; make -r failure Subject: [PATCH] Make.rules incomplete/wrong; make -r failure
Make.rules is not complete; in particular it lacks a %.o: %.S rule. Make.rules is not complete; in particular it lacks a %.o: %.S rule.
This happens to work due to the builtin make rule to that effect. but This happens to work due to the builtin make rule to that effect. but
@ -46,6 +46,3 @@ index 5b1c2862e1b..8cb93b0a039 100644
+ +
+%.s: %.S +%.s: %.S
$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -E $< -o $@ $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -E $< -o $@
--
2.24.1

View File

@ -1,9 +1,9 @@
From 230c36c6aa4fcb1db61ce177264e224c26314da1 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Tue, 2 Apr 2019 09:47:24 -0400 Date: Tue, 2 Apr 2019 09:47:24 -0400
Subject: [PATCH 08/45] gnuefi/Makefile uses a strange rule to create Subject: [PATCH] gnuefi/Makefile uses a strange rule to create libgnuefi.a,
libgnuefi.a, which only works because of a "make" builtin rule. This breaks which only works because of a "make" builtin rule. This breaks make -r, and
make -r, and it is an inefficient way to build, at least for multiple files. it is an inefficient way to build, at least for multiple files.
I have made a git tree which includes a patch for this problem, I have made a git tree which includes a patch for this problem,
and also forces -r by adding it to MAKEFLAGS: and also forces -r by adding it to MAKEFLAGS:
@ -31,6 +31,3 @@ index 2a61699ac25..10d4e7addd0 100644
clean: clean:
rm -f $(TARGETS) *~ *.o $(OBJS) rm -f $(TARGETS) *~ *.o $(OBJS)
--
2.24.1

View File

@ -1,8 +1,8 @@
From 238358c6df96923c4510f5e2793a9976c3afdd44 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: leo <leo.sartre@geebol.fr> From: leo <leo.sartre@geebol.fr>
Date: Tue, 14 May 2019 07:44:28 +0200 Date: Tue, 14 May 2019 07:44:28 +0200
Subject: [PATCH 09/45] efiapi.h: fix EventGroup parameter of Subject: [PATCH] efiapi.h: fix EventGroup parameter of EFI_CREATE_EVENT_EX
EFI_CREATE_EVENT_EX prototype prototype
From UEFI specifications, this parameter is a pointer, see From UEFI specifications, this parameter is a pointer, see
https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
@ -26,6 +26,3 @@ index e7d2abd79de..bdf5de26a3f 100644
OUT EFI_EVENT *Event OUT EFI_EVENT *Event
); );
--
2.24.1

View File

@ -1,7 +1,7 @@
From 486ba3c3bdd147b7d98159b9e650be60bce0f027 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: leo <leo.sartre@geebol.fr> From: leo <leo.sartre@geebol.fr>
Date: Wed, 15 May 2019 05:32:21 +0200 Date: Wed, 15 May 2019 05:32:21 +0200
Subject: [PATCH 10/45] Do not include efisetjmp.h on efi.h Subject: [PATCH] Do not include efisetjmp.h on efi.h
People than really want to use efisetjmp implementation can include People than really want to use efisetjmp implementation can include
the header on their own. the header on their own.
@ -35,6 +35,3 @@ index 9cbc22dc370..2ddd53e0d95 100644
-#include "efisetjmp.h" -#include "efisetjmp.h"
#endif #endif
--
2.24.1

View File

@ -1,7 +1,7 @@
From 9b14e7dab0abf0ef062db60666b677b33e10c627 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Thu, 3 Oct 2019 12:05:00 -0400 Date: Thu, 3 Oct 2019 12:05:00 -0400
Subject: [PATCH 11/45] Bump revision to VERSION = 3.0.10 Subject: [PATCH] Bump revision to VERSION = 3.0.10
--- ---
Makefile | 2 +- Makefile | 2 +-
@ -20,6 +20,3 @@ index 01d1a01369e..a15513dcbba 100644
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
SRCDIR = $(dir $(MKFILE_PATH)) SRCDIR = $(dir $(MKFILE_PATH))
--
2.24.1

View File

@ -1,7 +1,7 @@
From 8b2da2c2247af28bd681a9c8e3231559964c80a6 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Mon, 28 Oct 2019 07:45:38 -0400 Date: Mon, 28 Oct 2019 07:45:38 -0400
Subject: [PATCH 12/45] Revert "efilink: fix build with gcc 4.8" Subject: [PATCH] Revert "efilink: fix build with gcc 4.8"
Breaks gcc builds with '-nostdinc' flag. Breaks gcc builds with '-nostdinc' flag.
@ -29,6 +29,3 @@ index b69a6fd5cf5..cc5aa2dc57b 100644
/*++ /*++
Copyright (c) 1998 Intel Corporation Copyright (c) 1998 Intel Corporation
--
2.24.1

View File

@ -1,7 +1,7 @@
From 2ab1abfd26ea0a87a4fdf3d3c532544a65ae6954 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Mon, 28 Oct 2019 07:48:52 -0400 Date: Mon, 28 Oct 2019 07:48:52 -0400
Subject: [PATCH 13/45] Bump revision to VERSION = 3.0.11 Subject: [PATCH] Bump revision to VERSION = 3.0.11
--- ---
Makefile | 2 +- Makefile | 2 +-
@ -20,6 +20,3 @@ index a15513dcbba..84f07d33a48 100644
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
SRCDIR = $(dir $(MKFILE_PATH)) SRCDIR = $(dir $(MKFILE_PATH))
--
2.24.1

View File

@ -1,7 +1,7 @@
From 6685cd000223f6b7d667e2854cd3d622d078d147 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com> From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 27 Nov 2019 17:03:42 -0600 Date: Wed, 27 Nov 2019 17:03:42 -0600
Subject: [PATCH 14/45] efibind: Fix usage of efi headers from C++ code Subject: [PATCH] efibind: Fix usage of efi headers from C++ code
* __STDC_VERSION__ is undefined when headers are called from C++ * __STDC_VERSION__ is undefined when headers are called from C++
code resulting in not using stdint.h and efibind.h code resulting in not using stdint.h and efibind.h
@ -106,6 +106,3 @@ index ae40595be0b..31e9e119d74 100644
#include <stdint.h> #include <stdint.h>
#endif #endif
--
2.24.1

View File

@ -1,7 +1,7 @@
From 44267b59d892041048c70e1f8fa17be0829d0978 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ben Wolsieffer <benwolsieffer@gmail.com> From: Ben Wolsieffer <benwolsieffer@gmail.com>
Date: Tue, 5 Nov 2019 00:09:12 -0500 Date: Tue, 5 Nov 2019 00:09:12 -0500
Subject: [PATCH 15/45] Fix ARCH on ARMv6. Subject: [PATCH] Fix ARCH on ARMv6.
Extends the armv7 ARCH sed expression to work correctly on armv6. Extends the armv7 ARCH sed expression to work correctly on armv6.
@ -30,6 +30,3 @@ index ba743f17893..5695b2ac1ab 100755
endif endif
# FreeBSD (and possibly others) reports amd64 instead of x86_64 # FreeBSD (and possibly others) reports amd64 instead of x86_64
--
2.24.1

View File

@ -1,7 +1,7 @@
From 9b63de7db6850b2415bb46fa28e0d62fa2f2f50e Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com> From: Nigel Croxon <ncroxon@redhat.com>
Date: Thu, 16 Jan 2020 14:35:56 -0500 Date: Thu, 16 Jan 2020 14:35:56 -0500
Subject: [PATCH 16/45] Re-add back the original symbol, typeo. Subject: [PATCH] Re-add back the original symbol, typeo.
Fix breaking code by restoring original typeo in efierr.h Fix breaking code by restoring original typeo in efierr.h
EFI_WARN_UNKOWN_GLYPH definition. EFI_WARN_UNKOWN_GLYPH definition.
@ -25,6 +25,3 @@ index d351c1ca225..5a66e1a0676 100644
#define EFI_WARN_UNKNOWN_GLYPH EFIWARN(1) #define EFI_WARN_UNKNOWN_GLYPH EFIWARN(1)
#define EFI_WARN_DELETE_FAILURE EFIWARN(2) #define EFI_WARN_DELETE_FAILURE EFIWARN(2)
#define EFI_WARN_WRITE_FAILURE EFIWARN(3) #define EFI_WARN_WRITE_FAILURE EFIWARN(3)
--
2.24.1

View File

@ -1,11 +1,11 @@
From 26dcc62ec7d67dc3dc18faedbd8cb99b28e4fc69 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Soop <sebastian_osorio@outlook.cl> From: Soop <sebastian_osorio@outlook.cl>
Date: Thu, 17 Dec 2015 01:21:45 -0300 Date: Thu, 17 Dec 2015 01:21:45 -0300
Subject: [PATCH 17/45] Add elf.h for cross-building without a system libelf Subject: [PATCH] Add elf.h for cross-building without a system libelf
installed. installed.
--- ---
inc/elf.h | 4023 +++++++++++++++++++++++++++++++++++++++++++++++++++++ inc/elf.h | 4023 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 4023 insertions(+) 1 file changed, 4023 insertions(+)
create mode 100644 inc/elf.h create mode 100644 inc/elf.h
@ -4038,6 +4038,3 @@ index 00000000000..d39b8f8b440
+#define R_NDS32_TLS_DESC 119 +#define R_NDS32_TLS_DESC 119
+ +
+#endif /* elf.h */ +#endif /* elf.h */
--
2.24.1

View File

@ -1,8 +1,7 @@
From 643f7e5d01fb6a5633b24c811c098b38a1b60d89 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: sgerwk <sgerwk@aol.com> From: sgerwk <sgerwk@aol.com>
Date: Thu, 2 May 2019 12:57:16 +0200 Date: Thu, 2 May 2019 12:57:16 +0200
Subject: [PATCH 18/45] make parameter to compile apps + add example output Subject: [PATCH] make parameter to compile apps + add example output directory
directory
--- ---
README.gnuefi | 4 ++-- README.gnuefi | 4 ++--
@ -25,6 +24,3 @@ index 512698c28b4..a65e5f9042a 100644
** Running ** Running
--
2.24.1

View File

@ -1,7 +1,7 @@
From ba53984ceeba5309c2769b0cfb34328fe10ee6ca Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Rick Mark <rickmark@outlook.com> From: Rick Mark <rickmark@outlook.com>
Date: Fri, 27 Oct 2017 14:05:39 -0700 Date: Fri, 27 Oct 2017 14:05:39 -0700
Subject: [PATCH 19/45] Support for building on macOS systems Subject: [PATCH] Support for building on macOS systems
--- ---
Make.defaults | 12 ++++++++++-- Make.defaults | 12 ++++++++++--
@ -84,6 +84,3 @@ index e870aef703a..e3e51959719 100644
longjmp: longjmp:
movl %esi, %eax movl %esi, %eax
movq 0x00(%rdi), %rbx movq 0x00(%rdi), %rbx
--
2.24.1

View File

@ -1,7 +1,7 @@
From 8858302ab24885e96e4094cbd604e8781a7a4bf3 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Soop <sebastian_osorio@outlook.cl> From: Soop <sebastian_osorio@outlook.cl>
Date: Wed, 16 Dec 2015 22:33:33 -0300 Date: Wed, 16 Dec 2015 22:33:33 -0300
Subject: [PATCH 20/45] Make apps link against the local gnuefi and crt objects Subject: [PATCH] Make apps link against the local gnuefi and crt objects
--- ---
apps/Makefile | 4 ++-- apps/Makefile | 4 ++--
@ -28,6 +28,3 @@ index 4e1b69a38c8..310c6fdb5fc 100644
LOADLIBES += -lefi -lgnuefi LOADLIBES += -lefi -lgnuefi
LOADLIBES += $(LIBGCC) LOADLIBES += $(LIBGCC)
--
2.24.1

View File

@ -1,7 +1,7 @@
From 87cbb23de321f4fbc3d795ed5e40bcbeb833deaf Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Apr 2018 16:49:36 -0400 Date: Wed, 11 Apr 2018 16:49:36 -0400
Subject: [PATCH 21/45] Add .travis.yml Subject: [PATCH] Add .travis.yml
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -32,6 +32,3 @@ index 00000000000..eb9be1e46f2
+ +
+script: +script:
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run vathpela/efi-ci-rawhide:v0 /bin/sh -c "cd /root/ && ./build.sh --branch \"$TRAVIS_BRANCH\" --commit \"$TRAVIS_COMMIT\" --commit-range \"$TRAVIS_COMMIT_RANGE\" --event-type \"$TRAVIS_EVENT_TYPE\" --pull-request \"$TRAVIS_PULL_REQUEST\" --pr-branch \"$TRAVIS_PULL_REQUEST_BRANCH\" --pr-sha \"$TRAVIS_PULL_REQUEST_SHA\" --remote \"$TRAVIS_PULL_REQUEST_SLUG\" --repo \"$TRAVIS_REPO_SLUG\" --test-subject gnu-efi" ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run vathpela/efi-ci-rawhide:v0 /bin/sh -c "cd /root/ && ./build.sh --branch \"$TRAVIS_BRANCH\" --commit \"$TRAVIS_COMMIT\" --commit-range \"$TRAVIS_COMMIT_RANGE\" --event-type \"$TRAVIS_EVENT_TYPE\" --pull-request \"$TRAVIS_PULL_REQUEST\" --pr-branch \"$TRAVIS_PULL_REQUEST_BRANCH\" --pr-sha \"$TRAVIS_PULL_REQUEST_SHA\" --remote \"$TRAVIS_PULL_REQUEST_SLUG\" --repo \"$TRAVIS_REPO_SLUG\" --test-subject gnu-efi" ; fi
--
2.24.1

View File

@ -1,8 +1,7 @@
From 452e6edc834fcbc8eb033b85b48e27ff199058ec Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Tue, 1 May 2018 14:12:01 -0400 Date: Tue, 1 May 2018 14:12:01 -0400
Subject: [PATCH 22/45] Use EFI canonical names everywhere the compiler doesn't Subject: [PATCH] Use EFI canonical names everywhere the compiler doesn't care.
care.
Always use x64/X64 and aa64/AA64 unless the toolchain cares about Always use x64/X64 and aa64/AA64 unless the toolchain cares about
"x86_64" or whatnot. "x86_64" or whatnot.
@ -12,36 +11,36 @@ defined in the UEFI specs.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
Make.defaults | 39 +++++++++++++------ Make.defaults | 39 +++++++++++++++-------
README.gnuefi | 6 +-- README.gnuefi | 6 ++--
apps/Makefile | 6 +-- apps/Makefile | 6 ++--
gnuefi/Makefile | 6 +-- gnuefi/Makefile | 6 ++--
.../{crt0-efi-aarch64.S => crt0-efi-aa64.S} | 2 +- gnuefi/{crt0-efi-aarch64.S => crt0-efi-aa64.S} | 2 +-
gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} | 2 +- gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} | 2 +-
.../{elf_aarch64_efi.lds => elf_aa64_efi.lds} | 0 gnuefi/{elf_aarch64_efi.lds => elf_aa64_efi.lds} | 0
.../{elf_x86_64_efi.lds => elf_x64_efi.lds} | 2 +- gnuefi/{elf_x86_64_efi.lds => elf_x64_efi.lds} | 2 +-
...6_64_fbsd_efi.lds => elf_x64_fbsd_efi.lds} | 2 +- ...lf_x86_64_fbsd_efi.lds => elf_x64_fbsd_efi.lds} | 2 +-
gnuefi/{reloc_aarch64.c => reloc_aa64.c} | 2 +- gnuefi/{reloc_aarch64.c => reloc_aa64.c} | 2 +-
gnuefi/{reloc_x86_64.c => reloc_x64.c} | 2 +- gnuefi/{reloc_x86_64.c => reloc_x64.c} | 2 +-
inc/{aarch64 => aa64}/efibind.h | 3 ++ inc/{aarch64 => aa64}/efibind.h | 3 ++
inc/{aarch64 => aa64}/efilibplat.h | 0 inc/{aarch64 => aa64}/efilibplat.h | 0
inc/{aarch64 => aa64}/efisetjmp_arch.h | 6 +-- inc/{aarch64 => aa64}/efisetjmp_arch.h | 6 ++--
inc/efiapi.h | 5 ++- inc/efiapi.h | 5 ++-
inc/efidebug.h | 2 +- inc/efidebug.h | 2 +-
inc/{x86_64 => x64}/efibind.h | 4 +- inc/{x86_64 => x64}/efibind.h | 4 +--
inc/{x86_64 => x64}/efilibplat.h | 0 inc/{x86_64 => x64}/efilibplat.h | 0
inc/{x86_64 => x64}/efisetjmp_arch.h | 6 +-- inc/{x86_64 => x64}/efisetjmp_arch.h | 6 ++--
inc/{x86_64 => x64}/pe.h | 0 inc/{x86_64 => x64}/pe.h | 0
lib/Makefile | 4 +- lib/Makefile | 4 +--
lib/{aarch64 => aa64}/efi_stub.S | 0 lib/{aarch64 => aa64}/efi_stub.S | 0
lib/{aarch64 => aa64}/initplat.c | 0 lib/{aarch64 => aa64}/initplat.c | 0
lib/{aarch64 => aa64}/math.c | 0 lib/{aarch64 => aa64}/math.c | 0
lib/{aarch64 => aa64}/setjmp.S | 0 lib/{aarch64 => aa64}/setjmp.S | 0
lib/{x86_64 => x64}/callwrap.c | 0 lib/{x86_64 => x64}/callwrap.c | 0
lib/{x86_64 => x64}/efi_stub.S | 0 lib/{x86_64 => x64}/efi_stub.S | 0
lib/{x86_64 => x64}/initplat.c | 0 lib/{x86_64 => x64}/initplat.c | 0
lib/{x86_64 => x64}/math.c | 0 lib/{x86_64 => x64}/math.c | 0
lib/{x86_64 => x64}/setjmp.S | 0 lib/{x86_64 => x64}/setjmp.S | 0
30 files changed, 60 insertions(+), 39 deletions(-) 30 files changed, 60 insertions(+), 39 deletions(-)
rename gnuefi/{crt0-efi-aarch64.S => crt0-efi-aa64.S} (98%) rename gnuefi/{crt0-efi-aarch64.S => crt0-efi-aa64.S} (98%)
rename gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} (97%) rename gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} (97%)
@ -481,6 +480,3 @@ diff --git a/lib/x86_64/setjmp.S b/lib/x64/setjmp.S
similarity index 100% similarity index 100%
rename from lib/x86_64/setjmp.S rename from lib/x86_64/setjmp.S
rename to lib/x64/setjmp.S rename to lib/x64/setjmp.S
--
2.24.1

View File

@ -1,7 +1,7 @@
From 3219b3e5201a3dd207839c6cc234252b79be6caf Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Mon, 11 Jun 2018 13:41:05 -0400 Date: Mon, 11 Jun 2018 13:41:05 -0400
Subject: [PATCH 23/45] Fix a minor coverity complaint in some apps Subject: [PATCH] Fix a minor coverity complaint in some apps
Coverity added a new kind of check, and it noticed some minor errors Coverity added a new kind of check, and it noticed some minor errors
with some types in two of the apps here, both of the same form: with some types in two of the apps here, both of the same form:
@ -54,6 +54,3 @@ index 53a255afbb9..ac50f4eafa9 100644
BufferSize = NumPixels * sizeof(UINT32); BufferSize = NumPixels * sizeof(UINT32);
if (BufferSize == gop->Mode->FrameBufferSize) { if (BufferSize == gop->Mode->FrameBufferSize) {
CopySize = BufferSize; CopySize = BufferSize;
--
2.24.1

View File

@ -1,7 +1,7 @@
From 5139f7315ef5fee331ced3e851a8833f30aac656 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:45:38 -0400 Date: Fri, 25 Oct 2019 15:45:38 -0400
Subject: [PATCH 30/45] Add stuff that's got weird characters to .gitattributes Subject: [PATCH] Add stuff that's got weird characters to .gitattributes
Some of these files will be removed in a later patch, but they need to Some of these files will be removed in a later patch, but they need to
stay in .gitattributes until after the next release, because they make stay in .gitattributes until after the next release, because they make
@ -9,22 +9,20 @@ patch application break in weird ways.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
.gitattributes | 6 ++++++ .gitattributes | 7 +++++++
1 file changed, 6 insertions(+) 1 file changed, 7 insertions(+)
create mode 100644 .gitattributes create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes diff --git a/.gitattributes b/.gitattributes
new file mode 100644 new file mode 100644
index 00000000000..d3a9be78dfa index 00000000000..b9c1467125b
--- /dev/null --- /dev/null
+++ b/.gitattributes +++ b/.gitattributes
@@ -0,0 +1,6 @@ @@ -0,0 +1,7 @@
+inc/inc.mak binary +inc/inc.mak binary
+inc/make.inf binary +inc/make.inf binary
+inc/makefile.hdr binary +inc/makefile.hdr binary
+inc/protocol/efidbg.h binary
+inc/protocol/ia64/eficontext.h binary +inc/protocol/ia64/eficontext.h binary
+inc/protocol/make.inf binary +inc/protocol/make.inf binary
+inc/protocol/makefile.hdr binary +inc/protocol/makefile.hdr binary
--
2.24.1

View File

@ -1,312 +0,0 @@
From 060258e1de84d1de3a5975bebe27575114220cdc Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 19 Jul 2018 13:12:44 -0400
Subject: [PATCH 24/45] Get rid of some unused junk that has the BSD 4-clause
license.
We don't need any of this, and its license is not GPL compatible.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
inc/Makefile | 4 -
inc/protocol/efidbg.h | 210 ---------------------------------
inc/protocol/ia64/eficontext.h | Bin 5111 -> 0 bytes
inc/protocol/makefile.hdr | Bin 640 -> 0 bytes
4 files changed, 214 deletions(-)
delete mode 100644 inc/protocol/efidbg.h
delete mode 100644 inc/protocol/ia64/eficontext.h
delete mode 100644 inc/protocol/makefile.hdr
diff --git a/inc/Makefile b/inc/Makefile
index 273d30307ae..dd36bb0103d 100644
--- a/inc/Makefile
+++ b/inc/Makefile
@@ -19,9 +19,5 @@ install:
$(INSTALL) -m 644 $(SRCDIR)/*.h $(INSTALLROOT)$(PREFIX)/include/efi
$(INSTALL) -m 644 $(SRCDIR)/protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
$(INSTALL) -m 644 $(SRCDIR)/$(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
-ifeq ($(ARCH),ia64)
- mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
- $(INSTALL) -m 644 $(SRCDIR)/protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
-endif
include $(SRCDIR)/../Make.rules
diff --git a/inc/protocol/efidbg.h b/inc/protocol/efidbg.h
deleted file mode 100644
index 1f95a70bb42..00000000000
--- a/inc/protocol/efidbg.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Intel Corporation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- *
- * This product includes software developed by Intel Corporation and
- * its contributors.
- *
- * 4. Neither the name of Intel Corporation or its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#ifndef _EFIDBG_H_
-#define _EFIDBG_H_
-
-#include "eficontext.h"
-#include "efiser.h"
-
-typedef struct _DEBUGPORT_16550_CONFIG_DATA {
- UINT32 PortAddress;
- UINT64 BaudRate;
- UINT32 ReceiveFifoDepth;
- UINT32 Timeout;
- UINT8 Parity;
- UINT8 DataBits;
- UINT8 StopBits;
- UINT32 ControlMask;
- BOOLEAN RtsCtsEnable; // RTS, CTS control
-} DEBUGPORT_16550_CONFIG_DATA;
-
-typedef struct _DEBUGPORT_16550_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- DEBUGPORT_16550_CONFIG_DATA ConfigData;
-} DEBUGPORT_16550_DEVICE_PATH;
-
-typedef union {
- EFI_DEVICE_PATH DevPath;
- DEBUGPORT_16550_DEVICE_PATH Uart;
- // add new types of debugport device paths to this union...
-} DEBUGPORT_DEV_PATH;
-
-
-//
-// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
-//
-
-#define DEBUG_SUPPORT_PROTOCOL \
-{ 0x2755590C, 0x6F3C, 0x42fa, 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 }
-
-
-typedef UINTN EXCEPTION_TYPE;
-
-typedef
-VOID
-(*EXCEPTION_HANDLER) (
- IN EXCEPTION_TYPE ExceptionType,
- IN SYSTEM_CONTEXT *SystemContext
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_TIMER_TICK_CALLBACK) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This,
- IN EXCEPTION_HANDLER TimerTickCallback
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_EXCEPTION_HANDLER) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This,
- IN EXCEPTION_HANDLER ExceptionHandler,
- IN EXCEPTION_TYPE ExceptionType
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP_CALL_TRACE) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This
- );
-
-
-#define EFI_DEBUG_SUPPORT_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUG_SUPPORT_INTERFACE {
- UINT32 Revision;
- EFI_REGISTER_TIMER_TICK_CALLBACK RegisterTimerTickCallback;
- EFI_REGISTER_EXCEPTION_HANDLER RegisterExceptionHandler;
- EFI_IP_CALL_TRACE IpCallTrace;
-} EFI_DEBUG_SUPPORT_INTERFACE;
-
-
-//
-// Debugport io protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
-//
-
-#define DEBUGPORT_IO_PROTOCOL \
-{ 0XEBA4E8D2, 0X3858, 0X41EC, 0XA2, 0X81, 0X26, 0X47, 0XBA, 0X96, 0X60, 0XD0 }
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_RESET) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_READ) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_WRITE) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-#define EFI_DEBUGPORT_IO_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUGPORT_IO_INTERFACE {
- UINT32 Revision;
- EFI_DEBUGPORT_IO_READ Read;
- EFI_DEBUGPORT_IO_WRITE Write;
- EFI_DEBUGPORT_IO_RESET Reset;
-} EFI_DEBUGPORT_IO_INTERFACE;
-
-
-//
-// Debugport UART16550 control protocol {628EA978-4C26-4605-BC02-A42A496917DD}
-//
-
-#define DEBUGPORT_UART16550_CONTROL_PROTOCOL \
-{ 0X628EA978, 0X4C26, 0X4605, 0XBC, 0X2, 0XA4, 0X2A, 0X49, 0X69, 0X17, 0XDD }
-
-// Note: The definitions for EFI_PARITY_TYPE, EFI_STOP_BITS_TYPE, and
-// SERIAL_IO_MODE are included from efiser.h
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_SET_ATTRIBUTES) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- IN UINT64 BaudRate,
- IN UINT32 ReceiveFifoDepth,
- IN UINT32 Timeout,
- IN EFI_PARITY_TYPE Parity,
- IN UINT8 DataBits,
- IN EFI_STOP_BITS_TYPE StopBits
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_SET_CONTROL_BITS) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- IN UINT32 Control
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_GET_CONTROL_BITS) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- OUT UINT32 *Control
- );
-
-#define EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE {
- UINT32 Revision;
- EFI_UART16550_SET_ATTRIBUTES SetAttributes;
- EFI_UART16550_SET_CONTROL_BITS SetControl;
- EFI_UART16550_GET_CONTROL_BITS GetControl;
- DEBUGPORT_16550_CONFIG_DATA *Mode;
-} EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE;
-
-
-#define DEVICE_PATH_DEBUGPORT DEBUGPORT_IO_PROTOCOL
-
-#endif /* _EFIDBG_H_ */
diff --git a/inc/protocol/ia64/eficontext.h b/inc/protocol/ia64/eficontext.h
deleted file mode 100644
index 1a39a6db1e45c8bdf96348e5e2fa82567e61df89..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5111
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
AYXATM
diff --git a/inc/protocol/makefile.hdr b/inc/protocol/makefile.hdr
deleted file mode 100644
index 118d6ba3a08df254b3cf4eeecce923bdac063f3a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 640
zcmb7>PiurQ5XJ9;-(l){&_fschtfTGDC(BbMHlrbNYtpIF_CDO_1iaTcS}n_FyxS7
z=J)3DVj3IM*g)3N5!A)d<Eo>aKub80cp^14lo7avAciQ;APi8Z33Xn7M#@>w_xPP`
z$(j6XH&XOUSam6HE?r*?v!rb|fm69~x7$4fAU+WWzL0}ZtEu2>)-+55MSc;4#}quU
zoonGjZW`K#?WDn5fub~fIUI@rC2mf6#Xf41lZNJl6qBd~)5QtPZMT+Vq{Y=-3Nfu`
zPYPvt9M_Y|ZC$qCoX+3|?ZL90V-oven#PH1f#-pR@WZ{el+YI&MgiLE*MiQ|<D$-*
Sq<`Dgu~$NU?D-PkUqhea3AS$l
--
2.24.1

View File

@ -0,0 +1,148 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 19 Jul 2018 13:12:44 -0400
Subject: [PATCH] Get rid of some unused junk that has the BSD 4-clause
license.
We don't need any of this, and its license is not GPL compatible.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
inc/Makefile | 4 ----
inc/protocol/efidbg.h | Bin 6634 -> 0 bytes
inc/protocol/ia64/eficontext.h | Bin 5111 -> 0 bytes
inc/protocol/makefile.hdr | Bin 640 -> 0 bytes
4 files changed, 4 deletions(-)
delete mode 100644 inc/protocol/efidbg.h
delete mode 100644 inc/protocol/ia64/eficontext.h
delete mode 100644 inc/protocol/makefile.hdr
diff --git a/inc/Makefile b/inc/Makefile
index 273d30307ae..dd36bb0103d 100644
--- a/inc/Makefile
+++ b/inc/Makefile
@@ -19,9 +19,5 @@ install:
$(INSTALL) -m 644 $(SRCDIR)/*.h $(INSTALLROOT)$(PREFIX)/include/efi
$(INSTALL) -m 644 $(SRCDIR)/protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
$(INSTALL) -m 644 $(SRCDIR)/$(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
-ifeq ($(ARCH),ia64)
- mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
- $(INSTALL) -m 644 $(SRCDIR)/protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
-endif
include $(SRCDIR)/../Make.rules
diff --git a/inc/protocol/efidbg.h b/inc/protocol/efidbg.h
deleted file mode 100644
index 1f95a70bb42f7b2669fa362f80bc50fe2663aaa8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 6634
zcmcIpS##P*7k!3b(KUIPgaR95AZGH^NDWpEMvNr9RDD&9j2cH3j3`NXnN<G!oZDJi
zyd*WBDwag+_PJ}HUUFQkvKrHZ^>gUoeT~`2`6qVL>-Fla)oeEDo3V=J5)$D$2;JBZ
zR!7vzmrJI4L@bn%3?HPY+Uc7mJwJ*=|8_&-%w2hG6G`T;SQKo+xl}E;{>lxX*&+z<
zqdI%^<F70T)ic<{gmNEv{=%Otm38KZlC5QU@5iz9*g6azd=D@2S2xB@0%y4l9{trF
zn+Ge;C&dw=P``T_|3UBccXG62Uc`b$X4gFMAiarV_!PUamyq4t;6Va4jSzw0S_QE`
zmvu<^5nIAtf+<uh7q{&~Oy*11zn5VisMfwQP+E#iW(@rGHVEAR#~#WIkW<gRV7|GR
zt5^k|{5VEl0(=kIy&KEWcb8F-0F^j0tDN%O!P6sED6aP)!`P1~Jp~3SL7J#>A>DX`
zI-(MwQb8<LV549WKO%*xX(}~Pv|hT;Di%f7-TAjw@VJ!Tog~~m-$<21DM}(3!`1n6
z<3Upf%{=)am%$pvbo;zt>=b}hyB|lC;iRyGFv`7bAF;7S0V6^biIsb=JlGpJ<lQa^
z;_=LGGY8>2YC2$Y<v{^ZLNfe5h*A8i1Ym-P6kxQm1wI^%5~T!Vh(&8TrxAp%K7bxW
z8au0G6h%=skjXjc+_0H#4xB4)35NHHWnLP(&{_Y68DmF`m}XiN)8dX{ju{{8_&s(k
zqd#>_%VvN7&24o1{dWSRuY7#N#P!4yw#`h785fh00W`o{eC!y)t^-yZO?6{DtTUjn
zvFWgpabY+RbIdwS5(Kv2lbHi{AuR12K)i2^4Ch9v92m}+)D57IvkA8xLz|Ac#U@i&
zZYwnMPB(0A#ElD~A2ApK#Y|j^vBT_hJ{leH7I<6E_7&8~;Qf(Ew82^3u!QE2SH+u#
z2*Souo!Jwi8T2Bq1wz5Cn>xZm{sGw*e@!8W?@Z?xd?;-8@r~dhJ=)X~7i6|MARK$z
zw;jWoI)V*NQ&&;9g>`9Y!v4ZWCgowkrnaa<iNi@fB^g1(XT0~Pwn5=jF-O8JYdWD^
ze`4q672<;!aP+3k>P(fu4W-DmZU~oxp)yftSLXulNclK*&#^cK#zwVhl;T_xT2VYs
z$yqiQ!;vu*V@;4vCIMX;w)jL)+%jO|kWxm~b;Y3>bp!1XBhQl8QXwPUNGvl3jO&+x
zf#E7vB#(-)jkJ0IVNbR5H2T@7KCV`)AN<A2lM6Nz14Hi*XXmr(2mJO|vfKo*gjCpX
z_(lvNpW>shziqc;j-<9~{0yoACML+uJZ3Xp^ru4%EoXMp?R1(mRK&m-&L~UldzGdd
zx~3R~r>#nIO@c7yo(H~+zHCW!+llm{d*9u77Wg~qQAq%I1Oac!xdgoo{6(P4b^P@W
zaR>7mxMtgovmMy-&xs2fdVasW?#6B(r1}0Hb{wpe9u-o2(9z7Iibi}MEHB*XTcM$E
znj^u-X|%04(&9+0+}ox6QmGstGs^*gX^x%D2EnrWgT0c)FK_2u7c@|36YiXsa*m=y
zbrfGRqqFC^bTJncX1`)Xg&bY@cNEPp2h1(0DVe)j(emxPDzUeWA)|EpFmbbz*|nym
zB6EOE-7qa3MAh{?wvvyG28ddedGdC1hec;hQ#2M^Yz^>;rbo3lP}UtC9c{S-Eh>!g
zqI!Ice=rIt%-*aO5@yjjm<LPtz4f`%>GYafqdPd&8tvAAH+q7%8~n7-JMB|V=dI2U
z!pMib@@QsHCu+2UJsndsN9=#q@2vTh!PW6ji1ci?7A`$|VBO{uZ>#$$-TPqR=2J(t
zB(l0{X?55SSe|hN)$SORh9(pl&zzfyDDqRiG!4D_u~vM?oT!h4^@)9~R=|_R2kOYg
z(;OojDRmIxy2>hq>>Jw=7eqUbxOQ00evV>!PvZhCri4C~R8kq(4tJ(@^&{T-#9%dQ
zv&7H<jx}>Iv(jDrbEaWF?Q`u<GKW$QWf|!u)db?p!%3?QYrw($tVRpA+`htz)H^k*
z^Af@faZu>^^KY8FT;5_K`14lpDJj`Zs(!(4>b3_<jk{N#mUApMmom&fC&2<irEs@z
z@;gVM#J<~kW1=!NqX}C4vcI{ye3-nFTa*bVVp>Ad)qKJZ^8|m*qT=5Z=!B47<#nKA
zCVRk+BUmK_`Bsra{0_S~Dx{riI?%t!N?MajUD7{KMw-r|`&PhJ1d3b5SX1>np*zP6
z{e!&{#2so=wB`r2KS-HP^m$vH>8-};S?8?LJ`q}jx6V!)t#12spZB`mrrtcjY>L$k
zbGA)v*BKfJ>zV-RNtpEHExMnb(7n}FUp~`a(c5)TwRD@*qBlWoEYEY5{5!-W#jF8K
zuze6tsWSJ9BQv=~9u>tNc~z!N`d)opFR7#Kysa`(m=9W7lP0uXBsYJnRBHXrVj)A@
z|0iW&k|!R|Wp-ckKELMEm4z+UPdl~4!9VL1nEoey%9ho6-S4Hg%pLDyjy;5QCG#e6
z9AJ)}vgEp28(LU^6~lW=MulAoU17bOF1q)eQw5$vMG{M)(!k#{|IoOfa?4TMhHNQX
zqJeJfOz_@kFo4$THrm~0r_tA%tp;zmc)Qo_oqX2ymuMizRqF!F9PP3~2Cl|D@YNG4
z)aX~-pr}Eud9GWuwz+QOOtE?0RreD`6S}TQ0gJRTPB{L+K@E<PXnU0$-_hBiB0_BD
zvCCJhAMEKAbC{D^AA8rdjZPS8t%n^iw$U?C$Azg2b@rET&C=r%fUAAj+eB1E030;q
zPIA~G?9xy=%ne0Hb!vdn?Xgo%7F3Ea?%68Yj%`c)w6#kR>F>Rr+dI3ZJGfk$;#&%M
zhF+;8JGWepY=3d1SIM?*x%htC2pP4XZP(sSZ$*G9Gg*+S8vgU#yd3Ow-}nng5C21>
z%X3f0(J$FtsqNZ)m~)HpW}(gN_tz-+6~Om0a<P=FP#qPB+hY^OBx4>Y2ecAL1_z`w
zr>I_(d>WNK;oUr;R);b!qzk&=JGVhq*Dmm13Hy9rSf1ID2RE5WXi$`QocZp*I43Hd
aHI!CssuET24>&yb7wouJI-_E><LbXng#q*c
diff --git a/inc/protocol/ia64/eficontext.h b/inc/protocol/ia64/eficontext.h
deleted file mode 100644
index 1a39a6db1e45c8bdf96348e5e2fa82567e61df89..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5111
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
AYXATM
diff --git a/inc/protocol/makefile.hdr b/inc/protocol/makefile.hdr
deleted file mode 100644
index 118d6ba3a08df254b3cf4eeecce923bdac063f3a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 640
zcmb7>PiurQ5XJ9;-(l){&_fschtfTGDC(BbMHlrbNYtpIF_CDO_1iaTcS}n_FyxS7
z=J)3DVj3IM*g)3N5!A)d<Eo>aKub80cp^14lo7avAciQ;APi8Z33Xn7M#@>w_xPP`
z$(j6XH&XOUSam6HE?r*?v!rb|fm69~x7$4fAU+WWzL0}ZtEu2>)-+55MSc;4#}quU
zoonGjZW`K#?WDn5fub~fIUI@rC2mf6#Xf41lZNJl6qBd~)5QtPZMT+Vq{Y=-3Nfu`
zPYPvt9M_Y|ZC$qCoX+3|?ZL90V-oven#PH1f#-pR@WZ{el+YI&MgiLE*MiQ|<D$-*
Sq<`Dgu~$NU?D-PkUqhea3AS$l

View File

@ -1,7 +1,7 @@
From 572be899ca9d1fb33fa72e496a3e0fb312dd263d Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:37:17 -0400 Date: Fri, 25 Oct 2019 15:37:17 -0400
Subject: [PATCH 31/45] Get rid of unused make-like files from yore. Subject: [PATCH] Get rid of unused make-like files from yore.
These files are all edk2-like makefile snippets, and we don't use any of These files are all edk2-like makefile snippets, and we don't use any of
them for anything. They've also got DOS line endings and things like them for anything. They've also got DOS line endings and things like
@ -73,6 +73,3 @@ literal 113
zcmY%9<x&PCUasik{L-T2)Z$oPE(IV+P0K7xEYi#1<>JgqO;1d&Ov=wM0dvFB6P<Gs zcmY%9<x&PCUasik{L-T2)Z$oPE(IV+P0K7xEYi#1<>JgqO;1d&Ov=wM0dvFB6P<Gs
hi;F=Vkjl)wlAQd+6c86^N@k+55yB*}fSCzG004;AA3Fd5 hi;F=Vkjl)wlAQd+6c86^N@k+55yB*}fSCzG004;AA3Fd5
--
2.24.1

View File

@ -1,7 +1,7 @@
From 3788e125ecaf08e8cb23ea817bbd9aff42e0bdfe Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 23 Aug 2019 16:23:21 -0400 Date: Fri, 23 Aug 2019 16:23:21 -0400
Subject: [PATCH 25/45] Make ELF constructors and destructors work. Subject: [PATCH] Make ELF constructors and destructors work.
This makes setup and teardown functions defined with This makes setup and teardown functions defined with
__attribute__((__constructor__) and __attribute__((__destructor__)) work __attribute__((__constructor__) and __attribute__((__destructor__)) work
@ -25,33 +25,45 @@ A couple of notes:
- No attempt is made to handle any constructor or destructor with a - No attempt is made to handle any constructor or destructor with a
prototype other than "void func(void);", but note that InitializeLib prototype other than "void func(void);", but note that InitializeLib
has been called, so LibImageHandle, ST, BS, and RT are set. has been called, so LibImageHandle, ST, BS, and RT are set.
- The init_array/ctor/dtor/fini_array lists aren't the using the GNU
"CONSTRUCTOR" output section command, so they don't start with a size.
- The lists are individually sorted during the link stage via
SORT_BY_NAME() in the linker script.
- The default (empty) init_array/ctor/dtor/fini_array lists are padded
out to 8-byte alignment with ".p2align 3, 0", and each list always has
at least one ".long 0" at the end of it (even if it's completely
empty). As a result, they can have NULLs that need to be skipped.
The sections they're in are mergeable, so the NULLs don't have to be
exclusively at the end.
- The ia64 and mips64el arches have not been tested. - The ia64 and mips64el arches have not been tested.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
apps/Makefile | 5 ++- apps/Makefile | 5 ++-
apps/ctors_fns.c | 26 ++++++++++++ apps/ctors_fns.c | 26 +++++++++++++
apps/ctors_test.c | 20 +++++++++ apps/ctors_test.c | 20 ++++++++++
gnuefi/crt0-efi-aa64.S | 2 +- gnuefi/crt0-efi-aa64.S | 2 +-
gnuefi/crt0-efi-arm.S | 2 +- gnuefi/crt0-efi-arm.S | 2 +-
gnuefi/crt0-efi-ia32.S | 8 ++-- gnuefi/crt0-efi-ia32.S | 8 ++--
gnuefi/crt0-efi-ia64.S | 2 +- gnuefi/crt0-efi-ia64.S | 2 +-
gnuefi/crt0-efi-mips64el.S | 4 +- gnuefi/crt0-efi-mips64el.S | 4 +-
gnuefi/crt0-efi-x64.S | 2 +- gnuefi/crt0-efi-x64.S | 2 +-
gnuefi/elf_aa64_efi.lds | 15 +++++++ gnuefi/elf_aa64_efi.lds | 21 +++++++++++
gnuefi/elf_arm_efi.lds | 14 ++++++ gnuefi/elf_arm_efi.lds | 20 ++++++++++
gnuefi/elf_ia32_efi.lds | 15 +++++++ gnuefi/elf_ia32_efi.lds | 21 +++++++++++
gnuefi/elf_ia32_fbsd_efi.lds | 15 +++++++ gnuefi/elf_ia32_fbsd_efi.lds | 21 +++++++++++
gnuefi/elf_ia64_efi.lds | 15 +++++++ gnuefi/elf_ia64_efi.lds | 21 +++++++++++
gnuefi/elf_mips64el_efi.lds | 14 ++++++ gnuefi/elf_mips64el_efi.lds | 20 ++++++++++
gnuefi/elf_x64_efi.lds | 16 +++++++ gnuefi/elf_x64_efi.lds | 22 +++++++++++
gnuefi/elf_x64_fbsd_efi.lds | 15 +++++++ gnuefi/elf_x64_fbsd_efi.lds | 21 +++++++++++
lib/Makefile | 4 +- lib/Makefile | 6 +--
lib/entry.c | 58 +++++++++++++++++++++++++ lib/ctors.S | 43 ++++++++++++++++++++++
lib/init.c | 82 ++++++++++++++++++------------------ lib/entry.c | 67 ++++++++++++++++++++++++++++++++++
20 files changed, 281 insertions(+), 53 deletions(-) lib/init.c | 87 +++++++++++++++++++++-----------------------
21 files changed, 381 insertions(+), 60 deletions(-)
create mode 100644 apps/ctors_fns.c create mode 100644 apps/ctors_fns.c
create mode 100644 apps/ctors_test.c create mode 100644 apps/ctors_test.c
create mode 100644 lib/ctors.S
create mode 100644 lib/entry.c create mode 100644 lib/entry.c
diff --git a/apps/Makefile b/apps/Makefile diff --git a/apps/Makefile b/apps/Makefile
@ -225,13 +237,19 @@ index 6533af7461f..3fe361b7ffd 100644
.exit: .exit:
diff --git a/gnuefi/elf_aa64_efi.lds b/gnuefi/elf_aa64_efi.lds diff --git a/gnuefi/elf_aa64_efi.lds b/gnuefi/elf_aa64_efi.lds
index 836d98255d8..7220636e40c 100644 index 836d98255d8..161f5fc5641 100644
--- a/gnuefi/elf_aa64_efi.lds --- a/gnuefi/elf_aa64_efi.lds
+++ b/gnuefi/elf_aa64_efi.lds +++ b/gnuefi/elf_aa64_efi.lds
@@ -26,6 +26,20 @@ SECTIONS @@ -26,6 +26,26 @@ SECTIONS
*(.got.plt) *(.got.plt)
*(.got) *(.got)
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -249,7 +267,7 @@ index 836d98255d8..7220636e40c 100644
/* the EFI loader doesn't seem to like a .bss section, so we stick /* the EFI loader doesn't seem to like a .bss section, so we stick
it all into .data: */ it all into .data: */
. = ALIGN(16); . = ALIGN(16);
@@ -36,6 +50,7 @@ SECTIONS @@ -36,6 +56,7 @@ SECTIONS
*(.bss) *(.bss)
*(COMMON) *(COMMON)
. = ALIGN(16); . = ALIGN(16);
@ -258,13 +276,19 @@ index 836d98255d8..7220636e40c 100644
} }
diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
index 665bbdbf065..f891921e58f 100644 index 665bbdbf065..f93f39bc384 100644
--- a/gnuefi/elf_arm_efi.lds --- a/gnuefi/elf_arm_efi.lds
+++ b/gnuefi/elf_arm_efi.lds +++ b/gnuefi/elf_arm_efi.lds
@@ -26,6 +26,20 @@ SECTIONS @@ -26,6 +26,26 @@ SECTIONS
*(.got.plt) *(.got.plt)
*(.got) *(.got)
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -283,14 +307,20 @@ index 665bbdbf065..f891921e58f 100644
it all into .data: */ it all into .data: */
. = ALIGN(16); . = ALIGN(16);
diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds
index f27fe5fc6e6..739c370c9eb 100644 index f27fe5fc6e6..4b7e3f1df39 100644
--- a/gnuefi/elf_ia32_efi.lds --- a/gnuefi/elf_ia32_efi.lds
+++ b/gnuefi/elf_ia32_efi.lds +++ b/gnuefi/elf_ia32_efi.lds
@@ -40,6 +40,21 @@ SECTIONS @@ -40,6 +40,27 @@ SECTIONS
*(.sdata) *(.sdata)
*(.got.plt) *(.got.plt)
*(.got) *(.got)
+ +
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -309,14 +339,20 @@ index f27fe5fc6e6..739c370c9eb 100644
it all into .data: */ it all into .data: */
*(.sbss) *(.sbss)
diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds
index cd309e24f7f..33c38a0b2d0 100644 index cd309e24f7f..9e9baec2aca 100644
--- a/gnuefi/elf_ia32_fbsd_efi.lds --- a/gnuefi/elf_ia32_fbsd_efi.lds
+++ b/gnuefi/elf_ia32_fbsd_efi.lds +++ b/gnuefi/elf_ia32_fbsd_efi.lds
@@ -40,6 +40,21 @@ SECTIONS @@ -40,6 +40,27 @@ SECTIONS
*(.sdata) *(.sdata)
*(.got.plt) *(.got.plt)
*(.got) *(.got)
+ +
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -335,14 +371,20 @@ index cd309e24f7f..33c38a0b2d0 100644
it all into .data: */ it all into .data: */
*(.sbss) *(.sbss)
diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds
index 190792a0c94..5afd6443722 100644 index 190792a0c94..2cda0dd97c7 100644
--- a/gnuefi/elf_ia64_efi.lds --- a/gnuefi/elf_ia64_efi.lds
+++ b/gnuefi/elf_ia64_efi.lds +++ b/gnuefi/elf_ia64_efi.lds
@@ -39,6 +39,21 @@ SECTIONS @@ -39,6 +39,27 @@ SECTIONS
*(.data*) *(.data*)
*(.gnu.linkonce.d*) *(.gnu.linkonce.d*)
*(.plabel) /* data whose relocs we want to ignore */ *(.plabel) /* data whose relocs we want to ignore */
+ +
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -361,13 +403,19 @@ index 190792a0c94..5afd6443722 100644
it all into .data: */ it all into .data: */
*(.dynbss) *(.dynbss)
diff --git a/gnuefi/elf_mips64el_efi.lds b/gnuefi/elf_mips64el_efi.lds diff --git a/gnuefi/elf_mips64el_efi.lds b/gnuefi/elf_mips64el_efi.lds
index 4d1a077d8f8..cc0eee3bdcd 100644 index 4d1a077d8f8..0e68084d103 100644
--- a/gnuefi/elf_mips64el_efi.lds --- a/gnuefi/elf_mips64el_efi.lds
+++ b/gnuefi/elf_mips64el_efi.lds +++ b/gnuefi/elf_mips64el_efi.lds
@@ -27,6 +27,20 @@ SECTIONS @@ -27,6 +27,26 @@ SECTIONS
HIDDEN (_gp = ALIGN (16) + 0x7ff0); HIDDEN (_gp = ALIGN (16) + 0x7ff0);
*(.got) *(.got)
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -386,7 +434,7 @@ index 4d1a077d8f8..cc0eee3bdcd 100644
it all into .data: */ it all into .data: */
. = ALIGN(16); . = ALIGN(16);
diff --git a/gnuefi/elf_x64_efi.lds b/gnuefi/elf_x64_efi.lds diff --git a/gnuefi/elf_x64_efi.lds b/gnuefi/elf_x64_efi.lds
index c7a105898c8..356e63bb8a7 100644 index c7a105898c8..cb2e3dc00aa 100644
--- a/gnuefi/elf_x64_efi.lds --- a/gnuefi/elf_x64_efi.lds
+++ b/gnuefi/elf_x64_efi.lds +++ b/gnuefi/elf_x64_efi.lds
@@ -30,6 +30,7 @@ SECTIONS @@ -30,6 +30,7 @@ SECTIONS
@ -397,11 +445,17 @@ index c7a105898c8..356e63bb8a7 100644
. = ALIGN(4096); . = ALIGN(4096);
.data : .data :
{ {
@@ -39,6 +40,21 @@ SECTIONS @@ -39,6 +40,27 @@ SECTIONS
*(.got) *(.got)
*(.data*) *(.data*)
*(.sdata) *(.sdata)
+ +
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -420,14 +474,20 @@ index c7a105898c8..356e63bb8a7 100644
it all into .data: */ it all into .data: */
*(.sbss) *(.sbss)
diff --git a/gnuefi/elf_x64_fbsd_efi.lds b/gnuefi/elf_x64_fbsd_efi.lds diff --git a/gnuefi/elf_x64_fbsd_efi.lds b/gnuefi/elf_x64_fbsd_efi.lds
index 705719bf68b..e371e5b784f 100644 index 705719bf68b..192aa065d8c 100644
--- a/gnuefi/elf_x64_fbsd_efi.lds --- a/gnuefi/elf_x64_fbsd_efi.lds
+++ b/gnuefi/elf_x64_fbsd_efi.lds +++ b/gnuefi/elf_x64_fbsd_efi.lds
@@ -36,6 +36,21 @@ SECTIONS @@ -36,6 +36,27 @@ SECTIONS
*(.got) *(.got)
*(.data*) *(.data*)
*(.sdata) *(.sdata)
+ +
+ /*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ . = ALIGN(16); + . = ALIGN(16);
+ _init_array = .; + _init_array = .;
+ *(SORT_BY_NAME(.init_array)) + *(SORT_BY_NAME(.init_array))
@ -446,7 +506,7 @@ index 705719bf68b..e371e5b784f 100644
it all into .data: */ it all into .data: */
*(.sbss) *(.sbss)
diff --git a/lib/Makefile b/lib/Makefile diff --git a/lib/Makefile b/lib/Makefile
index 8bf94000e33..1c2ff1db89a 100644 index 8bf94000e33..e7eafc01f1e 100644
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -43,8 +43,8 @@ include $(SRCDIR)/../Make.defaults @@ -43,8 +43,8 @@ include $(SRCDIR)/../Make.defaults
@ -460,12 +520,70 @@ index 8bf94000e33..1c2ff1db89a 100644
misc print sread str cmdline \ misc print sread str cmdline \
runtime/rtlock runtime/efirtlib runtime/rtstr runtime/vm runtime/rtdata \ runtime/rtlock runtime/efirtlib runtime/rtstr runtime/vm runtime/rtdata \
$(ARCH)/initplat $(ARCH)/math $(ARCH)/setjmp $(ARCH)/initplat $(ARCH)/math $(ARCH)/setjmp
@@ -62,7 +62,7 @@ FILES += $(ARCH)/uldiv $(ARCH)/ldivmod $(ARCH)/div $(ARCH)/llsl $(ARCH)/llsr \
$(ARCH)/mullu
endif
-OBJS = $(FILES:%=%.o)
+OBJS = $(FILES:%=%.o) ctors.o
SUBDIRS = ia32 x64 ia64 aa64 arm mips64el runtime
diff --git a/lib/ctors.S b/lib/ctors.S
new file mode 100644
index 00000000000..522d31b90d2
--- /dev/null
+++ b/lib/ctors.S
@@ -0,0 +1,43 @@
+/*
+ * Try to define the minimal empty init/ctor/dtor/fini_arrays so building with
+ * older or out-of-tree linker scripts will still work.
+ */
+/*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+ .section .init_array, "aM", @init_array
+ .p2align 3, 0
+ .globl _init_array
+_init_array:
+ .p2align 3, 0
+ .globl _init_array_end
+_init_array_end:
+ .long 0
+ .section .ctors, "aM", @init_array
+ .p2align 3, 0
+ .globl __CTOR_LIST__
+__CTOR_LIST__:
+ .p2align 3, 0
+ .globl __CTOR_END__
+__CTOR_END__:
+ .long 0
+ .section .dtors, "aM", @fini_array
+ .p2align 3, 0
+ .globl __DTOR_LIST__
+__DTOR_LIST__:
+ .p2align 3, 0
+ .globl __DTOR_END__
+__DTOR_END__:
+ .long 0
+ .section .fini_array, "aM", @fini_array
+ .p2align 3, 0
+ .globl _fini_array
+_fini_array:
+ .p2align 3, 0
+ .globl _fini_array_end
+_fini_array_end:
+ .long 0
+
diff --git a/lib/entry.c b/lib/entry.c diff --git a/lib/entry.c b/lib/entry.c
new file mode 100644 new file mode 100644
index 00000000000..79d00025eda index 00000000000..d8526084602
--- /dev/null --- /dev/null
+++ b/lib/entry.c +++ b/lib/entry.c
@@ -0,0 +1,58 @@ @@ -0,0 +1,67 @@
+/* +/*
+ * ctors.c + * ctors.c
+ * Copyright 2019 Peter Jones <pjones@redhat.com> + * Copyright 2019 Peter Jones <pjones@redhat.com>
@ -475,6 +593,12 @@ index 00000000000..79d00025eda
+#include <efi.h> +#include <efi.h>
+#include <efilib.h> +#include <efilib.h>
+ +
+/*
+ * Note that these aren't the using the GNU "CONSTRUCTOR" output section
+ * command, so they don't start with a size. Because of p2align and the
+ * end/END definitions, and the fact that they're mergeable, they can also
+ * have NULLs which aren't guaranteed to be at the end.
+ */
+extern UINTN _init_array, _init_array_end; +extern UINTN _init_array, _init_array_end;
+extern UINTN __CTOR_LIST__, __CTOR_END__; +extern UINTN __CTOR_LIST__, __CTOR_END__;
+extern UINTN _fini_array, _fini_array_end; +extern UINTN _fini_array, _fini_array_end;
@ -486,26 +610,29 @@ index 00000000000..79d00025eda
+{ +{
+ for (funcp *location = (void *)&_init_array; location < (funcp *)&_init_array_end; location++) { + for (funcp *location = (void *)&_init_array; location < (funcp *)&_init_array_end; location++) {
+ funcp func = *location; + funcp func = *location;
+ func(); + if (location != NULL)
+ func();
+ } + }
+ +
+ for (funcp *location = (void *)&__CTOR_LIST__; location < (funcp *)&__CTOR_END__; location++) { + for (funcp *location = (void *)&__CTOR_LIST__; location < (funcp *)&__CTOR_END__; location++) {
+ funcp func = *location; + funcp func = *location;
+ func(); + if (location != NULL)
+ func();
+ } + }
+
+} +}
+ +
+static void dtors(void) +static void dtors(void)
+{ +{
+ for (funcp *location = (void *)&__DTOR_LIST__; location < (funcp *)&__DTOR_END__; location++) { + for (funcp *location = (void *)&__DTOR_LIST__; location < (funcp *)&__DTOR_END__; location++) {
+ funcp func = *location; + funcp func = *location;
+ func(); + if (location != NULL)
+ func();
+ } + }
+ +
+ for (funcp *location = (void *)&_fini_array; location < (funcp *)&_fini_array_end; location++) { + for (funcp *location = (void *)&_fini_array; location < (funcp *)&_fini_array_end; location++) {
+ funcp func = *location; + funcp func = *location;
+ func(); + if (location != NULL)
+ func();
+ } + }
+} +}
+ +
@ -525,10 +652,10 @@ index 00000000000..79d00025eda
+ +
+// vim:fenc=utf-8:tw=75:noet +// vim:fenc=utf-8:tw=75:noet
diff --git a/lib/init.c b/lib/init.c diff --git a/lib/init.c b/lib/init.c
index 4f238c0a2cc..c3df3ee8879 100644 index 4f238c0a2cc..726e493919a 100644
--- a/lib/init.c --- a/lib/init.c
+++ b/lib/init.c +++ b/lib/init.c
@@ -46,57 +46,59 @@ Returns: @@ -46,57 +46,52 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
CHAR8 *LangCode; CHAR8 *LangCode;
@ -536,42 +663,21 @@ index 4f238c0a2cc..c3df3ee8879 100644
- LibInitialized = TRUE; - LibInitialized = TRUE;
- LibFwInstance = FALSE; - LibFwInstance = FALSE;
- LibImageHandle = ImageHandle; - LibImageHandle = ImageHandle;
+ if (LibInitialized) -
+ return; -
+ LibInitialized = TRUE;
+ LibFwInstance = FALSE;
+ LibImageHandle = ImageHandle;
- // - //
- // Set up global pointer to the system table, boot services table, - // Set up global pointer to the system table, boot services table,
- // and runtime services table - // and runtime services table
- // - //
+ // -
+ // Set up global pointer to the system table, boot services table,
+ // and runtime services table
+ //
- ST = SystemTable; - ST = SystemTable;
- BS = SystemTable->BootServices; - BS = SystemTable->BootServices;
- RT = SystemTable->RuntimeServices; - RT = SystemTable->RuntimeServices;
-// ASSERT (CheckCrc(0, &ST->Hdr)); -// ASSERT (CheckCrc(0, &ST->Hdr));
-// ASSERT (CheckCrc(0, &BS->Hdr)); -// ASSERT (CheckCrc(0, &BS->Hdr));
-// ASSERT (CheckCrc(0, &RT->Hdr)); -// ASSERT (CheckCrc(0, &RT->Hdr));
+ ST = SystemTable; -
+ BS = SystemTable->BootServices; -
+ RT = SystemTable->RuntimeServices;
+ // ASSERT (CheckCrc(0, &ST->Hdr));
+ // ASSERT (CheckCrc(0, &BS->Hdr));
+ // ASSERT (CheckCrc(0, &RT->Hdr));
+ ST = SystemTable;
+ BS = SystemTable->BootServices;
+ RT = SystemTable->RuntimeServices;
+ // ASSERT (CheckCrc(0, &ST->Hdr));
+ // ASSERT (CheckCrc(0, &BS->Hdr));
+ // ASSERT (CheckCrc(0, &RT->Hdr));
- // - //
- // Initialize pool allocation type - // Initialize pool allocation type
- // - //
@ -596,11 +702,31 @@ index 4f238c0a2cc..c3df3ee8879 100644
- // - //
- -
- InitializeGuid(); - InitializeGuid();
-
- InitializeLibPlatform(ImageHandle,SystemTable);
+ if (LibInitialized)
+ return;
+
+ LibInitialized = TRUE;
+ LibFwInstance = FALSE;
+ LibImageHandle = ImageHandle;
+
+ //
+ // Set up global pointer to the system table, boot services table,
+ // and runtime services table
+ //
+
+ ST = SystemTable;
+ BS = SystemTable->BootServices;
+ RT = SystemTable->RuntimeServices;
+ // ASSERT (CheckCrc(0, &ST->Hdr));
+ // ASSERT (CheckCrc(0, &BS->Hdr));
+ // ASSERT (CheckCrc(0, &RT->Hdr));
+
+ // + //
+ // Initialize pool allocation type + // Initialize pool allocation type
+ // + //
+
- InitializeLibPlatform(ImageHandle,SystemTable);
+ if (ImageHandle) { + if (ImageHandle) {
+ Status = uefi_call_wrapper( + Status = uefi_call_wrapper(
+ BS->HandleProtocol, + BS->HandleProtocol,
@ -628,6 +754,3 @@ index 4f238c0a2cc..c3df3ee8879 100644
if (ImageHandle && UnicodeInterface == &LibStubUnicodeInterface) { if (ImageHandle && UnicodeInterface == &LibStubUnicodeInterface) {
LangCode = LibGetVariable (VarLanguage, &EfiGlobalVariable); LangCode = LibGetVariable (VarLanguage, &EfiGlobalVariable);
InitializeUnicodeSupport (LangCode); InitializeUnicodeSupport (LangCode);
--
2.24.1

View File

@ -1,11 +1,11 @@
From 5695f90080b20ff4911a5a18f4c4a7dcd4e2b237 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Thu, 14 Nov 2019 10:08:08 -0500 Date: Thu, 14 Nov 2019 10:08:08 -0500
Subject: [PATCH 26/45] Remove the accidental lib/Makefile.orig Subject: [PATCH] Remove the accidental lib/Makefile.orig
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
lib/Makefile.orig | 91 ----------------------------------------------- lib/Makefile.orig | 91 -------------------------------------------------------
1 file changed, 91 deletions(-) 1 file changed, 91 deletions(-)
delete mode 100644 lib/Makefile.orig delete mode 100644 lib/Makefile.orig
@ -106,6 +106,3 @@ index 65aa8ca5df2..00000000000
-include $(SRCDIR)/../Make.rules -include $(SRCDIR)/../Make.rules
- -
-.PHONY: libsubdirs -.PHONY: libsubdirs
--
2.24.1

View File

@ -1,7 +1,7 @@
From 217acd337cbdfd466978124049e42fa973edf6f4 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 13 Nov 2019 13:38:20 -0500 Date: Wed, 13 Nov 2019 13:38:20 -0500
Subject: [PATCH 27/45] gitignore: add our build directories. Subject: [PATCH] gitignore: add our build directories.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -22,6 +22,3 @@ index 970b638e0c0..014f7d02f46 100644
+ia64 +ia64
+mips64el +mips64el
+x64 +x64
--
2.24.1

View File

@ -1,7 +1,7 @@
From 3b79571d75d46b5c7101ee0ae508a4eac6378103 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Thu, 14 Nov 2019 09:54:39 -0500 Date: Thu, 14 Nov 2019 09:54:39 -0500
Subject: [PATCH 28/45] make: Fix shell exit status handling. Subject: [PATCH] make: Fix shell exit status handling.
Right now whenever we have shell commands with loops, errors in the Right now whenever we have shell commands with loops, errors in the
middle are accidentally ignored, and make continues to process commands. middle are accidentally ignored, and make continues to process commands.
@ -36,7 +36,7 @@ index 84f07d33a48..a461a5c3483 100644
$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done $(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done
diff --git a/lib/Makefile b/lib/Makefile diff --git a/lib/Makefile b/lib/Makefile
index 1c2ff1db89a..4847f4d7a86 100644 index e7eafc01f1e..6fd472ad1ac 100644
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -72,7 +72,7 @@ all: libsubdirs libefi.a @@ -72,7 +72,7 @@ all: libsubdirs libefi.a
@ -48,6 +48,3 @@ index 1c2ff1db89a..4847f4d7a86 100644
libefi.a: $(OBJS) libefi.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
--
2.24.1

View File

@ -1,7 +1,7 @@
From ad5579d29986631c34f36c633dd202b3dea9d448 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Thu, 14 Nov 2019 09:55:07 -0500 Date: Thu, 14 Nov 2019 09:55:07 -0500
Subject: [PATCH 29/45] make: Make "make clean" use @ and rm -v everywhere Subject: [PATCH] make: Make "make clean" use @ and rm -v everywhere
This makes our "make clean" commands show what they've /removed/, rather This makes our "make clean" commands show what they've /removed/, rather
than what the shell code that will be run is. than what the shell code that will be run is.
@ -71,12 +71,12 @@ index df67ee83911..09b40cc421e 100644
install: install:
mkdir -p $(INSTALLROOT)$(LIBDIR) mkdir -p $(INSTALLROOT)$(LIBDIR)
diff --git a/lib/Makefile b/lib/Makefile diff --git a/lib/Makefile b/lib/Makefile
index 4847f4d7a86..0e950db9c0c 100644 index 6fd472ad1ac..4a7619aaacf 100644
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -64,7 +64,7 @@ endif @@ -64,7 +64,7 @@ endif
OBJS = $(FILES:%=%.o) OBJS = $(FILES:%=%.o) ctors.o
-SUBDIRS = ia32 x64 ia64 aa64 arm mips64el runtime -SUBDIRS = ia32 x64 ia64 aa64 arm mips64el runtime
+SUBDIRS = $(ARCHES) runtime +SUBDIRS = $(ARCHES) runtime
@ -92,6 +92,3 @@ index 4847f4d7a86..0e950db9c0c 100644
$(LIBDIRINSTALL): $(LIBDIRINSTALL):
mkdir -p $@ mkdir -p $@
--
2.24.1

View File

@ -1,8 +1,7 @@
From 6eb63b104e77f9244a31d183cbe34e929afe1975 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Mon, 30 Sep 2019 14:29:45 -0400 Date: Mon, 30 Sep 2019 14:29:45 -0400
Subject: [PATCH 32/45] Make our dummy .reloc sections not depend on section Subject: [PATCH] Make our dummy .reloc sections not depend on section order.
order.
Currently on x64 we manually build a dummy .reloc table entry by using a Currently on x64 we manually build a dummy .reloc table entry by using a
symbol in .text and subtracting its address from another symbol that's symbol in .text and subtracting its address from another symbol that's
@ -78,6 +77,3 @@ index 3fe361b7ffd..5c86cde12e8 100644
+ .long 10 // Block Size (2*4+2) + .long 10 // Block Size (2*4+2)
.word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy
--
2.24.1

View File

@ -1,8 +1,7 @@
From 75e454f76846808e6b81c39c273d85b70afb330b Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Tue, 27 Aug 2019 13:44:15 -0400 Date: Tue, 27 Aug 2019 13:44:15 -0400
Subject: [PATCH 33/45] Make CHAR8 and similar be defined the same way edk2 Subject: [PATCH] Make CHAR8 and similar be defined the same way edk2 does it.
does it.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -128,7 +127,7 @@ diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h
index 3ace8d59190..ebe8cac3e94 100644 index 3ace8d59190..ebe8cac3e94 100644
--- a/inc/ia64/efibind.h --- a/inc/ia64/efibind.h
+++ b/inc/ia64/efibind.h +++ b/inc/ia64/efibind.h
@@ -74,18 +74,25 @@ Revision History @@ -74,19 +74,26 @@ Revision History
#ifndef __WCHAR_TYPE__ #ifndef __WCHAR_TYPE__
# define __WCHAR_TYPE__ short # define __WCHAR_TYPE__ short
#endif #endif
@ -150,12 +149,13 @@ index 3ace8d59190..ebe8cac3e94 100644
typedef uint8_t UINT8; typedef uint8_t UINT8;
+typedef char CHAR8; +typedef char CHAR8;
typedef int8_t INT8; typedef int8_t INT8;
-typedef __WCHAR_TYPE__ WCHAR; +
typedef __WCHAR_TYPE__ WCHAR;
+typedef __WCHAR_TYPE__ WCHAR;
-
#undef VOID #undef VOID
#define VOID void #define VOID void
diff --git a/inc/mips64el/efibind.h b/inc/mips64el/efibind.h diff --git a/inc/mips64el/efibind.h b/inc/mips64el/efibind.h
index 1f08cd346d0..e26c51904ee 100644 index 1f08cd346d0..e26c51904ee 100644
--- a/inc/mips64el/efibind.h --- a/inc/mips64el/efibind.h
@ -202,6 +202,3 @@ index 2750ab9be7d..e7feed9dbe4 100644
typedef __WCHAR_TYPE__ WCHAR; typedef __WCHAR_TYPE__ WCHAR;
#undef VOID #undef VOID
--
2.24.1

View File

@ -1,17 +1,16 @@
From ecf4e093f27902ef42d56b48db3fd583e9a0c62a Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:36:18 -0400 Date: Fri, 25 Oct 2019 15:36:18 -0400
Subject: [PATCH 34/45] Make: make TOPDIR actually work and get rid of unused Subject: [PATCH] Make: make TOPDIR actually work and get rid of unused CDIR
CDIR
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
Make.defaults | 2 +- Make.defaults | 2 +-
apps/Makefile | 4 +--- apps/Makefile | 6 ++----
gnuefi/Makefile | 4 +--- gnuefi/Makefile | 6 ++----
inc/Makefile | 5 +---- inc/Makefile | 5 +----
lib/Makefile | 2 +- lib/Makefile | 2 +-
5 files changed, 5 insertions(+), 12 deletions(-) 5 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/Make.defaults b/Make.defaults diff --git a/Make.defaults b/Make.defaults
index b8a3e07b681..696028dd6c2 100755 index b8a3e07b681..696028dd6c2 100755
@ -34,13 +33,14 @@ index 04cf251cb2f..3b96f153a23 100644
SRCDIR = . SRCDIR = .
VPATH = $(SRCDIR) VPATH = $(SRCDIR)
+TOPDIR = $(SRCDIR)/..
include $(SRCDIR)/../Make.defaults
-TOPDIR = $(SRCDIR)/..
- -
-include $(SRCDIR)/../Make.defaults
-
TOPDIR = $(SRCDIR)/..
-CDIR=$(TOPDIR)/.. -CDIR=$(TOPDIR)/..
+include $(SRCDIR)/../Make.defaults
+
LINUX_HEADERS = /usr/src/sys/build LINUX_HEADERS = /usr/src/sys/build
CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
CRTOBJS = $(TOPDIR)/$(ARCH)/gnuefi/crt0-efi-$(ARCH).o CRTOBJS = $(TOPDIR)/$(ARCH)/gnuefi/crt0-efi-$(ARCH).o
@ -52,13 +52,14 @@ index 09b40cc421e..bea629b0b29 100644
SRCDIR = . SRCDIR = .
VPATH = $(SRCDIR) VPATH = $(SRCDIR)
+TOPDIR = $(SRCDIR)/..
include $(SRCDIR)/../Make.defaults
-TOPDIR = $(SRCDIR)/..
- -
-include $(SRCDIR)/../Make.defaults
-
TOPDIR = $(SRCDIR)/..
-CDIR=$(TOPDIR)/.. -CDIR=$(TOPDIR)/..
+include $(SRCDIR)/../Make.defaults
+
FILES = reloc_$(ARCH) FILES = reloc_$(ARCH)
OBJS = $(FILES:%=%.o) OBJS = $(FILES:%=%.o)
@ -81,7 +82,7 @@ index dd36bb0103d..13022fd6ae1 100644
all: all:
diff --git a/lib/Makefile b/lib/Makefile diff --git a/lib/Makefile b/lib/Makefile
index 0e950db9c0c..9a2b611cab7 100644 index 4a7619aaacf..6dca2cf1398 100644
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -37,12 +37,12 @@ @@ -37,12 +37,12 @@
@ -98,6 +99,3 @@ index 0e950db9c0c..9a2b611cab7 100644
FILES = boxdraw smbios console crc data debug dpath \ FILES = boxdraw smbios console crc data debug dpath \
entry error event exit guid hand hw init lock \ entry error event exit guid hand hw init lock \
misc print sread str cmdline \ misc print sread str cmdline \
--
2.24.1

View File

@ -1,7 +1,7 @@
From 9e329624639e5c3a6d16c61dfaa0304806709fc4 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:39:35 -0400 Date: Fri, 25 Oct 2019 15:39:35 -0400
Subject: [PATCH 35/45] Make: make "make DESTDIR=../foo install" work right. Subject: [PATCH] Make: make "make DESTDIR=../foo install" work right.
This makes the normal DESTDIR= variable work on the command line, and This makes the normal DESTDIR= variable work on the command line, and
makes relative paths always relative to the top-level directory. makes relative paths always relative to the top-level directory.
@ -36,6 +36,3 @@ index 696028dd6c2..157559d20ee 100755
PREFIX := /usr/local PREFIX := /usr/local
LIBDIR := $(PREFIX)/lib LIBDIR := $(PREFIX)/lib
INSTALL := install INSTALL := install
--
2.24.1

View File

@ -1,7 +1,7 @@
From d81377adca4b2085ad3ab5714851899e4d4cd541 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:41:16 -0400 Date: Fri, 25 Oct 2019 15:41:16 -0400
Subject: [PATCH 36/45] Install our libraries in $(LIBDIR)/gnuefi/$(ARCH) Subject: [PATCH] Install our libraries in $(LIBDIR)/gnuefi/$(ARCH)
This makes it possible to install all the output on the same machine for This makes it possible to install all the output on the same machine for
cross-builds. This also adds "install_compat", which uses the previous cross-builds. This also adds "install_compat", which uses the previous
@ -110,10 +110,10 @@ index 13022fd6ae1..445d340f0fa 100644
+ +
include $(SRCDIR)/../Make.rules include $(SRCDIR)/../Make.rules
diff --git a/lib/Makefile b/lib/Makefile diff --git a/lib/Makefile b/lib/Makefile
index 9a2b611cab7..0ec04b4e59d 100644 index 6dca2cf1398..f0d7b9b08e6 100644
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -66,7 +66,7 @@ OBJS = $(FILES:%=%.o) @@ -66,7 +66,7 @@ OBJS = $(FILES:%=%.o) ctors.o
SUBDIRS = $(ARCHES) runtime SUBDIRS = $(ARCHES) runtime
@ -132,6 +132,3 @@ index 9a2b611cab7..0ec04b4e59d 100644
include $(SRCDIR)/../Make.rules include $(SRCDIR)/../Make.rules
.PHONY: libsubdirs .PHONY: libsubdirs
--
2.24.1

View File

@ -1,7 +1,7 @@
From 16d17b0d947b66ce76f79749123431b678f998df Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Fri, 25 Oct 2019 15:42:10 -0400 Date: Fri, 25 Oct 2019 15:42:10 -0400
Subject: [PATCH 37/45] Install all headers for all arches. Subject: [PATCH] Install all headers for all arches.
This further enables cross-builds by installing all the arches headers. This further enables cross-builds by installing all the arches headers.
@ -40,6 +40,3 @@ index 445d340f0fa..e8123fd3115 100644
+ @if [ ! -h $(DEST)/aarch64 ]; then $(SYMLINK) aa64/ $(DEST)/aarch64 ; fi + @if [ ! -h $(DEST)/aarch64 ]; then $(SYMLINK) aa64/ $(DEST)/aarch64 ; fi
include $(SRCDIR)/../Make.rules include $(SRCDIR)/../Make.rules
--
2.24.1

View File

@ -1,7 +1,7 @@
From 6318d6eddeb905a01e81add07d4ab6fc35268ac8 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 13 Nov 2019 15:24:27 -0500 Date: Wed, 13 Nov 2019 15:24:27 -0500
Subject: [PATCH 38/45] Rename our installed .o and linker scripts. Subject: [PATCH] Rename our installed .o and linker scripts.
Since crt0 and our linker scripts are now in a subdirectory, there's no Since crt0 and our linker scripts are now in a subdirectory, there's no
need to make them named differently in the installed machine. This need to make them named differently in the installed machine. This
@ -61,6 +61,3 @@ index 7652669a7cc..86760f55578 100644
endif endif
include $(SRCDIR)/../Make.rules include $(SRCDIR)/../Make.rules
--
2.24.1

View File

@ -1,7 +1,7 @@
From 456fb32b345ba87565bd3b99291c6009f499c22f Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 13 Nov 2019 15:24:41 -0500 Date: Wed, 13 Nov 2019 15:24:41 -0500
Subject: [PATCH 39/45] Supply makefile templates. Subject: [PATCH] Supply makefile templates.
This supplies template makefiles for applications consuming gnu-efi to This supplies template makefiles for applications consuming gnu-efi to
use as: use as:
@ -12,15 +12,15 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
Make.defaults | 6 +- Make.defaults | 6 +-
inc/.gitignore | 2 + inc/.gitignore | 2 +
inc/Makefile | 25 ++++++- inc/Makefile | 25 ++++++++-
inc/aa64.mk | 21 ++++++ inc/aa64.mk | 21 +++++++
inc/arm.mk | 21 ++++++ inc/arm.mk | 21 +++++++
inc/efi.mk.3.in | 171 ++++++++++++++++++++++++++++++++++++++++++++++++ inc/efi.mk.3.in | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
inc/efi.mk.in | 126 +++++++++++++++++++++++++++++++++++ inc/efi.mk.in | 126 +++++++++++++++++++++++++++++++++++++++++
inc/ia32.mk | 30 +++++++++ inc/ia32.mk | 30 ++++++++++
inc/ia64.mk | 19 ++++++ inc/ia64.mk | 19 +++++++
inc/mips64el.mk | 22 +++++++ inc/mips64el.mk | 22 ++++++++
inc/x64.mk | 31 +++++++++ inc/x64.mk | 31 ++++++++++
11 files changed, 470 insertions(+), 4 deletions(-) 11 files changed, 470 insertions(+), 4 deletions(-)
create mode 100644 inc/.gitignore create mode 100644 inc/.gitignore
create mode 100644 inc/aa64.mk create mode 100644 inc/aa64.mk
@ -612,6 +612,3 @@ index 00000000000..bc1093988b3
+export EFI_ARCH_TIMESTAMP_LOCATION EFI_ARCH_3264 +export EFI_ARCH_TIMESTAMP_LOCATION EFI_ARCH_3264
+export EFI_ARCH_CLANG_BUGS EFI_ARCH_CAN_DISABLE_AVX +export EFI_ARCH_CLANG_BUGS EFI_ARCH_CAN_DISABLE_AVX
+endif +endif
--
2.24.1

View File

@ -1,52 +1,58 @@
From 212920a4c3dedc6fc119fb371be798dfc971a749 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Mon, 18 Nov 2019 13:05:15 -0500 Date: Mon, 18 Nov 2019 13:05:15 -0500
Subject: [PATCH 40/45] Semi-asciibetize _Print()'s formatters. Subject: [PATCH] Semi-asciibetize _Print()'s formatters.
This is ascii order but with upper and lower case letters mixed, so This is ascii order but with upper and lower case letters mixed, so
things like 'X' and 'x' that use fallthrough still stay together. things like 'X' and 'x' that use fallthrough still stay together.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
lib/print.c | 132 ++++++++++++++++++++++++++-------------------------- lib/print.c | 148 ++++++++++++++++++++++++++++++------------------------------
1 file changed, 65 insertions(+), 67 deletions(-) 1 file changed, 73 insertions(+), 75 deletions(-)
diff --git a/lib/print.c b/lib/print.c diff --git a/lib/print.c b/lib/print.c
index 35e43c03db5..0b823481347 100644 index 35e43c03db5..0b823481347 100644
--- a/lib/print.c --- a/lib/print.c
+++ b/lib/print.c +++ b/lib/print.c
@@ -1067,24 +1067,24 @@ Returns: @@ -1067,26 +1067,26 @@ Returns:
Item.Item.pw = Item.Scratch; Item.Item.pw = Item.Scratch;
break; break;
- case '0': - case '0':
- Item.Pad = '0'; - Item.Pad = '0';
+ case ',': - break;
+ Item.Comma = TRUE; -
- case '-':
- Item.PadBefore = FALSE;
- break;
-
case ',':
Item.Comma = TRUE;
break; break;
case '-': - case '.':
Item.PadBefore = FALSE; - Item.WidthParse = &Item.FieldWidth;
+ case '-':
+ Item.PadBefore = FALSE;
break; break;
- case ',': case '*':
- Item.Comma = TRUE; *Item.WidthParse = va_arg(ps->args, UINTN);
+ case '*':
+ *Item.WidthParse = va_arg(ps->args, UINTN);
break; break;
case '.': + case '.':
Item.WidthParse = &Item.FieldWidth; + Item.WidthParse = &Item.FieldWidth;
break; + break;
+
- case '*':
- *Item.WidthParse = va_arg(ps->args, UINTN);
+ case '0': + case '0':
+ Item.Pad = '0'; + Item.Pad = '0';
break; + break;
+
case '1': case '1':
@@ -1112,52 +1112,23 @@ Returns: case '2':
case '3':
@@ -1112,62 +1112,12 @@ Returns:
} }
break; break;
@ -82,14 +88,7 @@ index 35e43c03db5..0b823481347 100644
- -
- break; - break;
- -
+ case 'D': -
+ {
+ EFI_DEVICE_PATH *dp = va_arg(ps->args, EFI_DEVICE_PATH *);
+ CHAR16 *dpstr = DevicePathToStr(dp);
+ StrnCpy(Item.Scratch, dpstr, PRINT_ITEM_BUFFER_LEN);
+ Item.Scratch[PRINT_ITEM_BUFFER_LEN-1] = L'\0';
+ FreePool(dpstr);
- case 'g': - case 'g':
- GuidToString (Item.Scratch, va_arg(ps->args, EFI_GUID *)); - GuidToString (Item.Scratch, va_arg(ps->args, EFI_GUID *));
- Item.Item.pw = Item.Scratch; - Item.Item.pw = Item.Scratch;
@ -101,51 +100,61 @@ index 35e43c03db5..0b823481347 100644
- Item.Comma, - Item.Comma,
- Item.Long ? va_arg(ps->args, UINT64) : va_arg(ps->args, UINT32) - Item.Long ? va_arg(ps->args, UINT64) : va_arg(ps->args, UINT32)
- ); - );
Item.Item.pw = Item.Scratch; - Item.Item.pw = Item.Scratch;
- break;
-
- case 'd':
- ValueToString (
- Item.Scratch,
- Item.Comma,
- Item.Long ? va_arg(ps->args, INT64) : va_arg(ps->args, INT32)
- );
- Item.Item.pw = Item.Scratch;
- break;
-
case 'D':
{
EFI_DEVICE_PATH *dp = va_arg(ps->args, EFI_DEVICE_PATH *);
@@ -1180,6 +1130,23 @@ Returns:
break; break;
+ } }
case 'd': + case 'd':
ValueToString ( + ValueToString (
@@ -1168,17 +1139,13 @@ Returns: + Item.Scratch,
Item.Item.pw = Item.Scratch; + Item.Comma,
break; + Item.Long ? va_arg(ps->args, INT64) : va_arg(ps->args, INT32)
+ );
- case 'D': + Item.Item.pw = Item.Scratch;
- { + break;
- EFI_DEVICE_PATH *dp = va_arg(ps->args, EFI_DEVICE_PATH *); +
- CHAR16 *dpstr = DevicePathToStr(dp);
- StrnCpy(Item.Scratch, dpstr, PRINT_ITEM_BUFFER_LEN);
- Item.Scratch[PRINT_ITEM_BUFFER_LEN-1] = L'\0';
- FreePool(dpstr);
+ case 'E': + case 'E':
+ Attr = ps->AttrError; + Attr = ps->AttrError;
+ break; + break;
+
- Item.Item.pw = Item.Scratch;
+ case 'e': + case 'e':
+ PSETATTR(ps, ps->AttrError); + PSETATTR(ps, ps->AttrError);
break; + break;
- } +
case 'f': case 'f':
FloatToString ( FloatToString (
Item.Scratch,
@@ -1189,38 +1156,69 @@ Returns: @@ -1189,38 +1156,69 @@ Returns:
Item.Item.pw = Item.Scratch; Item.Item.pw = Item.Scratch;
break; break;
- case 't': - case 't':
- TimeToString (Item.Scratch, va_arg(ps->args, EFI_TIME *)); - TimeToString (Item.Scratch, va_arg(ps->args, EFI_TIME *));
- Item.Item.pw = Item.Scratch;
- break;
-
- case 'r':
- StatusToString (Item.Scratch, va_arg(ps->args, EFI_STATUS));
+ case 'g': + case 'g':
+ GuidToString (Item.Scratch, va_arg(ps->args, EFI_GUID *)); + GuidToString (Item.Scratch, va_arg(ps->args, EFI_GUID *));
Item.Item.pw = Item.Scratch; Item.Item.pw = Item.Scratch;
break; break;
- case 'r':
- StatusToString (Item.Scratch, va_arg(ps->args, EFI_STATUS));
- Item.Item.pw = Item.Scratch;
- break;
-
- case 'n': - case 'n':
- PSETATTR(ps, ps->AttrNorm); - PSETATTR(ps, ps->AttrNorm);
+ case 'H': + case 'H':
@ -215,6 +224,3 @@ index 35e43c03db5..0b823481347 100644
break; break;
default: default:
--
2.24.1

View File

@ -1,7 +1,7 @@
From 58c33b63da0e8def2fab43b79ae73403f5ccc23d Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Mon, 18 Nov 2019 13:06:23 -0500 Date: Mon, 18 Nov 2019 13:06:23 -0500
Subject: [PATCH 41/45] Implement Print(L"%p", ptr); Subject: [PATCH] Implement Print(L"%p", ptr);
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -33,6 +33,3 @@ index 0b823481347..8fdba6ee166 100644
case 'r': case 'r':
StatusToString (Item.Scratch, va_arg(ps->args, EFI_STATUS)); StatusToString (Item.Scratch, va_arg(ps->args, EFI_STATUS));
Item.Item.pw = Item.Scratch; Item.Item.pw = Item.Scratch;
--
2.24.1

View File

@ -1,7 +1,7 @@
From 55ea0b4b8ce651bf9d1048754e7a2981624509a2 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Tue, 19 Nov 2019 13:23:14 -0500 Date: Tue, 19 Nov 2019 13:23:14 -0500
Subject: [PATCH 42/45] Switch to -fPIE Subject: [PATCH] Switch to -fPIE
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -25,6 +25,3 @@ index 01269660ab8..15af35e6e26 100755
endif endif
IS_FREEBSD = $(findstring FreeBSD, $(OS)) IS_FREEBSD = $(findstring FreeBSD, $(OS))
--
2.24.1

View File

@ -1,8 +1,7 @@
From dba7d5eeb75c3e8526eaf6b898e3ba808dde5ac4 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Tue, 14 Jan 2020 10:13:30 -0500 Date: Tue, 14 Jan 2020 10:13:30 -0500
Subject: [PATCH 43/45] lfbgrid: Make pointer size testing not arch name Subject: [PATCH] lfbgrid: Make pointer size testing not arch name dependent.
dependent.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---
@ -37,6 +36,3 @@ index ac50f4eafa9..e9fef957d94 100644
FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase; FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;
#else #else
#error YOUR ARCH HERE #error YOUR ARCH HERE
--
2.24.1

View File

@ -1,7 +1,7 @@
From e483e9bd6e900c2e9a637165149f60b44bba109e Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 15 Jan 2020 13:07:49 -0500 Date: Wed, 15 Jan 2020 13:07:49 -0500
Subject: [PATCH 44/45] Fix the arch subdirs in .gitignore. Subject: [PATCH] Fix the arch subdirs in .gitignore.
Currently they'll exclude e.g. inc/x64/ by accident; this makes it only Currently they'll exclude e.g. inc/x64/ by accident; this makes it only
apply to the top level. apply to the top level.
@ -37,6 +37,3 @@ index 014f7d02f46..3e96a65bb43 100644
+/ia64/ +/ia64/
+/mips64el/ +/mips64el/
+/x64/ +/x64/
--
2.24.1

View File

@ -1,8 +1,8 @@
From 926725b8704472ee2565e6c3fbd1a2012732f9de Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Wed, 15 Jan 2020 13:10:11 -0500 Date: Wed, 15 Jan 2020 13:10:11 -0500
Subject: [PATCH 45/45] Use CFLAGS with "gcc -print-libgcc-file-name" to get Subject: [PATCH] Use CFLAGS with "gcc -print-libgcc-file-name" to get the
the right one. right one.
This makes us use CFLAGS when trying to find libgcc, so we don't get the This makes us use CFLAGS when trying to find libgcc, so we don't get the
one with the wrong endian or float ABI. one with the wrong endian or float ABI.
@ -35,6 +35,3 @@ index 15af35e6e26..de88bcd0231 100755
+ifneq ($(ARCH),arm) +ifneq ($(ARCH),arm)
+export LIBGCC=$(shell $(CC) $(CFLAGS) $(ARCH3264) -print-libgcc-file-name) +export LIBGCC=$(shell $(CC) $(CFLAGS) $(ARCH3264) -print-libgcc-file-name)
+endif +endif
--
2.24.1

View File

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 21 Jan 2020 15:05:19 -0500
Subject: [PATCH] CFLAGS: add -Wno-pointer-sign
Signed-off-by: Peter Jones <pjones@redhat.com>
---
Make.defaults | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Make.defaults b/Make.defaults
index de88bcd0231..cc8beec4600 100755
--- a/Make.defaults
+++ b/Make.defaults
@@ -203,7 +203,7 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-fshort-wchar -fno-strict-aliasing \
-ffreestanding -fno-stack-protector
else
-CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
+CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
-fshort-wchar -fno-strict-aliasing \
-ffreestanding -fno-stack-protector -fno-stack-check \
-fno-stack-check \

View File

@ -21,14 +21,14 @@ Patch0020: 0020-Make-apps-link-against-the-local-gnuefi-and-crt-obje.patch
Patch0021: 0021-Add-.travis.yml.patch Patch0021: 0021-Add-.travis.yml.patch
Patch0022: 0022-Use-EFI-canonical-names-everywhere-the-compiler-does.patch Patch0022: 0022-Use-EFI-canonical-names-everywhere-the-compiler-does.patch
Patch0023: 0023-Fix-a-minor-coverity-complaint-in-some-apps.patch Patch0023: 0023-Fix-a-minor-coverity-complaint-in-some-apps.patch
Patch0024: 0024-Get-rid-of-some-unused-junk-that-has-the-BSD-4-claus.patch Patch0024: 0024-Add-stuff-that-s-got-weird-characters-to-.gitattribu.patch
Patch0025: 0025-Make-ELF-constructors-and-destructors-work.patch Patch0025: 0025-Get-rid-of-some-unused-junk-that-has-the-BSD-4-claus.patch
Patch0026: 0026-Remove-the-accidental-lib-Makefile.orig.patch Patch0026: 0026-Get-rid-of-unused-make-like-files-from-yore.patch
Patch0027: 0027-gitignore-add-our-build-directories.patch Patch0027: 0027-Make-ELF-constructors-and-destructors-work.patch
Patch0028: 0028-make-Fix-shell-exit-status-handling.patch Patch0028: 0028-Remove-the-accidental-lib-Makefile.orig.patch
Patch0029: 0029-make-Make-make-clean-use-and-rm-v-everywhere.patch Patch0029: 0029-gitignore-add-our-build-directories.patch
Patch0030: 0030-Add-stuff-that-s-got-weird-characters-to-.gitattribu.patch Patch0030: 0030-make-Fix-shell-exit-status-handling.patch
Patch0031: 0031-Get-rid-of-unused-make-like-files-from-yore.patch Patch0031: 0031-make-Make-make-clean-use-and-rm-v-everywhere.patch
Patch0032: 0032-Make-our-dummy-.reloc-sections-not-depend-on-section.patch Patch0032: 0032-Make-our-dummy-.reloc-sections-not-depend-on-section.patch
Patch0033: 0033-Make-CHAR8-and-similar-be-defined-the-same-way-edk2-.patch Patch0033: 0033-Make-CHAR8-and-similar-be-defined-the-same-way-edk2-.patch
Patch0034: 0034-Make-make-TOPDIR-actually-work-and-get-rid-of-unused.patch Patch0034: 0034-Make-make-TOPDIR-actually-work-and-get-rid-of-unused.patch
@ -43,3 +43,4 @@ Patch0042: 0042-Switch-to-fPIE.patch
Patch0043: 0043-lfbgrid-Make-pointer-size-testing-not-arch-name-depe.patch Patch0043: 0043-lfbgrid-Make-pointer-size-testing-not-arch-name-depe.patch
Patch0044: 0044-Fix-the-arch-subdirs-in-.gitignore.patch Patch0044: 0044-Fix-the-arch-subdirs-in-.gitignore.patch
Patch0045: 0045-Use-CFLAGS-with-gcc-print-libgcc-file-name-to-get-th.patch Patch0045: 0045-Use-CFLAGS-with-gcc-print-libgcc-file-name-to-get-th.patch
Patch0046: 0046-CFLAGS-add-Wno-pointer-sign.patch

View File

@ -2,7 +2,7 @@ Name: gnu-efi
Epoch: 1 Epoch: 1
Version: 3.0.11 Version: 3.0.11
%global tarball_version 3.0.9 %global tarball_version 3.0.9
Release: 3%{?dist}%{?buildid} Release: 4%{?dist}%{?buildid}
Summary: Development Libraries and headers for EFI Summary: Development Libraries and headers for EFI
License: BSD License: BSD
URL: https://sourceforge.net/projects/gnu-efi/ URL: https://sourceforge.net/projects/gnu-efi/
@ -16,7 +16,9 @@ BuildRequires: binutils
BuildRequires: efi-srpm-macros >= 3-2 BuildRequires: efi-srpm-macros >= 3-2
BuildRequires: gcc BuildRequires: gcc
BuildRequires: git-core BuildRequires: git-core
BuildRequires: glibc-headers # We're explicitly *not* requiring glibc-headers, because it gets us
# cross-arch dependency problems in "fedpkg mockbuild" from x86_64.
# BuildRequires: glibc-headers
%ifarch x86_64 %ifarch x86_64
# So... in some build environments, glibc32 provides some headers. In # So... in some build environments, glibc32 provides some headers. In
# others, glibc-devel.i686 does. They have no non-file provides in common. # others, glibc-devel.i686 does. They have no non-file provides in common.
@ -90,7 +92,7 @@ git config user.name "Fedora Ninjas"
git config sendemail.to "gnu-efi-owner@fedoraproject.org" git config sendemail.to "gnu-efi-owner@fedoraproject.org"
git add . git add .
git commit -a -q -m "%{version} baseline." git commit -a -q -m "%{version} baseline."
git am --ignore-whitespace %{patches} </dev/null git am %{patches} </dev/null
git config --unset user.email git config --unset user.email
git config --unset user.name git config --unset user.name
@ -120,6 +122,10 @@ if [[ -d %{buildroot}/%{_prefix}/lib/gnuefi/x64 ]] ; then
ln -s %{efi_arch}/efi.lds %{buildroot}/%{_libdir}/gnuefi/elf_x86_64_efi.lds ln -s %{efi_arch}/efi.lds %{buildroot}/%{_libdir}/gnuefi/elf_x86_64_efi.lds
ln -s %{efi_arch}/libefi.a %{buildroot}/%{_libdir}/gnuefi/libefi.a ln -s %{efi_arch}/libefi.a %{buildroot}/%{_libdir}/gnuefi/libefi.a
ln -s %{efi_arch}/libgnuefi.a %{buildroot}/%{_libdir}/gnuefi/libgnuefi.a ln -s %{efi_arch}/libgnuefi.a %{buildroot}/%{_libdir}/gnuefi/libgnuefi.a
# because we don't want /usr/lib64/gnuefi/crt0.o etc, we don't want to do
# this with 'make LIBDIR=%%{_libdir} install_compat ...'
ln -s gnuefi/%{efi_arch}/libefi.a %{buildroot}/%{_libdir}/libefi.a
ln -s gnuefi/%{efi_arch}/libgnuefi.a %{buildroot}/%{_libdir}/libgnuefi.a
elif [[ -d %{buildroot}/%{_prefix}/lib/gnuefi/aa64 ]] ; then elif [[ -d %{buildroot}/%{_prefix}/lib/gnuefi/aa64 ]] ; then
ln -s ../../lib/gnuefi/%{efi_arch} %{buildroot}/%{_libdir}/gnuefi/%{efi_arch} ln -s ../../lib/gnuefi/%{efi_arch} %{buildroot}/%{_libdir}/gnuefi/%{efi_arch}
ln -s %{efi_arch}/crt0.o %{buildroot}/%{_libdir}/gnuefi/crt0-efi-aa64.o ln -s %{efi_arch}/crt0.o %{buildroot}/%{_libdir}/gnuefi/crt0-efi-aa64.o
@ -144,7 +150,6 @@ fi
ln -s %{efi_alt_arch}/libgnuefi.a %{buildroot}/%{_prefix}/lib/gnuefi/libgnuefi.a ln -s %{efi_alt_arch}/libgnuefi.a %{buildroot}/%{_prefix}/lib/gnuefi/libgnuefi.a
%endif %endif
find %{buildroot}/%{_prefix}/ -type l | sed 's,%{buildroot}/\+,/,'
find %{buildroot}/%{_prefix}/ -type l | sed 's,%{buildroot}/\+,/,' > compat.lst find %{buildroot}/%{_prefix}/ -type l | sed 's,%{buildroot}/\+,/,' > compat.lst
%files %files
@ -172,6 +177,9 @@ find %{buildroot}/%{_prefix}/ -type l | sed 's,%{buildroot}/\+,/,' > compat.lst
%endif %endif
%changelog %changelog
* Tue Jan 28 2020 Peter Jones <pjones@redhat.com> - 3.0.11-4
- Fix a mistake building -compat
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild