]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/commitdiff
gnu-efi: New package.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Mar 2013 14:34:28 +0000 (15:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Mar 2013 14:46:13 +0000 (15:46 +0100)
Requirement for gummiboot.

gnu-efi/gnu-efi.nm [new file with mode: 0644]
gnu-efi/patches/gnu-efi-3.0q-Add-.S-and-.E-rules.patch [new file with mode: 0644]
gnu-efi/patches/gnu-efi-3.0q-Fix-usage-of-INSTALLROOT-PREFIX-and-LIBDIR.patch [new file with mode: 0644]
gnu-efi/patches/gnu-efi-3.0q-machine-types.patch [new file with mode: 0644]

diff --git a/gnu-efi/gnu-efi.nm b/gnu-efi/gnu-efi.nm
new file mode 100644 (file)
index 0000000..6a29a44
--- /dev/null
@@ -0,0 +1,45 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = gnu-efi
+version    = 3.0q
+release    = 1
+sup_arches = x86_64 i686
+
+groups     = Development/System
+url        = ftp://ftp.hpl.hp.com/pub/linux-ia64
+license    = BSD
+summary    = Development Libraries and headers for EFI
+
+description
+       This package contains development headers and libraries for developing
+       applications that run under EFI (Extensible Firmware Interface).
+end
+
+source_dl  = %{url}
+
+build
+       # Disable hardening.
+       CFLAGS += -fno-stack-protector
+
+       make_build_targets += CFLAGS="%{CFLAGS}"
+
+       install
+               make PREFIX=%{prefix} INSTALLROOT=%{BUILDROOT} \
+                       LIBDIR=%{libdir} CFLAGS="%{CFLAGS}" install
+
+               mkdir -pv %{BUILDROOT}%{libdir}/gnuefi
+               mv -v %{BUILDROOT}%{libdir}/*.{lds,o} %{BUILDROOT}%{libdir}/gnuefi
+       end
+
+       keep_libraries
+               %{libdir}/libefi.a
+               %{libdir}/libgnuefi.a
+       end
+end
+
+packages
+       package %{name}
+end
diff --git a/gnu-efi/patches/gnu-efi-3.0q-Add-.S-and-.E-rules.patch b/gnu-efi/patches/gnu-efi-3.0q-Add-.S-and-.E-rules.patch
new file mode 100644 (file)
index 0000000..b6fdfaf
--- /dev/null
@@ -0,0 +1,25 @@
+From bb12d86aceb7d9ea6748f45a17f719a8e18c81c8 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Tue, 9 Aug 2011 12:30:49 -0400
+Subject: [PATCH 7/7] Add %.S and %.E rules to make debugging easier.
+
+---
+ Make.rules |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Make.rules b/Make.rules
+index eab12d7..65fb612 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -44,3 +44,8 @@
+ %.o: %.c
+       $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
++%.S: %.c
++      $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -S $< -o $@
++
++%.E: %.c
++      $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -E $< -o $@
+-- 
+1.7.10.4
+
diff --git a/gnu-efi/patches/gnu-efi-3.0q-Fix-usage-of-INSTALLROOT-PREFIX-and-LIBDIR.patch b/gnu-efi/patches/gnu-efi-3.0q-Fix-usage-of-INSTALLROOT-PREFIX-and-LIBDIR.patch
new file mode 100644 (file)
index 0000000..ecb5c56
--- /dev/null
@@ -0,0 +1,66 @@
+From 3f40a425e763edfde77a9a6e05ed09b0676d8fa9 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@cutlet.install.bos.redhat.com>
+Date: Fri, 3 Oct 2008 14:40:56 -0400
+Subject: [PATCH 1/7] Fix usage of INSTALLROOT, PREFIX, and LIBDIR.
+
+I screwed it up last time.
+---
+ Make.defaults |    6 +++---
+ inc/Makefile  |   16 ++++++++--------
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/Make.defaults b/Make.defaults
+index bf162c5..6278fa7 100644
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -38,8 +38,9 @@
+ # Where to install the package. GNU-EFI will create and access
+ # lib and include under the root
+ #
+-INSTALLROOT=/usr/local
+-LIBDIR=lib
++INSTALLROOT:= /
++PREFIX := /usr/local
++LIBDIR := ${PREFIX}/lib
+ TOPDIR    := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+@@ -73,7 +74,6 @@ endif
+ ifeq ($(ARCH), x86_64)
+   CFLAGS += -mno-red-zone
+-  LIBDIR = lib
+   ifeq ($(HOSTARCH), ia32)
+     ARCH3264 = -m64
+   endif
+diff --git a/inc/Makefile b/inc/Makefile
+index 9683be5..71fded5 100644
+--- a/inc/Makefile
++++ b/inc/Makefile
+@@ -13,15 +13,15 @@ all:
+ clean:
+ install:
+-      mkdir -p $(INSTALLROOT)/include/efi
+-      mkdir -p $(INSTALLROOT)/include/efi/protocol
+-      mkdir -p $(INSTALLROOT)/include/efi/$(ARCH)
+-      $(INSTALL) -m 644 *.h $(INSTALLROOT)/include/efi
+-      $(INSTALL) -m 644 protocol/*.h $(INSTALLROOT)/include/efi/protocol
+-      $(INSTALL) -m 644 $(ARCH)/*.h $(INSTALLROOT)/include/efi/$(ARCH)
++      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)/include/efi/protocol/ia64
+-      $(INSTALL) -m 644 protocol/ia64/*.h $(INSTALLROOT)/include/efi/protocol/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.7.10.4
+
diff --git a/gnu-efi/patches/gnu-efi-3.0q-machine-types.patch b/gnu-efi/patches/gnu-efi-3.0q-machine-types.patch
new file mode 100644 (file)
index 0000000..8c0aa72
--- /dev/null
@@ -0,0 +1,66 @@
+From 9ab3fefd9b86c567ba6b0ea1429ce932572040c1 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Tue, 26 Apr 2011 13:25:26 -0400
+Subject: [PATCH 5/7] Add more machine type defines.
+
+Add machine type defines for i386, arm/thumb, ia64, ebc, and x86_64.
+---
+ inc/ia32/pe.h   |    4 ++++
+ inc/ia64/pe.h   |    4 ++++
+ inc/x86_64/pe.h |    4 ++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/inc/ia32/pe.h b/inc/ia32/pe.h
+index 16e40ef..979b936 100644
+--- a/inc/ia32/pe.h
++++ b/inc/ia32/pe.h
+@@ -98,8 +98,12 @@ typedef struct _IMAGE_FILE_HEADER {
+ #define IMAGE_FILE_MACHINE_R3000             0x162   // MIPS little-endian, 0540 big-endian
+ #define IMAGE_FILE_MACHINE_R4000             0x166   // MIPS little-endian
+ #define IMAGE_FILE_MACHINE_ALPHA             0x184   // Alpha_AXP
++#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED    0x1c2   // Arm/Thumb
+ #define IMAGE_FILE_MACHINE_POWERPC           0x1F0   // IBM PowerPC Little-Endian
++#define IMAGE_FILE_MACHINE_IA64              0x200   // IA-64
+ #define IMAGE_FILE_MACHINE_TAHOE             0x7cc   // Intel EM machine
++#define IMAGE_FILE_MACHINE_EBC               0xebc   // EFI Byte Code
++#define IMAGE_FILE_MACHINE_X64               0x8664  // x86_64
+ //
+ // Directory format.
+ //
+diff --git a/inc/ia64/pe.h b/inc/ia64/pe.h
+index f67128d..b1cade2 100644
+--- a/inc/ia64/pe.h
++++ b/inc/ia64/pe.h
+@@ -113,8 +113,12 @@ typedef struct _IMAGE_FILE_HEADER {
+ #define IMAGE_FILE_MACHINE_R3000             0x162   // MIPS little-endian, 0540 big-endian
+ #define IMAGE_FILE_MACHINE_R4000             0x166   // MIPS little-endian
+ #define IMAGE_FILE_MACHINE_ALPHA             0x184   // Alpha_AXP
++#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED    0x1c2   // Arm/Thumb
+ #define IMAGE_FILE_MACHINE_POWERPC           0x1F0   // IBM PowerPC Little-Endian
++#define IMAGE_FILE_MACHINE_IA64              0x200   // IA-64
+ #define IMAGE_FILE_MACHINE_TAHOE             0x7cc   // Intel EM machine
++#define IMAGE_FILE_MACHINE_EBC               0xebc   // EFI Byte Code
++#define IMAGE_FILE_MACHINE_X64               0x8664  // x86_64
+ //
+ // Directory format.
+ //
+diff --git a/inc/x86_64/pe.h b/inc/x86_64/pe.h
+index 16e40ef..979b936 100644
+--- a/inc/x86_64/pe.h
++++ b/inc/x86_64/pe.h
+@@ -98,8 +98,12 @@ typedef struct _IMAGE_FILE_HEADER {
+ #define IMAGE_FILE_MACHINE_R3000             0x162   // MIPS little-endian, 0540 big-endian
+ #define IMAGE_FILE_MACHINE_R4000             0x166   // MIPS little-endian
+ #define IMAGE_FILE_MACHINE_ALPHA             0x184   // Alpha_AXP
++#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED    0x1c2   // Arm/Thumb
+ #define IMAGE_FILE_MACHINE_POWERPC           0x1F0   // IBM PowerPC Little-Endian
++#define IMAGE_FILE_MACHINE_IA64              0x200   // IA-64
+ #define IMAGE_FILE_MACHINE_TAHOE             0x7cc   // Intel EM machine
++#define IMAGE_FILE_MACHINE_EBC               0xebc   // EFI Byte Code
++#define IMAGE_FILE_MACHINE_X64               0x8664  // x86_64
+ //
+ // Directory format.
+ //
+-- 
+1.7.10.4
+