Update to 3.0.1

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2015-03-10 11:31:03 -04:00
parent ac3f311f01
commit c56616968e
7 changed files with 12 additions and 328 deletions

View File

@ -1,121 +0,0 @@
From d5cf0561d87d755e28b03816964c432b5d943554 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 15 May 2014 21:29:25 -0400
Subject: [PATCH 1/5] Make gnuefi/ build and install right.
Right now we wind up trying to build gnuefi/.o from a source file that's
an empty string. This is caused by the macros trying to generate
install rules, but there's no real reason to have all that anyway. So
just have some static install rules that are simpler and don't generate
stuff on the fly.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
gnuefi/Makefile | 34 ++++++++++++----------------------
inc/Makefile | 36 +++++++++++-------------------------
2 files changed, 23 insertions(+), 47 deletions(-)
diff --git a/gnuefi/Makefile b/gnuefi/Makefile
index 4717227..d234ac0 100644
--- a/gnuefi/Makefile
+++ b/gnuefi/Makefile
@@ -52,19 +52,6 @@ reloc_aarch64.o: CFLAGS += -fno-jump-tables
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(%),$(OBJS))
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
--
2.1.0

View File

@ -1,54 +0,0 @@
From 079c0b997c8011657e3baed6658fb77b969675b3 Mon Sep 17 00:00:00 2001
From: Bill Paul <wpaul@windriver.com>
Date: Thu, 20 Nov 2014 14:29:29 -0500
Subject: [PATCH 2/5] Make command lines work with FreeBSD's objcopy version.
FreeBSD's binutils doesn't have "-j <glob>" support, so we need to
include non-globbed versions of .rel/.rela individually.
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-Off-By: Bill Paul <wpaul@windriver.com>
---
Make.defaults | 7 +++++++
Make.rules | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Make.defaults b/Make.defaults
index 807205d..169273d 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -133,8 +133,15 @@ endif
# Generic compilation flags
INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-I$(TOPDIR)/inc/protocol
+
+ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
+CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
+ -ffreestanding -fno-stack-protector
+else
CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
-fno-merge-constants -ffreestanding -fno-stack-protector \
-fno-stack-check
+endif
+
ASFLAGS += $(ARCH3264)
LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings
diff --git a/Make.rules b/Make.rules
index 7113b3e..02c7088 100644
--- a/Make.rules
+++ b/Make.rules
@@ -35,8 +35,9 @@
#
%.efi: %.so
- $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel* \
- -j .rela* -j .reloc $(FORMAT) $*.so $@
+ $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
+ -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \
+ -j .reloc $(FORMAT) $*.so $@
%.so: %.o
$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
--
2.1.0

View File

@ -1,69 +0,0 @@
From ed71ce3a579279c6f60d10c8aecef42292504d5c Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 20 Nov 2014 13:43:18 -0500
Subject: [PATCH 3/5] Add the capsule API
Signed-off-by: Peter Jones <pjones@redhat.com>
---
inc/efiapi.h | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/inc/efiapi.h b/inc/efiapi.h
index 2ab9f1f..a3e3fd9 100644
--- a/inc/efiapi.h
+++ b/inc/efiapi.h
@@ -585,6 +585,42 @@ EFI_STATUS
OUT UINT32 *HighCount
);
+typedef struct {
+ UINT64 Length;
+ union {
+ EFI_PHYSICAL_ADDRESS DataBlock;
+ EFI_PHYSICAL_ADDRESS ContinuationPointer;
+ } Union;
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;
+
+typedef struct {
+ EFI_GUID CapsuleGuid;
+ UINT32 HeaderSize;
+ UINT32 Flags;
+ UINT32 CapsuleImageSize;
+} EFI_CAPSULE_HEADER;
+
+#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
+#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
+#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UPDATE_CAPSULE) (
+ IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
+ IN UINTN CapsuleCount,
+ IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (
+ IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
+ IN UINTN CapsuleCount,
+ OUT UINT64 *MaximumCapsuleSize,
+ OUT EFI_RESET_TYPE *ResetType
+ );
+
//
// Protocol handler functions
//
@@ -720,6 +756,8 @@ typedef struct {
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
EFI_RESET_SYSTEM ResetSystem;
+ EFI_UPDATE_CAPSULE UpdateCapsule;
+ EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
} EFI_RUNTIME_SERVICES;
--
2.1.0

View File

@ -1,41 +0,0 @@
From 99050251a94d1cf2179cc614e9a9b19277afea5f Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 20 Nov 2014 13:43:38 -0500
Subject: [PATCH 4/5] Add the QueryVariableInfo() API.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
inc/efiapi.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/inc/efiapi.h b/inc/efiapi.h
index a3e3fd9..708c67f 100644
--- a/inc/efiapi.h
+++ b/inc/efiapi.h
@@ -621,6 +621,15 @@ EFI_STATUS
OUT EFI_RESET_TYPE *ResetType
);
+typedef
+EFI_STATUS
+(EFIAPI *EFI_QUERY_VARIABLE_INFO) (
+ IN UINT32 Attributes,
+ OUT UINT64 *MaximumVariableStorageSize,
+ OUT UINT64 *RemainingVariableStorageSize,
+ OUT UINT64 *MaximumVariableSize
+ );
+
//
// Protocol handler functions
//
@@ -758,6 +767,7 @@ typedef struct {
EFI_UPDATE_CAPSULE UpdateCapsule;
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
+ EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
} EFI_RUNTIME_SERVICES;
--
2.1.0

