efitools: add patch for latest gnu-efi-libs
This commit is contained in:
parent
bbcf46bf4b
commit
f04bb42102
7 changed files with 54 additions and 11 deletions
11
srcpkgs/efitools/patches/01-gnu-efi-libs-update.patch
Normal file
11
srcpkgs/efitools/patches/01-gnu-efi-libs-update.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/lib/console.c 2019-12-16 21:20:40.007421863 +0700
|
||||
+++ b/lib/console.c 2019-12-16 21:21:44.988540682 +0700
|
||||
@@ -357,7 +357,7 @@
|
||||
{ EFI_SECURITY_VIOLATION, L"Security Violation"},
|
||||
|
||||
// warnings
|
||||
- { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"},
|
||||
+ { EFI_WARN_UNKNOWN_GLYPH, L"Warning Unknown Glyph"},
|
||||
{ EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure"},
|
||||
{ EFI_WARN_WRITE_FAILURE, L"Warning Write Failure"},
|
||||
{ EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small"},
|
37
srcpkgs/efitools/patches/06-makefile-cross-compile.patch
Normal file
37
srcpkgs/efitools/patches/06-makefile-cross-compile.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/Make.rules.orig b/Make.rules
|
||||
index b849cfc4c7..7fdcc6095c 100644
|
||||
--- a/Make.rules.orig
|
||||
+++ b/Make.rules
|
||||
@@ -13,21 +13,25 @@ ARCH3264 =
|
||||
else
|
||||
$(error unknown architecture $(ARCH))
|
||||
endif
|
||||
-INCDIR = -I$(TOPDIR)include/ -I/usr/include/efi -I/usr/include/efi/$(ARCH) -I/usr/include/efi/protocol
|
||||
-EFI_CPPFLAGS = -DCONFIG_$(ARCH)
|
||||
-EFI_CFLAGS = -O2 -g $(ARCH3264) -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check
|
||||
+INCDIR = -I$(TOPDIR)include \
|
||||
+ -I$(XBPS_CROSS_BASE)/usr/include/efi \
|
||||
+ -I$(XBPS_CROSS_BASE)/usr/include/efi/$(ARCH) \
|
||||
+ -I$(XBPS_CROSS_BASE)/usr/include/efi/protocol
|
||||
+
|
||||
+EFI_CPPFLAGS = -DCONFIG_$(ARCH)
|
||||
+EFI_CFLAGS = -O2 -g $(ARCH3264) -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check
|
||||
EFI_LDFLAGS = -nostdlib
|
||||
CRTOBJ = crt0-efi-$(ARCH).o
|
||||
-CRTPATHS = /lib /lib64 /lib/efi /lib64/efi /usr/lib /usr/lib64 /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi
|
||||
-CRTPATH = $(shell for f in $(CRTPATHS); do if [ -e $$f/$(CRTOBJ) ]; then echo $$f; break; fi; done)
|
||||
+CRTPATHS = $(XBPS_CROSS_BASE)/usr/lib
|
||||
+CRTPATH = $(XBPS_CROSS_BASE)/usr/lib
|
||||
CRTOBJS = $(CRTPATH)/$(CRTOBJ)
|
||||
# there's a bug in the gnu tools ... the .reloc section has to be
|
||||
# aligned otherwise the file alignment gets screwed up
|
||||
LDSCRIPT = elf_$(ARCH)_efi.lds
|
||||
-EFI_LDFLAGS += -shared -Bsymbolic $(CRTOBJS) -L $(CRTPATH) -L /usr/lib -L /usr/lib64 -T $(LDSCRIPT)
|
||||
+EFI_LDFLAGS += -shared -Bsymbolic $(CRTOBJS) -L $(CRTPATH)\
|
||||
+ -L $(XBPS_CROSS_BASE)/usr/lib -L $(XBPS_CROSS_BASE)/usr/lib64 -T $(LDSCRIPT)
|
||||
LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
|
||||
FORMAT = --target=efi-app-$(ARCH)
|
||||
-OBJCOPY = objcopy
|
||||
MYGUID = 11111111-2222-3333-4444-123456789abc
|
||||
INSTALL = install
|
||||
BINDIR = $(DESTDIR)/usr/bin
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'efitools'
|
||||
pkgname=efitools
|
||||
version=1.9.2
|
||||
revision=2
|
||||
revision=3
|
||||
archs="x86_64* i686* arm* aarch64*"
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="perl-File-Slurp"
|
||||
|
@ -15,22 +15,17 @@ checksum=0f315b36e7d1ba74bfc97ab9f304f0a3072c47578bbe5e42594acae381f9acfe
|
|||
patch_args="-Nup1"
|
||||
|
||||
post_patch() {
|
||||
[ ! "$CROSS_BUILD" ] && return
|
||||
|
||||
case "${XBPS_TARGET_MACHINE}" in
|
||||
arm*) _ARCH=arm ;;
|
||||
i686*) _ARCH=ia32 ;;
|
||||
*) _ARCH="${XBPS_TARGET_MACHINE%-musl}" ;;
|
||||
esac
|
||||
# 1: correct target arch
|
||||
# 2,3,4: include and lib inside sysroot
|
||||
# 5: use cross-objcopy
|
||||
sed -i -e "/^ARCH[[:space:]]*=/s/=.*/=${_ARCH}/" \
|
||||
-e "s,^\(CRTPATH.*=\).*,\1${XBPS_CROSS_BASE}/usr/lib," \
|
||||
-e "/^INCDIR/s,I\(/usr/include\),I${XBPS_CROSS_BASE}\1,g" \
|
||||
-e "s,-L /usr/lib,-L ${XBPS_CROSS_BASE}/usr/lib,g" \
|
||||
-e "/^OBJCOPY/d" \
|
||||
Make.rules
|
||||
# 2: link to correct .o files
|
||||
# 3: include sysroot's header
|
||||
# 4: link to sysroot library
|
||||
# 5: cross-objcopy
|
||||
vsed -i -e "/^ARCH[[:space:]]*=/s/=.*/=${_ARCH}/" Make.rules
|
||||
}
|
||||
|
||||
efitools-efi_package() {
|
||||
|
|
Loading…
Reference in a new issue