mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
extra/gnu-efi-libs to 3.0.3-1.1
This commit is contained in:
parent
be0c936441
commit
d36fef8704
13 changed files with 2013 additions and 48 deletions
|
@ -0,0 +1,34 @@
|
|||
From a912cb49eb0b6fa63cfb045e549a51746c704d23 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Wed, 19 Aug 2015 07:28:45 -0400
|
||||
Subject: [PATCH 01/10] Add the missing URI device path to the unions.
|
||||
|
||||
Signed-off-by: Gary Ching-Pang Lin <chinpang@gmail.com>
|
||||
SIgned-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
inc/efidevp.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/inc/efidevp.h b/inc/efidevp.h
|
||||
index 38923d9..b20c839 100644
|
||||
--- a/inc/efidevp.h
|
||||
+++ b/inc/efidevp.h
|
||||
@@ -491,6 +491,7 @@ typedef union {
|
||||
MAC_ADDR_DEVICE_PATH MacAddr;
|
||||
IPv4_DEVICE_PATH Ipv4;
|
||||
IPv6_DEVICE_PATH Ipv6;
|
||||
+ URI_DEVICE_PATH Uri;
|
||||
INFINIBAND_DEVICE_PATH InfiniBand;
|
||||
UART_DEVICE_PATH Uart;
|
||||
|
||||
@@ -525,6 +526,7 @@ typedef union {
|
||||
MAC_ADDR_DEVICE_PATH *MacAddr;
|
||||
IPv4_DEVICE_PATH *Ipv4;
|
||||
IPv6_DEVICE_PATH *Ipv6;
|
||||
+ URI_DEVICE_PATH *Uri;
|
||||
INFINIBAND_DEVICE_PATH *InfiniBand;
|
||||
UART_DEVICE_PATH *Uart;
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
60
extra/gnu-efi-libs/0002-From-Pete-Batard-pete-akeo.ie.patch
Normal file
60
extra/gnu-efi-libs/0002-From-Pete-Batard-pete-akeo.ie.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
From c875f9935c177161eecf4e7efddfe4cd52c038b7 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Thu, 17 Sep 2015 08:22:39 -0400
|
||||
Subject: [PATCH 02/10] From: Pete Batard <pete@akeo.ie> Date: Wed, 16 Sep 2015
|
||||
18:26:28 +0100 Subject: [PATCH] Fix VS2015 warnings
|
||||
|
||||
* Currently, Visual Studio 2015 generates a lot of warnings such as:
|
||||
gnu-efi\inc\efipciio.h(7): warning C4091: 'typedef ': ignored on left of '_EFI_PCI_IO' when no variable is declared
|
||||
* To address this, gnu-efi should define the INTERFACE_DECL() for MS compilers as it does for GNU
|
||||
|
||||
Signed-off-by: Pete Batard <pete@akeo.ie>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
inc/ia32/efibind.h | 2 +-
|
||||
inc/ia64/efibind.h | 2 +-
|
||||
inc/x86_64/efibind.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h
|
||||
index b8db581..1b11f10 100644
|
||||
--- a/inc/ia32/efibind.h
|
||||
+++ b/inc/ia32/efibind.h
|
||||
@@ -272,7 +272,7 @@ typedef uint32_t UINTN;
|
||||
#ifdef NO_INTERFACE_DECL
|
||||
#define INTERFACE_DECL(x)
|
||||
#else
|
||||
-#ifdef __GNUC__
|
||||
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
|
||||
#define INTERFACE_DECL(x) struct x
|
||||
#else
|
||||
#define INTERFACE_DECL(x) typedef struct x
|
||||
diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h
|
||||
index 6f9a6f7..b415461 100644
|
||||
--- a/inc/ia64/efibind.h
|
||||
+++ b/inc/ia64/efibind.h
|
||||
@@ -219,7 +219,7 @@ void __mf (void);
|
||||
#ifdef NO_INTERFACE_DECL
|
||||
#define INTERFACE_DECL(x)
|
||||
#else
|
||||
-#ifdef __GNUC__
|
||||
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
|
||||
#define INTERFACE_DECL(x) struct x
|
||||
#else
|
||||
#define INTERFACE_DECL(x) typedef struct x
|
||||
diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h
|
||||
index 6bbd337..5ee620b 100644
|
||||
--- a/inc/x86_64/efibind.h
|
||||
+++ b/inc/x86_64/efibind.h
|
||||
@@ -284,7 +284,7 @@ typedef uint64_t UINTN;
|
||||
#ifdef NO_INTERFACE_DECL
|
||||
#define INTERFACE_DECL(x)
|
||||
#else
|
||||
-#ifdef __GNUC__
|
||||
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
|
||||
#define INTERFACE_DECL(x) struct x
|
||||
#else
|
||||
#define INTERFACE_DECL(x) typedef struct x
|
||||
--
|
||||
2.5.0
|
||||
|
146
extra/gnu-efi-libs/0003-From-Pete-Batard-pete-akeo.ie.patch
Normal file
146
extra/gnu-efi-libs/0003-From-Pete-Batard-pete-akeo.ie.patch
Normal file
|
@ -0,0 +1,146 @@
|
|||
From 1e745dbd820ca0f35a078a381480b308a750c624 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Wed, 23 Sep 2015 10:03:31 -0400
|
||||
Subject: [PATCH 03/10] From: Pete Batard <pete@akeo.ie> Subject: [PATCH] Fix
|
||||
MSVC breakage due to GNU align extensions in setjmp
|
||||
|
||||
* __attribute__((__aligned__(x))), which is used in setjmp, is GNU only => use a macro instead
|
||||
|
||||
Signed-off-by: Pete Batard <pete@akeo.ie>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
inc/aarch64/efisetjmp_arch.h | 4 +++-
|
||||
inc/arm/efisetjmp_arch.h | 4 +++-
|
||||
inc/efisetjmp.h | 6 ++++++
|
||||
inc/ia32/efisetjmp_arch.h | 6 +++---
|
||||
inc/ia64/efisetjmp_arch.h | 4 +++-
|
||||
inc/x86_64/efisetjmp_arch.h | 4 +++-
|
||||
6 files changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/inc/aarch64/efisetjmp_arch.h b/inc/aarch64/efisetjmp_arch.h
|
||||
index bce9b73..abd7a0e 100644
|
||||
--- a/inc/aarch64/efisetjmp_arch.h
|
||||
+++ b/inc/aarch64/efisetjmp_arch.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GNU_EFI_AARCH64_SETJMP_H
|
||||
#define GNU_EFI_AARCH64_SETJMP_H
|
||||
|
||||
+#define JMPBUF_ALIGN 8
|
||||
+
|
||||
typedef struct {
|
||||
/* GP regs */
|
||||
UINT64 X19;
|
||||
@@ -26,6 +28,6 @@ typedef struct {
|
||||
UINT64 D13;
|
||||
UINT64 D14;
|
||||
UINT64 D15;
|
||||
-} __attribute__((__aligned__(8))) jmp_buf;
|
||||
+} ALIGN(JMPBUF_ALIGN) jmp_buf;
|
||||
|
||||
#endif /* GNU_EFI_AARCH64_SETJMP_H */
|
||||
diff --git a/inc/arm/efisetjmp_arch.h b/inc/arm/efisetjmp_arch.h
|
||||
index 0faf2e2..3a09ea5 100644
|
||||
--- a/inc/arm/efisetjmp_arch.h
|
||||
+++ b/inc/arm/efisetjmp_arch.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GNU_EFI_ARM_SETJMP_H
|
||||
#define GNU_EFI_ARM_SETJMP_H
|
||||
|
||||
+#define JMPBUF_ALIGN 4
|
||||
+
|
||||
typedef struct {
|
||||
UINT32 R3; // A copy of R13
|
||||
UINT32 R4;
|
||||
@@ -14,6 +16,6 @@ typedef struct {
|
||||
UINT32 R12;
|
||||
UINT32 R13;
|
||||
UINT32 R14;
|
||||
-} __attribute__((__aligned__(4))) jmp_buf;
|
||||
+} ALIGN(JMPBUF_ALIGN) jmp_buf;
|
||||
|
||||
#endif /* GNU_EFI_ARM_SETJMP_H */
|
||||
diff --git a/inc/efisetjmp.h b/inc/efisetjmp.h
|
||||
index da8d050..9cb6cec 100644
|
||||
--- a/inc/efisetjmp.h
|
||||
+++ b/inc/efisetjmp.h
|
||||
@@ -1,6 +1,12 @@
|
||||
#ifndef GNU_EFI_SETJMP_H
|
||||
#define GNU_EFI_SETJMP_H
|
||||
|
||||
+#ifdef _MSC_EXTENSIONS
|
||||
+#define ALIGN(x) __declspec(align(x))
|
||||
+#else
|
||||
+#define ALIGN(x) __attribute__((__aligned__(x)))
|
||||
+#endif
|
||||
+
|
||||
#include "efisetjmp_arch.h"
|
||||
|
||||
extern UINTN setjmp(jmp_buf *env);
|
||||
diff --git a/inc/ia32/efisetjmp_arch.h b/inc/ia32/efisetjmp_arch.h
|
||||
index ca2e075..17184e7 100644
|
||||
--- a/inc/ia32/efisetjmp_arch.h
|
||||
+++ b/inc/ia32/efisetjmp_arch.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GNU_EFI_IA32_SETJMP_H
|
||||
#define GNU_EFI_IA32_SETJMP_H
|
||||
|
||||
+#define JMPBUF_ALIGN 4
|
||||
+
|
||||
typedef struct {
|
||||
UINT32 Ebx;
|
||||
UINT32 Esi;
|
||||
@@ -8,8 +10,6 @@ typedef struct {
|
||||
UINT32 Ebp;
|
||||
UINT32 Esp;
|
||||
UINT32 Eip;
|
||||
-} __attribute__((__aligned__(4))) jmp_buf;
|
||||
-
|
||||
-#define JMPBUF_ALIGN 4
|
||||
+} ALIGN(JMPBUF_ALIGN) jmp_buf;
|
||||
|
||||
#endif /* GNU_EFI_IA32_SETJMP_H */
|
||||
diff --git a/inc/ia64/efisetjmp_arch.h b/inc/ia64/efisetjmp_arch.h
|
||||
index dadbe64..3afa044 100644
|
||||
--- a/inc/ia64/efisetjmp_arch.h
|
||||
+++ b/inc/ia64/efisetjmp_arch.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GNU_EFI_IA64_SETJMP_H
|
||||
#define GNU_EFI_IA64_SETJMP_H
|
||||
|
||||
+#define JMPBUF_ALIGN 0x10
|
||||
+
|
||||
typedef struct {
|
||||
UINT64 F2[2];
|
||||
UINT64 F3[2];
|
||||
@@ -40,6 +42,6 @@ typedef struct {
|
||||
UINT64 Predicates;
|
||||
UINT64 LoopCount;
|
||||
UINT64 FPSR;
|
||||
-} __attribute__((__aligned__(0x10))) jmp_buf;
|
||||
+} ALIGN(JMPBUF_ALIGN) jmp_buf;
|
||||
|
||||
#endif /* GNU_EFI_IA64_SETJMP_H */
|
||||
diff --git a/inc/x86_64/efisetjmp_arch.h b/inc/x86_64/efisetjmp_arch.h
|
||||
index ce4e393..a489993 100644
|
||||
--- a/inc/x86_64/efisetjmp_arch.h
|
||||
+++ b/inc/x86_64/efisetjmp_arch.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GNU_EFI_X86_64_SETJMP_H
|
||||
#define GNU_EFI_X86_64_SETJMP_H
|
||||
|
||||
+#define JMPBUF_ALIGN 8
|
||||
+
|
||||
typedef struct {
|
||||
UINT64 Rbx;
|
||||
UINT64 Rsp;
|
||||
@@ -15,6 +17,6 @@ typedef struct {
|
||||
UINT64 Rip;
|
||||
UINT64 MxCsr;
|
||||
UINT8 XmmBuffer[160]; // XMM6 - XMM15
|
||||
-} __attribute__((__aligned__(8))) jmp_buf;
|
||||
+} ALIGN(JMPBUF_ALIGN) jmp_buf;
|
||||
|
||||
#endif /* GNU_EFI_X86_64_SETJMP_H */
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
From b5f22f43118c2c18ae0cc6f2532e5485cdc3d131 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Mon, 30 Nov 2015 08:52:25 -0500
|
||||
Subject: [PATCH 04/10] From: Julian Andres Klode <jak@debian.org> Subject:
|
||||
[PATCH gnu-efi] lib/arm/setjmp.S: Use %function instead of @function
|
||||
|
||||
@ is a comment character on ARM, so use % instead.
|
||||
|
||||
Nigel adjusted the wordwrap on the copyright header.
|
||||
|
||||
Signed-off-by: Julian Andres Klode <jak@degian.org>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
lib/arm/setjmp.S | 19 ++++++++-----------
|
||||
1 file changed, 8 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lib/arm/setjmp.S b/lib/arm/setjmp.S
|
||||
index 6e3fbf0..bd61a8d 100644
|
||||
--- a/lib/arm/setjmp.S
|
||||
+++ b/lib/arm/setjmp.S
|
||||
@@ -1,21 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
|
||||
- * This program and the accompanying materials are licensed and made
|
||||
-available
|
||||
- * under the terms and conditions of the BSD License which accompanies
|
||||
-this
|
||||
- * distribution. The full text of the license may be found at
|
||||
- * http://opensource.org/licenses/bsd-license.php.
|
||||
+ * This program and the accompanying materials are licensed and made
|
||||
+ * available under the terms and conditions of the BSD License which
|
||||
+ * accompanies this distribution. The full text of the license may
|
||||
+ * be found at http://opensource.org/licenses/bsd-license.php.
|
||||
*
|
||||
* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
|
||||
-BASIS,
|
||||
- * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
- * IMPLIED.
|
||||
+ * BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
|
||||
+ * EXPRESS OR IMPLIED.
|
||||
*/
|
||||
.text
|
||||
.arm
|
||||
.globl setjmp
|
||||
- .type setjmp, @function
|
||||
+ .type setjmp, %function
|
||||
setjmp:
|
||||
mov r3, r13
|
||||
stmia r0, {r3-r12,r14}
|
||||
@@ -23,6 +20,6 @@ setjmp:
|
||||
bx lr
|
||||
|
||||
.globl longjmp
|
||||
- .type longjmp, @function
|
||||
+ .type longjmp, %function
|
||||
longjmp:
|
||||
ldmia r0, {r3-r12,r14}
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
From 8ffbd27504e1c886c92b01b21a215dbb7bd60197 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Wed, 23 Dec 2015 08:19:46 -0500
|
||||
Subject: [PATCH 05/10] From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Subject: [PATCH 1/2] Relicense ARM and AARCH64 source files as both BSD and
|
||||
GPL
|
||||
|
||||
This updates the licenses of the files authored by me under lib/arm
|
||||
and lib/aarch64 to be both 2-clause BSD and GPL v2+
|
||||
|
||||
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
gnuefi/crt0-efi-arm.S | 15 +++++++++++----
|
||||
lib/aarch64/initplat.c | 17 +++++++++++------
|
||||
lib/aarch64/math.c | 17 +++++++++++------
|
||||
lib/arm/initplat.c | 17 +++++++++++------
|
||||
lib/arm/math.c | 17 +++++++++++------
|
||||
5 files changed, 55 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S
|
||||
index 3efaf78..c5bb6d4 100644
|
||||
--- a/gnuefi/crt0-efi-arm.S
|
||||
+++ b/gnuefi/crt0-efi-arm.S
|
||||
@@ -3,10 +3,17 @@
|
||||
*
|
||||
* Copright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
- * This program is free software; you can redistribute it and/or modify it
|
||||
- * under the terms of the GNU General Public License as published by the Free
|
||||
- * Software Foundation; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
.section .text.head
|
||||
diff --git a/lib/aarch64/initplat.c b/lib/aarch64/initplat.c
|
||||
index 1c34cef..b4d29a9 100644
|
||||
--- a/lib/aarch64/initplat.c
|
||||
+++ b/lib/aarch64/initplat.c
|
||||
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
- * aarch64/initplat.c
|
||||
- *
|
||||
* Copright (C) 2014 Linaro Ltd.
|
||||
* Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
- * This program is free software; you can redistribute it and/or modify it
|
||||
- * under the terms of the GNU General Public License as published by the Free
|
||||
- * Software Foundation; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
diff --git a/lib/aarch64/math.c b/lib/aarch64/math.c
|
||||
index d836965..8c16444 100644
|
||||
--- a/lib/aarch64/math.c
|
||||
+++ b/lib/aarch64/math.c
|
||||
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
- * crt0-efi-aarch64.S - PE/COFF header for Aarch64 EFI applications
|
||||
- *
|
||||
* Copright (C) 2014 Linaro Ltd.
|
||||
* Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
- * This program is free software; you can redistribute it and/or modify it
|
||||
- * under the terms of the GNU General Public License as published by the Free
|
||||
- * Software Foundation; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
diff --git a/lib/arm/initplat.c b/lib/arm/initplat.c
|
||||
index 934289c..a90a457 100644
|
||||
--- a/lib/arm/initplat.c
|
||||
+++ b/lib/arm/initplat.c
|
||||
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
- * aarch64/initplat.c
|
||||
- *
|
||||
* Copright (C) 2014 Linaro Ltd.
|
||||
* Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
- * This program is free software; you can redistribute it and/or modify it
|
||||
- * under the terms of the GNU General Public License as published by the Free
|
||||
- * Software Foundation; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
diff --git a/lib/arm/math.c b/lib/arm/math.c
|
||||
index 2502a8e..adf79f9 100644
|
||||
--- a/lib/arm/math.c
|
||||
+++ b/lib/arm/math.c
|
||||
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
- * arm/math.c - math routines for ARM
|
||||
- *
|
||||
* Copright (C) 2014 Linaro Ltd.
|
||||
* Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
- * This program is free software; you can redistribute it and/or modify it
|
||||
- * under the terms of the GNU General Public License as published by the Free
|
||||
- * Software Foundation; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
--
|
||||
2.5.0
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,48 @@
|
|||
From 16409cad4cb4ccd7c914da4317740550cc00200c Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Wed, 23 Dec 2015 08:38:24 -0500
|
||||
Subject: [PATCH 07/10] From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Subject: [PATCH] Add ARM .note.gnu.build-id input section to a dedicated
|
||||
output section
|
||||
|
||||
This fixes the builds for ARM and AARCH64, which currently fail at link
|
||||
time with an error like this:
|
||||
|
||||
arm-linux-gnueabi-ld: section .note.gnu.build-id loaded at
|
||||
[0000000000000000,0000000000000023] overlaps section .text loaded at
|
||||
[0000000000000000,00000000000064cf]
|
||||
|
||||
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
gnuefi/elf_aarch64_efi.lds | 1 +
|
||||
gnuefi/elf_arm_efi.lds | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds
|
||||
index 6494e59..8864757 100644
|
||||
--- a/gnuefi/elf_aarch64_efi.lds
|
||||
+++ b/gnuefi/elf_aarch64_efi.lds
|
||||
@@ -50,6 +50,7 @@ SECTIONS
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.rel.reloc)
|
||||
diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
|
||||
index 63d31be..a2f1b01 100644
|
||||
--- a/gnuefi/elf_arm_efi.lds
|
||||
+++ b/gnuefi/elf_arm_efi.lds
|
||||
@@ -50,6 +50,7 @@ SECTIONS
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.rel.reloc)
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
From af1a3ea3c2ca8023fd51e0b7190da43e3aaa1a95 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Thu, 7 Jan 2016 09:35:42 -0500
|
||||
Subject: [PATCH 08/10] From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Subject: [PATCH v2] ARM/AARCH64: define C99 types explicitly when building
|
||||
against older standard
|
||||
|
||||
This adds support for the C99 uintXX_t types when building for
|
||||
older versions of the standard, like the other architectures
|
||||
already implement.
|
||||
|
||||
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Reviewed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
inc/aarch64/efibind.h | 33 ++++++++++++++++++++++++++++++++-
|
||||
inc/arm/efibind.h | 31 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 63 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/inc/aarch64/efibind.h b/inc/aarch64/efibind.h
|
||||
index 693fe52..ef7148d 100644
|
||||
--- a/inc/aarch64/efibind.h
|
||||
+++ b/inc/aarch64/efibind.h
|
||||
@@ -1,5 +1,36 @@
|
||||
-
|
||||
+/*
|
||||
+ * Copright (C) 2014 - 2015 Linaro Ltd.
|
||||
+ * Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
+ *
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )
|
||||
+
|
||||
+// ANSI C 1999/2000 stdint.h integer width declarations
|
||||
+
|
||||
+typedef unsigned long uint64_t;
|
||||
+typedef long int64_t;
|
||||
+typedef unsigned int uint32_t;
|
||||
+typedef int int32_t;
|
||||
+typedef unsigned short uint16_t;
|
||||
+typedef short int16_t;
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef signed char int8_t; // unqualified 'char' is unsigned on ARM
|
||||
+
|
||||
+#else
|
||||
#include <stdint.h>
|
||||
+#endif
|
||||
|
||||
//
|
||||
// Basic EFI types of various widths
|
||||
diff --git a/inc/arm/efibind.h b/inc/arm/efibind.h
|
||||
index cc4b5c5..8c37f64 100644
|
||||
--- a/inc/arm/efibind.h
|
||||
+++ b/inc/arm/efibind.h
|
||||
@@ -1,5 +1,36 @@
|
||||
+/*
|
||||
+ * Copright (C) 2014 - 2015 Linaro Ltd.
|
||||
+ * Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
+ *
|
||||
+ * 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 and this list of conditions, without modification.
|
||||
+ * 2. The name of the author may not be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ * Alternatively, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License as published by the Free Software Foundation;
|
||||
+ * either version 2 of the License, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )
|
||||
|
||||
+// ANSI C 1999/2000 stdint.h integer width declarations
|
||||
+
|
||||
+typedef unsigned long long uint64_t;
|
||||
+typedef long long int64_t;
|
||||
+typedef unsigned int uint32_t;
|
||||
+typedef int int32_t;
|
||||
+typedef unsigned short uint16_t;
|
||||
+typedef short int16_t;
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef signed char int8_t; // unqualified 'char' is unsigned on ARM
|
||||
+
|
||||
+#else
|
||||
#include <stdint.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This prevents GCC from emitting GOT based relocations, and use R_ARM_REL32
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From b3a63019277282415e0c06942b0aa42c4e876582 Mon Sep 17 00:00:00 2001
|
||||
From: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
Date: Wed, 17 Feb 2016 15:32:23 -0500
|
||||
Subject: [PATCH 09/10] arm: fix linker script for building efi binaries
|
||||
|
||||
On arm, the linker script is missing section collection for data and
|
||||
bss. This causes some symbols (notably static array symbols) not to
|
||||
get relocated correctly and the resulting efi binary to crash. Fix
|
||||
this by correctly collecting all the data and bss sections.
|
||||
|
||||
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
|
||||
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
|
||||
---
|
||||
gnuefi/elf_arm_efi.lds | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
|
||||
index a2f1b01..2ca8fc6 100644
|
||||
--- a/gnuefi/elf_arm_efi.lds
|
||||
+++ b/gnuefi/elf_arm_efi.lds
|
||||
@@ -22,7 +22,7 @@ SECTIONS
|
||||
*(.sdata)
|
||||
*(.data)
|
||||
*(.data1)
|
||||
- *(.data)
|
||||
+ *(.data.*)
|
||||
*(.got.plt)
|
||||
*(.got)
|
||||
|
||||
@@ -34,6 +34,7 @@ SECTIONS
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
+ *(.bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(16);
|
||||
_bss_end = .;
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
From 0587ab32cf5037fd759dfcec0e858a57372cb64f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 15 Jul 2015 10:15:51 -0400
|
||||
Subject: [PATCH 10/10] Explicitly place our build-id notes on all arches.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Apparently some linkers will just throw caution to the wind and decide
|
||||
to stick stuff we don't explicitly mention at 0, no matter what else has
|
||||
already explicitly been located there. A debian/ubuntu builder noted:
|
||||
|
||||
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
|
||||
-fno-merge-constants -ffreestanding -fno-stack-protector \
|
||||
-fno-stack-check --std=c11 -DCONFIG_aarch64 -D__KERNEL__ \
|
||||
-I/usr/include/efi/ -I/usr/include/efi/aarch64/ \
|
||||
-iquote/«PKGBUILDDIR»/include "-DDEBUGDIR=L\"/\"" \
|
||||
-ffreestanding -I/usr/lib/gcc/aarch64-linux-gnu/4.9/include \
|
||||
-c -o fakeesrt2.o fakeesrt2.c
|
||||
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared \
|
||||
-Bsymbolic -L/usr/lib -L/usr/lib --build-id=sha1 \
|
||||
/usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa \
|
||||
-o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \
|
||||
/usr/lib/gcc/aarch64-linux-gnu/4.9/libgcc.a \
|
||||
-T elf_aarch64_efi.lds
|
||||
ld: section .note.gnu.build-id loaded at [00000000,00000023] overlaps section .text loaded at [00000000,0000668f]
|
||||
|
||||
This shouldn't be a problem if we explicitly tell it where to put them.
|
||||
|
||||
Ard added a patch to do this on Arm and aarch64 targets in 16409cad4cb,
|
||||
but it needs to be everywhere.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
gnuefi/elf_ia32_efi.lds | 2 ++
|
||||
gnuefi/elf_ia32_fbsd_efi.lds | 2 ++
|
||||
gnuefi/elf_ia64_efi.lds | 2 ++
|
||||
gnuefi/elf_x86_64_efi.lds | 2 ++
|
||||
gnuefi/elf_x86_64_fbsd_efi.lds | 2 ++
|
||||
5 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds
|
||||
index b164094..6cc4ce1 100644
|
||||
--- a/gnuefi/elf_ia32_efi.lds
|
||||
+++ b/gnuefi/elf_ia32_efi.lds
|
||||
@@ -46,6 +46,8 @@ SECTIONS
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
+
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds
|
||||
index 1f56cd7..77d6fad 100644
|
||||
--- a/gnuefi/elf_ia32_fbsd_efi.lds
|
||||
+++ b/gnuefi/elf_ia32_fbsd_efi.lds
|
||||
@@ -46,6 +46,8 @@ SECTIONS
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
+
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds
|
||||
index a6ec717..baca962 100644
|
||||
--- a/gnuefi/elf_ia64_efi.lds
|
||||
+++ b/gnuefi/elf_ia64_efi.lds
|
||||
@@ -43,6 +43,8 @@ SECTIONS
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
+
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
|
||||
index 3862d9f..942d1f3 100644
|
||||
--- a/gnuefi/elf_x86_64_efi.lds
|
||||
+++ b/gnuefi/elf_x86_64_efi.lds
|
||||
@@ -46,6 +46,8 @@ SECTIONS
|
||||
*(COMMON)
|
||||
*(.rel.local)
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
+
|
||||
_edata = .;
|
||||
_data_size = . - _etext;
|
||||
. = ALIGN(4096);
|
||||
diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x86_64_fbsd_efi.lds
|
||||
index 507fe43..6fd2031 100644
|
||||
--- a/gnuefi/elf_x86_64_fbsd_efi.lds
|
||||
+++ b/gnuefi/elf_x86_64_fbsd_efi.lds
|
||||
@@ -43,6 +43,8 @@ SECTIONS
|
||||
*(COMMON)
|
||||
*(.rel.local)
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
+
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -15,7 +15,7 @@ buildarch=8
|
|||
_pkgver="3.0.3"
|
||||
pkgname="gnu-efi-libs"
|
||||
pkgver="${_pkgver}"
|
||||
pkgrel="1"
|
||||
pkgrel="1.1"
|
||||
pkgdesc="Library for building UEFI Applications using GNU toolchain"
|
||||
url="http://sourceforge.net/projects/gnu-efi/"
|
||||
license=('GPL')
|
||||
|
@ -23,17 +23,41 @@ arch=('x86_64' 'i686')
|
|||
options=('!strip' '!makeflags' '!buildflags')
|
||||
makedepends=('pciutils')
|
||||
source=("http://download.sourceforge.net/gnu-efi/gnu-efi-${pkgver}.tar.bz2"
|
||||
'lib-arm-setjmp.S-Use-function-instead-of-function.patch'
|
||||
'explicit-build-id.patch')
|
||||
'0001-Add-the-missing-URI-device-path-to-the-unions.patch'
|
||||
'0002-From-Pete-Batard-pete-akeo.ie.patch'
|
||||
'0003-From-Pete-Batard-pete-akeo.ie.patch'
|
||||
'0004-From-Julian-Andres-Klode-jak-debian.org.patch'
|
||||
'0005-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch'
|
||||
'0006-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch'
|
||||
'0007-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch'
|
||||
'0008-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch'
|
||||
'0009-arm-fix-linker-script-for-building-efi-binaries.patch'
|
||||
'0010-Explicitly-place-our-build-id-notes-on-all-arches.patch')
|
||||
md5sums=('15a4bcbc18a9a5e8110ed955970622e6'
|
||||
'3c904fdc8208110ecd3d8d1f5da6c8c5'
|
||||
'a104721985027e427f3215a542e6c7b3')
|
||||
'c7d8e738044c07b8bfd655e120d01d63'
|
||||
'd09521c26ae76ca37bba4c64d5cfc4e2'
|
||||
'572220bca179c5b258f46339cc1c5727'
|
||||
'b53235519711cc61f18a084376737e8a'
|
||||
'f55d6bfd181d10a03b2c284c56afdfd3'
|
||||
'cb03dfb51d34767152ff77b36f63b822'
|
||||
'b042fc2103f84f2e1013acffb4180fa8'
|
||||
'a596355d911c50dea97710fd8038de1f'
|
||||
'fe873247639fde48e8588838392df047'
|
||||
'c47ab0bb5968938d927c9e290d117b83')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/gnu-efi-${_pkgver}/"
|
||||
|
||||
patch -p1 -i ../lib-arm-setjmp.S-Use-function-instead-of-function.patch
|
||||
patch -p1 -i ../explicit-build-id.patch
|
||||
patch -p1 -i ../0001-Add-the-missing-URI-device-path-to-the-unions.patch
|
||||
patch -p1 -i ../0002-From-Pete-Batard-pete-akeo.ie.patch
|
||||
patch -p1 -i ../0003-From-Pete-Batard-pete-akeo.ie.patch
|
||||
patch -p1 -i ../0004-From-Julian-Andres-Klode-jak-debian.org.patch
|
||||
patch -p1 -i ../0005-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch
|
||||
patch -p1 -i ../0006-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch
|
||||
patch -p1 -i ../0007-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch
|
||||
patch -p1 -i ../0008-From-Ard-Biesheuvel-ard.biesheuvel-linaro.org.patch
|
||||
patch -p1 -i ../0009-arm-fix-linker-script-for-building-efi-binaries.patch
|
||||
patch -p1 -i ../0010-Explicitly-place-our-build-id-notes-on-all-arches.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
diff -urN a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds
|
||||
--- a/gnuefi/elf_aarch64_efi.lds 2015-08-17 14:06:47.000000000 -0600
|
||||
+++ b/gnuefi/elf_aarch64_efi.lds 2015-12-17 22:20:26.182403513 -0700
|
||||
@@ -38,6 +38,7 @@
|
||||
. = ALIGN(16);
|
||||
_bss_end = .;
|
||||
}
|
||||
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
.rela.dyn : { *(.rela.dyn) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.rela.got : { *(.rela.got) }
|
|
@ -1,30 +0,0 @@
|
|||
From: Julian Andres Klode <jak@debian.org>
|
||||
Date: Sun, 29 Nov 2015 12:31:06 +0100
|
||||
Subject: lib/arm/setjmp.S: Use %function instead of @function
|
||||
|
||||
@ is a comment character on ARM, so use % instead.
|
||||
---
|
||||
lib/arm/setjmp.S | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/arm/setjmp.S b/lib/arm/setjmp.S
|
||||
index 6e3fbf0..85c8705 100644
|
||||
--- a/lib/arm/setjmp.S
|
||||
+++ b/lib/arm/setjmp.S
|
||||
@@ -15,7 +15,7 @@ BASIS,
|
||||
.text
|
||||
.arm
|
||||
.globl setjmp
|
||||
- .type setjmp, @function
|
||||
+ .type setjmp, %function
|
||||
setjmp:
|
||||
mov r3, r13
|
||||
stmia r0, {r3-r12,r14}
|
||||
@@ -23,6 +23,6 @@ setjmp:
|
||||
bx lr
|
||||
|
||||
.globl longjmp
|
||||
- .type longjmp, @function
|
||||
+ .type longjmp, %function
|
||||
longjmp:
|
||||
ldmia r0, {r3-r12,r14}
|
Loading…
Reference in a new issue