View File

@ -1,31 +0,0 @@
From d06cdc04a15ba913d64d04d118486dc02ab8f190 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 20 Nov 2014 13:45:25 -0500
Subject: [PATCH 5/5] Add current OsIndications values.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
inc/efidef.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/inc/efidef.h b/inc/efidef.h
index 666b193..8b70051 100644
--- a/inc/efidef.h
+++ b/inc/efidef.h
@@ -208,4 +208,13 @@ typedef UINT8 ISO_639_2;
#define EFI_SIZE_TO_PAGES(a) \
( ((a) >> EFI_PAGE_SHIFT) + ((a) & EFI_PAGE_MASK ? 1 : 0) )
+#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001
+#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION 0x0000000000000002
+#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
+ 0x0000000000000004
+#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED \
+ 0x0000000000000008
+#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED \
+ 0x0000000000000010
+
#endif
--
2.1.0

View File

@ -1,20 +1,15 @@
Summary: Development Libraries and headers for EFI Summary: Development Libraries and headers for EFI
Name: gnu-efi Name: gnu-efi
Version: 3.0w Version: 3.0.1
Release: 2%{?dist} Release: 1%{?dist}
Epoch: 1
Group: Development/System Group: Development/System
License: BSD License: BSD
URL: ftp://ftp.hpl.hp.com/pub/linux-ia64 URL: ftp://ftp.hpl.hp.com/pub/linux-ia64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86} x86_64 ia64 aarch64 ExclusiveArch: %{ix86} x86_64 ia64 aarch64
BuildRequires: git BuildRequires: git
Source: http://superb-dca2.dl.sourceforge.net/project/gnu-efi/gnu-efi-%{version}.tar.bz2
Source: ftp://ftp.hpl.hp.com/pub/linux-ia64/gnu-efi_%{version}.orig.tar.gz
Patch0001: 0001-Make-gnuefi-build-and-install-right.patch
Patch0002: 0002-Make-command-lines-work-with-FreeBSD-s-objcopy-versi.patch
Patch0003: 0003-Add-the-capsule-API.patch
Patch0004: 0004-Add-the-QueryVariableInfo-API.patch
Patch0005: 0005-Add-current-OsIndications-values.patch
%define debug_package %{nil} %define debug_package %{nil}
@ -47,13 +42,15 @@ Group: Applications/System
This package contains utilties for debugging and developing EFI systems. This package contains utilties for debugging and developing EFI systems.
%prep %prep
%setup -q -n gnu-efi-3.0 %setup -q -n gnu-efi-%{version}
git init git init
git config user.email "pjones@fedoraproject.org" git config user.email "pjones@fedoraproject.org"
git config user.name "Fedora Ninjas" git config user.name "Fedora Ninjas"
git add . git add .
git commit -a -q -m "%{version} baseline." git commit -a -q -m "%{version} baseline."
git am %{patches} </dev/null git am %{patches} </dev/null
git config --unset user.email
git config --unset user.name
%build %build
# Package cannot build with %{?_smp_mflags}. # Package cannot build with %{?_smp_mflags}.
@ -89,6 +86,10 @@ rm -rf %{buildroot}
%attr(0644,root,root) /boot/efi/EFI/%{efidir}/*.efi %attr(0644,root,root) /boot/efi/EFI/%{efidir}/*.efi
%changelog %changelog
* Tue Mar 10 2015 Peter Jones <pjones@redhat.com> - 3.0.1-1
- Update to 3.0.1
- New versioning scheme!
* Thu Nov 20 2014 Peter Jones <pjones@redhat.com> - 3.0w-2 * Thu Nov 20 2014 Peter Jones <pjones@redhat.com> - 3.0w-2
- Use patches upstream is going to take for the build fixes - Use patches upstream is going to take for the build fixes
- Add some new protocol definitons. - Add some new protocol definitons.

View File

@ -1,2 +1 @@
d15d3c700e79a1e2938544d73edc572d gnu-efi_3.0u.orig.tar.gz c4099c443b6b0c2b04dedc33e7814ec0 gnu-efi-3.0.1.tar.bz2
36d1c5e7b6edd4733700aaf749d9b80c gnu-efi_3.0w.orig.tar.gz