New upstream version 3.0w
- Add pjones' build fixes patch from that other distro. - Enable AArch64
This commit is contained in:
parent
b924a22772
commit
aaf26dda33
@ -1,29 +0,0 @@
|
||||
From 023ad973f8260ab88445ae36365ce309eff8e59b Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <ncroxon@redhat.com>
|
||||
Date: Tue, 25 Jun 2013 08:45:44 -0400
|
||||
Subject: [PATCH 1/3] fix compilation on x86_64 without HAVE_USE_MS_ABI
|
||||
|
||||
make -C apps would fail on tcc.c because uefi_call_wrapper() doesn't
|
||||
deal correctly with efi_call0-type invocation. Fixed by this patch.
|
||||
|
||||
Signed-off-by: David Decotigny <decot@googlers.com>
|
||||
---
|
||||
inc/x86_64/efibind.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h
|
||||
index 065a965..2133798 100644
|
||||
--- a/inc/x86_64/efibind.h
|
||||
+++ b/inc/x86_64/efibind.h
|
||||
@@ -368,7 +368,7 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
|
||||
|
||||
/* main wrapper (va_num ignored) */
|
||||
#define uefi_call_wrapper(func,va_num,...) \
|
||||
- __VA_ARG_NSUFFIX__(_cast64_efi_call, __VA_ARGS__) (func, __VA_ARGS__)
|
||||
+ __VA_ARG_NSUFFIX__(_cast64_efi_call, __VA_ARGS__) (func , ##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
#define EFI_FUNCTION __attribute__((ms_abi))
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,46 +0,0 @@
|
||||
From f99c72fe642e7ccc00012f01b8fc2adf8f93a79c Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <ncroxon@redhat.com>
|
||||
Date: Tue, 25 Jun 2013 08:47:03 -0400
|
||||
Subject: [PATCH 2/3] be more pedantic when linking
|
||||
|
||||
Don't allow duplicate symbols, abort upon first error.
|
||||
also make sure the linker script comes last for apps.
|
||||
|
||||
Signed-off-by: David Decotigny <decot@googlers.com>
|
||||
---
|
||||
Make.defaults | 2 +-
|
||||
apps/Makefile | 8 ++++++--
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Make.defaults b/Make.defaults
|
||||
index a22a1b4..6b4b6de 100644
|
||||
--- a/Make.defaults
|
||||
+++ b/Make.defaults
|
||||
@@ -114,4 +114,4 @@ CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
|
||||
-fno-merge-constants -ffreestanding -fno-stack-protector \
|
||||
-fno-stack-check
|
||||
ASFLAGS += $(ARCH3264)
|
||||
-LDFLAGS += -nostdlib --no-undefined
|
||||
+LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings
|
||||
diff --git a/apps/Makefile b/apps/Makefile
|
||||
index 773bc08..6834e14 100644
|
||||
--- a/apps/Makefile
|
||||
+++ b/apps/Makefile
|
||||
@@ -52,8 +52,12 @@ ifneq (,$(findstring FreeBSD,$(OS)))
|
||||
LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
|
||||
endif
|
||||
|
||||
-LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
|
||||
-LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
|
||||
+LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
|
||||
+
|
||||
+LOADLIBES += -lefi -lgnuefi
|
||||
+LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
|
||||
+LOADLIBES += -T $(LDSCRIPT)
|
||||
+
|
||||
FORMAT = efi-app-$(ARCH)
|
||||
|
||||
TARGETS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi printenv.efi t7.efi tcc.efi modelist.efi route80h.efi
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,371 +0,0 @@
|
||||
From b2a2a1fa80dd57be7d5445f1c2fbbe25feedd39d Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <ncroxon@redhat.com>
|
||||
Date: Tue, 25 Jun 2013 08:53:58 -0400
|
||||
Subject: [PATCH 3/3] Sample boot service driver.
|
||||
|
||||
Signed-off-by: David Decotigny <decot@googlers.com>
|
||||
---
|
||||
apps/Makefile | 11 +++-
|
||||
apps/drv0.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
apps/drv0.h | 37 +++++++++++
|
||||
apps/drv0_use.c | 79 +++++++++++++++++++++++
|
||||
4 files changed, 319 insertions(+), 1 deletion(-)
|
||||
create mode 100644 apps/drv0.c
|
||||
create mode 100644 apps/drv0.h
|
||||
create mode 100644 apps/drv0_use.c
|
||||
|
||||
diff --git a/apps/Makefile b/apps/Makefile
|
||||
index 6834e14..8643ba1 100644
|
||||
--- a/apps/Makefile
|
||||
+++ b/apps/Makefile
|
||||
@@ -60,10 +60,19 @@ LOADLIBES += -T $(LDSCRIPT)
|
||||
|
||||
FORMAT = efi-app-$(ARCH)
|
||||
|
||||
-TARGETS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi printenv.efi t7.efi tcc.efi modelist.efi route80h.efi
|
||||
+TARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \
|
||||
+ printenv.efi t7.efi tcc.efi modelist.efi \
|
||||
+ route80h.efi drv0_use.efi
|
||||
+TARGET_BSDRIVERS = drv0.efi
|
||||
+TARGET_RTDRIVERS =
|
||||
+
|
||||
+TARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
+$(TARGET_BSDRIVERS): FORMAT=efi-bsdrv-$(ARCH)
|
||||
+$(TARGET_RTDRIVERS): FORMAT=efi-rtdrv-$(ARCH)
|
||||
+
|
||||
clean:
|
||||
rm -f $(TARGETS) *~ *.o *.so
|
||||
|
||||
diff --git a/apps/drv0.c b/apps/drv0.c
|
||||
new file mode 100644
|
||||
index 0000000..126e8e7
|
||||
--- /dev/null
|
||||
+++ b/apps/drv0.c
|
||||
@@ -0,0 +1,193 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013 David Decotigny <decot@googlers.com>
|
||||
+ *
|
||||
+ * Sample EFI shell session, together with drv0_use.efi:
|
||||
+ *
|
||||
+ * # Loading first instance:
|
||||
+ *
|
||||
+ * fs0:\> load drv0.efi
|
||||
+ * Driver instance loaded successfully.
|
||||
+ * load: Image fs0:\drv0.efi loaded at 2FD7C000 - Success
|
||||
+ *
|
||||
+ * # Testing 1st instance:
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Playing with driver instance 0...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 1 time(s).
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Playing with driver instance 0...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 2 time(s).
|
||||
+ *
|
||||
+ * # Loading another instance:
|
||||
+ *
|
||||
+ * fs0:\> load drv0.efi
|
||||
+ * Driver instance loaded successfully.
|
||||
+ * load: Image fs0:\drv0.efi loaded at 2FD6D000 - Success
|
||||
+ *
|
||||
+ * # Using both instances:
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Playing with driver instance 0...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 3 time(s).
|
||||
+ * Playing with driver instance 1...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 1 time(s).
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Playing with driver instance 0...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 4 time(s).
|
||||
+ * Playing with driver instance 1...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 2 time(s).
|
||||
+ *
|
||||
+ * # Removing 1st instance:
|
||||
+ *
|
||||
+ * fs0:\> dh
|
||||
+ * Handle dump
|
||||
+ * 1: Image(DxeCore)
|
||||
+ * [...]
|
||||
+ * 79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
|
||||
+ * 7A: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
|
||||
+ *
|
||||
+ * fs0:\> unload 79
|
||||
+ * 79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
|
||||
+ * Unload driver image (y/n)? y
|
||||
+ * Driver instance unloaded.
|
||||
+ * unload: Success
|
||||
+ *
|
||||
+ * # Only 2nd instance remaining:
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Playing with driver instance 0...
|
||||
+ * Hello Sample UEFI Driver!
|
||||
+ * Hello was called 3 time(s).
|
||||
+ *
|
||||
+ * # Removing 2nd/last instance:
|
||||
+ *
|
||||
+ * fs0:\> dh
|
||||
+ * Handle dump
|
||||
+ * 1: Image(DxeCore)
|
||||
+ * [...]
|
||||
+ * 79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
|
||||
+ *
|
||||
+ * fs0:\> unload 79
|
||||
+ * 79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
|
||||
+ * Unload driver image (y/n)? y
|
||||
+ * Driver instance unloaded.
|
||||
+ * unload: Success
|
||||
+ *
|
||||
+ * # Expect error: no other drv0 instance left
|
||||
+ *
|
||||
+ * fs0:\> drv0_use.efi
|
||||
+ * Error looking up handles for proto: 14
|
||||
+ */
|
||||
+
|
||||
+#include <efi.h>
|
||||
+#include <efilib.h>
|
||||
+#include "drv0.h"
|
||||
+
|
||||
+
|
||||
+static const EFI_GUID GnuEfiAppsDrv0ProtocolGuid
|
||||
+ = GNU_EFI_APPS_DRV0_PROTOCOL_GUID;
|
||||
+
|
||||
+static struct {
|
||||
+ GNU_EFI_APPS_DRV0_PROTOCOL Proto;
|
||||
+ UINTN Counter;
|
||||
+} InternalGnuEfiAppsDrv0ProtocolData;
|
||||
+
|
||||
+
|
||||
+static
|
||||
+EFI_STATUS
|
||||
+EFI_FUNCTION
|
||||
+Drv0SayHello(
|
||||
+ IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
|
||||
+ IN const CHAR16 *HelloWho
|
||||
+ )
|
||||
+{
|
||||
+ if (! HelloWho)
|
||||
+ return EFI_INVALID_PARAMETER;
|
||||
+
|
||||
+ Print(L"Hello %s!\n", HelloWho);
|
||||
+ InternalGnuEfiAppsDrv0ProtocolData.Counter ++;
|
||||
+ return EFI_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static
|
||||
+EFI_STATUS
|
||||
+EFI_FUNCTION
|
||||
+Drv0GetNumberOfHello(
|
||||
+ IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
|
||||
+ OUT UINTN *NumberOfHello
|
||||
+ )
|
||||
+{
|
||||
+ if (! NumberOfHello)
|
||||
+ return EFI_INVALID_PARAMETER;
|
||||
+
|
||||
+ *NumberOfHello = InternalGnuEfiAppsDrv0ProtocolData.Counter;
|
||||
+ return EFI_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static
|
||||
+EFI_STATUS
|
||||
+EFI_FUNCTION
|
||||
+Drv0Unload(IN EFI_HANDLE ImageHandle)
|
||||
+{
|
||||
+ LibUninstallProtocolInterfaces(ImageHandle,
|
||||
+ &GnuEfiAppsDrv0ProtocolGuid,
|
||||
+ &InternalGnuEfiAppsDrv0ProtocolData.Proto,
|
||||
+ NULL);
|
||||
+ Print(L"Driver instance unloaded.\n", ImageHandle);
|
||||
+ return EFI_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+EFI_STATUS
|
||||
+efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SysTab)
|
||||
+{
|
||||
+ EFI_STATUS Status;
|
||||
+ EFI_LOADED_IMAGE *LoadedImage = NULL;
|
||||
+
|
||||
+ InitializeLib(ImageHandle, SysTab);
|
||||
+
|
||||
+ /* Initialize global protocol definition + data */
|
||||
+ InternalGnuEfiAppsDrv0ProtocolData.Proto.SayHello
|
||||
+ = (GNU_EFI_APPS_DRV0_SAY_HELLO) Drv0SayHello;
|
||||
+ InternalGnuEfiAppsDrv0ProtocolData.Proto.GetNumberOfHello
|
||||
+ = (GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO) Drv0GetNumberOfHello;
|
||||
+ InternalGnuEfiAppsDrv0ProtocolData.Counter = 0;
|
||||
+
|
||||
+ /* Grab handle to this image: we'll attach our proto instance to it */
|
||||
+ Status = uefi_call_wrapper(BS->OpenProtocol, 6,
|
||||
+ ImageHandle, &LoadedImageProtocol,
|
||||
+ &LoadedImage, ImageHandle,
|
||||
+ NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Could not open loaded image protocol: %d\n", Status);
|
||||
+ return Status;
|
||||
+ }
|
||||
+
|
||||
+ /* Attach our proto to the current driver image */
|
||||
+ Status = LibInstallProtocolInterfaces(
|
||||
+ &ImageHandle, &GnuEfiAppsDrv0ProtocolGuid,
|
||||
+ &InternalGnuEfiAppsDrv0ProtocolData.Proto, NULL);
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Error registering driver instance: %d\n", Status);
|
||||
+ return Status;
|
||||
+ }
|
||||
+
|
||||
+ /* Register Unload callback, used to unregister current protocol
|
||||
+ * instance from system */
|
||||
+ LoadedImage->Unload = (EFI_IMAGE_UNLOAD)Drv0Unload;
|
||||
+
|
||||
+ Print(L"Driver instance loaded successfully.\n");
|
||||
+ return EFI_SUCCESS; /* at this point, this instance stays resident
|
||||
+ * until image is unloaded, eg. with shell's unload,
|
||||
+ * ExitBootServices() */
|
||||
+}
|
||||
diff --git a/apps/drv0.h b/apps/drv0.h
|
||||
new file mode 100644
|
||||
index 0000000..26d2ffd
|
||||
--- /dev/null
|
||||
+++ b/apps/drv0.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+#ifndef _GNU_EFI_APPS_DRV0_H_
|
||||
+#define _GNU_EFI_APPS_DRV0_H_
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+/* UEFI naming conventions */
|
||||
+#define GNU_EFI_APPS_DRV0_PROTOCOL_GUID \
|
||||
+{ 0xe4dcafd0, 0x586c, 0x4b3d, {0x86, 0xe7, 0x28, 0xde, 0x7f, 0xcc, 0x04, 0xb8} }
|
||||
+
|
||||
+INTERFACE_DECL(_GNU_EFI_APPS_DRV0_PROTOCOL);
|
||||
+
|
||||
+typedef
|
||||
+EFI_STATUS
|
||||
+(EFIAPI *GNU_EFI_APPS_DRV0_SAY_HELLO) (
|
||||
+ IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
|
||||
+ IN const CHAR16 *HelloWho
|
||||
+ );
|
||||
+
|
||||
+typedef
|
||||
+EFI_STATUS
|
||||
+(EFIAPI *GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO) (
|
||||
+ IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
|
||||
+ OUT UINTN *NumberOfHello
|
||||
+ );
|
||||
+
|
||||
+typedef struct _GNU_EFI_APPS_DRV0_PROTOCOL {
|
||||
+ GNU_EFI_APPS_DRV0_SAY_HELLO SayHello;
|
||||
+ GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO GetNumberOfHello;
|
||||
+} GNU_EFI_APPS_DRV0_PROTOCOL;
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/apps/drv0_use.c b/apps/drv0_use.c
|
||||
new file mode 100644
|
||||
index 0000000..f7c5869
|
||||
--- /dev/null
|
||||
+++ b/apps/drv0_use.c
|
||||
@@ -0,0 +1,79 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013 David Decotigny <decot@googlers.com>
|
||||
+ *
|
||||
+ * See drv0.c for an example session.
|
||||
+ */
|
||||
+
|
||||
+#include <efi.h>
|
||||
+#include <efilib.h>
|
||||
+#include "drv0.h"
|
||||
+
|
||||
+
|
||||
+static EFI_GUID GnuEfiAppsDrv0ProtocolGuid
|
||||
+ = GNU_EFI_APPS_DRV0_PROTOCOL_GUID;
|
||||
+
|
||||
+
|
||||
+static
|
||||
+EFI_STATUS
|
||||
+PlayWithGnuEfiAppsDrv0Protocol(IN EFI_HANDLE DrvHandle) {
|
||||
+ EFI_STATUS Status;
|
||||
+ GNU_EFI_APPS_DRV0_PROTOCOL *drv = NULL;
|
||||
+ UINTN NumberOfHello = 0;
|
||||
+
|
||||
+ Status = uefi_call_wrapper(BS->OpenProtocol, 6,
|
||||
+ DrvHandle,
|
||||
+ &GnuEfiAppsDrv0ProtocolGuid,
|
||||
+ &drv,
|
||||
+ DrvHandle,
|
||||
+ NULL,
|
||||
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Cannot open proto: %d\n", Status);
|
||||
+ return Status;
|
||||
+ }
|
||||
+
|
||||
+ Status = uefi_call_wrapper(drv->SayHello, 2, drv, L"Sample UEFI Driver");
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Cannot call SayHello: %d\n", Status);
|
||||
+ }
|
||||
+
|
||||
+ Status = uefi_call_wrapper(drv->GetNumberOfHello, 2, drv, &NumberOfHello);
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Cannot call GetNumberOfHello: %d\n", Status);
|
||||
+ } else {
|
||||
+ Print(L"Hello was called %d time(s).\n", NumberOfHello);
|
||||
+ }
|
||||
+
|
||||
+ return EFI_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+EFI_STATUS
|
||||
+efi_main (EFI_HANDLE Image, EFI_SYSTEM_TABLE *SysTab)
|
||||
+{
|
||||
+ EFI_STATUS Status;
|
||||
+ EFI_HANDLE *Handles = NULL;
|
||||
+ UINTN i, NoHandles = 0;
|
||||
+
|
||||
+ InitializeLib(Image, SysTab);
|
||||
+
|
||||
+ Status = LibLocateHandle(ByProtocol, &GnuEfiAppsDrv0ProtocolGuid,
|
||||
+ NULL, &NoHandles, &Handles);
|
||||
+ if (EFI_ERROR(Status)) {
|
||||
+ Print(L"Error looking up handles for proto: %d\n", Status);
|
||||
+ return Status;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0 ; i < NoHandles ; ++i)
|
||||
+ {
|
||||
+ Print(L"Playing with driver instance %d...\n", i);
|
||||
+ Status = PlayWithGnuEfiAppsDrv0Protocol(Handles[i]);
|
||||
+ if (EFI_ERROR(Status))
|
||||
+ Print(L"Error playing with instance %d, skipping\n", i);
|
||||
+ }
|
||||
+
|
||||
+ if (Handles)
|
||||
+ FreePool(Handles);
|
||||
+
|
||||
+ return EFI_SUCCESS;
|
||||
+}
|
||||
--
|
||||
1.8.3.1
|
||||
|
113
build-fix.patch
Normal file
113
build-fix.patch
Normal file
@ -0,0 +1,113 @@
|
||||
From 0a69c42779d1d28aa406fa2c435b180156ee3435 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Ninjas <pjones@fedoraproject.org>
|
||||
Date: Thu, 15 May 2014 21:29:25 -0400
|
||||
Subject: [PATCH] Try to make this build.
|
||||
|
||||
---
|
||||
Make.defaults
|
||||
inc/Makefile
|
||||
2 files changed, 12 insertions(+), 22 deletion(-)
|
||||
|
||||
diff -up a/gnuefi/Makefile b/gnuefi/Makefile
|
||||
--- a/gnuefi/Makefile 2014-05-15 17:15:54.000000000 -0500
|
||||
+++ b/gnuefi/Makefile 2014-05-19 14:02:29.048732554 -0500
|
||||
@@ -52,19 +52,6 @@ reloc_aarch64.o: CFLAGS += -fno-jump-tab
|
||||
|
||||
TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
|
||||
|
||||
-INSTALLTARGETS = $(TARGETS)
|
||||
-ifneq (,$(findstring FreeBSD,$(OS)))
|
||||
- ifeq ($(ARCH),x86_64)
|
||||
- INSTALLTARGETS += elf_$(ARCH)_fbsd_efi.lds
|
||||
- else
|
||||
- INSTALLTARGETS += elf_$(ARCH)_efi.lds
|
||||
- endif
|
||||
-else
|
||||
- INSTALLTARGETS += elf_$(ARCH)_efi.lds
|
||||
-endif
|
||||
-
|
||||
-LIBDIRINSTALL = $(INSTALLROOT)/$(LIBDIR)
|
||||
-
|
||||
all: $(TARGETS)
|
||||
|
||||
libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
|
||||
@@ -72,14 +59,17 @@ libgnuefi.a: $(patsubst %,libgnuefi.a(%)
|
||||
clean:
|
||||
rm -f $(TARGETS) *~ *.o $(OBJS)
|
||||
|
||||
-$(LIBDIRINSTALL):
|
||||
- mkdir -p $@
|
||||
-
|
||||
-.SECONDEXPANSION:
|
||||
-
|
||||
-$(LIBDIRINSTALL)/%: % | $$(dir $$@)
|
||||
- $(INSTALL) -m 644 $< $(dir $@)
|
||||
-
|
||||
-install: $(addprefix $(LIBDIRINSTALL)/,$(INSTALLTARGETS))
|
||||
+install:
|
||||
+ mkdir -p $(INSTALLROOT)/$(LIBDIR)
|
||||
+ $(INSTALL) -m 644 $(TARGETS) $(INSTALLROOT)/$(LIBDIR)
|
||||
+ifneq (,$(findstring FreeBSD,$(OS)))
|
||||
+ ifeq ($(ARCH),x86_64)
|
||||
+ $(INSTALL) -m 644 elf_$(ARCH)_fbsd_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
+ else
|
||||
+ $(INSTALL) -m 644 elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
+ endif
|
||||
+else
|
||||
+ $(INSTALL) -m 644 elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
+endif
|
||||
|
||||
include $(SRCDIR)/../Make.rules
|
||||
diff --git a/inc/Makefile b/inc/Makefile
|
||||
index 526af22..71fded5 100644
|
||||
--- a/inc/Makefile
|
||||
+++ b/inc/Makefile
|
||||
@@ -8,34 +8,20 @@ TOPDIR = $(SRCDIR)/..
|
||||
|
||||
CDIR=$(TOPDIR)/..
|
||||
|
||||
-INCDIRINSTALL = $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
-
|
||||
-SRCHEADERS = $(wildcard $(SRCDIR)/*.h) \
|
||||
- $(wildcard $(SRCDIR)/protocol/*.h) \
|
||||
- $(wildcard $(SRCDIR)/$(ARCH)/*.h)
|
||||
-ifeq ($(ARCH),ia64)
|
||||
- SRCHEADERS += $(wildcard $(SRCDIR)/protocol/$(ARCH)/*.h)
|
||||
-endif
|
||||
-
|
||||
-HEADERS = $(patsubst $(SRCDIR)/%,%,$(SRCHEADERS))
|
||||
-
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
||||
- rm -f *~
|
||||
-
|
||||
-$(INCDIRINSTALL) \
|
||||
-$(INCDIRINSTALL)/protocol \
|
||||
-$(INCDIRINSTALL)/$(ARCH) \
|
||||
-$(INCDIRINSTALL)/protocol/$(ARCH):
|
||||
- mkdir -p $@
|
||||
-
|
||||
-.SECONDEXPANSION:
|
||||
-
|
||||
-$(INCDIRINSTALL)/%.h: %.h | $$(dir $$@)
|
||||
- $(INSTALL) -m 644 $< $(dir $@)
|
||||
-
|
||||
-install: $(addprefix $(INCDIRINSTALL)/,$(HEADERS))
|
||||
+install:
|
||||
+ mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
+ mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol
|
||||
+ mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
|
||||
+ $(INSTALL) -m 644 *.h $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
+ $(INSTALL) -m 644 protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
|
||||
+ $(INSTALL) -m 644 $(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
|
||||
+ifeq ($(ARCH),ia64)
|
||||
+ mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
|
||||
+ $(INSTALL) -m 644 protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
|
||||
+endif
|
||||
|
||||
include $(SRCDIR)/../Make.rules
|
||||
--
|
||||
1.8.3.1
|
||||
|
15
gnu-efi.spec
15
gnu-efi.spec
@ -1,16 +1,14 @@
|
||||
Summary: Development Libraries and headers for EFI
|
||||
Name: gnu-efi
|
||||
Version: 3.0u
|
||||
Release: 0.4%{?dist}
|
||||
Version: 3.0w
|
||||
Release: 0.1%{?dist}
|
||||
Group: Development/System
|
||||
License: BSD
|
||||
URL: ftp://ftp.hpl.hp.com/pub/linux-ia64
|
||||
Source: ftp://ftp.hpl.hp.com/pub/linux-ia64/gnu-efi_%{version}.orig.tar.gz
|
||||
Patch0001: 0001-fix-compilation-on-x86_64-without-HAVE_USE_MS_ABI.patch
|
||||
Patch0002: 0002-be-more-pedantic-when-linking.patch
|
||||
Patch0003: 0003-Sample-boot-service-driver.patch
|
||||
Patch0: build-fix.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
ExclusiveArch: i686 x86_64 ia64
|
||||
ExclusiveArch: i686 x86_64 ia64 aarch64
|
||||
BuildRequires: git
|
||||
|
||||
%define debug_package %{nil}
|
||||
@ -86,6 +84,11 @@ rm -rf %{buildroot}
|
||||
%attr(0644,root,root) /boot/efi/EFI/%{efidir}/*.efi
|
||||
|
||||
%changelog
|
||||
* Fri Aug 22 2014 Kyle McMartin <kyle@fedoraproject.org> - 3.0w-0.1
|
||||
- New upstream version 3.0w
|
||||
- Add pjones' build fixes patch from that other distro.
|
||||
- Enable AArch64
|
||||
|
||||
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0u-0.4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user