package/gnu-efi: change upstream, bump to 4.0.0

https://sourceforge.net/projects/gnu-efi/ is dead and stuck at version
3.0.18. At https://sourceforge.net/p/gnu-efi/feature-requests/11/ the
upstream maintainer has indicated that the project is now maintained
at https://github.com/ncroxon/gnu-efi/, so let's use this as upstream.

We can drop patches 0002 and 0003 since they are upstream. Patch 0001
is just slightly refreshed.

Changes 3.0.18 -> 3.0.19:
  https://github.com/ncroxon/gnu-efi/releases/tag/3.0.19

Changes 3.0.19 -> 4.0.0:
  https://github.com/ncroxon/gnu-efi/releases/tag/4.0.0

The licensing files have changed:

- A LICENSE file has been added, with the text of the GPLv2

- The README.efilib file has been moved, unchanged to
  licenses/LICENSE.efilib

- A new file containing the EDK2 license has been added at
  licenses/LICENSE.edk2. This requires an update in the list of
  licenses

Tested with the following defconfigs:

 ARM defconfig testing gnu-efi + fwupd-efi

 BR2_arm=y
 BR2_cortex_a9=y
 BR2_ARM_ENABLE_VFP=y
 BR2_TOOLCHAIN_EXTERNAL=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y
 BR2_INIT_NONE=y
 BR2_SYSTEM_BIN_SH_NONE=y
 # BR2_PACKAGE_BUSYBOX is not set
 BR2_PACKAGE_FWUPD_EFI=y
 # BR2_TARGET_ROOTFS_TAR is not set

 RISC-V defconfig testing gnu-efi + fwupd-efi

 BR2_riscv=y
 BR2_TOOLCHAIN_EXTERNAL=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_MUSL_STABLE=y
 BR2_INIT_NONE=y
 BR2_SYSTEM_BIN_SH_NONE=y
 # BR2_PACKAGE_BUSYBOX is not set
 BR2_PACKAGE_FWUPD_EFI=y
 # BR2_TARGET_ROOTFS_TAR is not set

 x86-64 defconfig testing gnu-efi + fwupd-efi + systemd-boot

 BR2_x86_64=y
 BR2_x86_corei7=y
 BR2_TOOLCHAIN_EXTERNAL=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE=y
 BR2_INIT_SYSTEMD=y
 BR2_SYSTEM_BIN_SH_NONE=y
 BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
 # BR2_PACKAGE_BUSYBOX is not set
 BR2_PACKAGE_SYSTEMD_BOOT=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_SYSLINUX=y
 BR2_TARGET_SYSLINUX_EFI=y

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Thomas Petazzoni
2025-01-22 23:03:59 +01:00
committed by Julien Olivain
parent 6bd147c35a
commit fb36a4635e
6 changed files with 13 additions and 2282 deletions

View File

@@ -1,4 +1,4 @@
From b2dbeec5063265eb0121342c24a900a4888712a7 Mon Sep 17 00:00:00 2001
From 893a75202407e8ff3d75b217813a5df87da7c807 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 20 Jan 2019 21:07:11 +0100
Subject: [PATCH] Make.defaults: don't override ARCH when cross-compiling
@@ -15,10 +15,10 @@ Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Make.defaults b/Make.defaults
index 47ed361..7420344 100755
index 1347aca..bb21874 100755
--- a/Make.defaults
+++ b/Make.defaults
@@ -67,7 +67,7 @@ ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[345678
@@ -99,7 +99,7 @@ ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[34567
# Get ARCH from the compiler if cross compiling
ifneq ($(CROSS_COMPILE),)
@@ -28,5 +28,5 @@ index 47ed361..7420344 100755
# FreeBSD (and possibly others) reports amd64 instead of x86_64
--
2.36.1
2.47.1

View File

@@ -1,164 +0,0 @@
From f65e5db5666529abb18fe24f5c45331404a1ce99 Mon Sep 17 00:00:00 2001
From: Callum Farmer <gmbr3@opensuse.org>
Date: Wed, 29 May 2024 16:22:50 +0100
Subject: [PATCH] Make CHAR16 use uint16_t
musl-libc doesn't like fshort-wchar so remove wchar_t usage
Use uint16_t as char16_t can be up to 32bits
Fixes ncroxon/gnu-efi#16
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Upstream: https://github.com/ncroxon/gnu-efi/commit/edfda7c396134c7109444b230ce4b0da1e61d524
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Make.defaults | 4 ++--
inc/aarch64/efibind.h | 2 +-
inc/arm/efibind.h | 2 +-
inc/ia32/efibind.h | 2 +-
inc/ia64/efibind.h | 2 +-
inc/loongarch64/efibind.h | 2 +-
inc/mips64el/efibind.h | 2 +-
inc/riscv64/efibind.h | 5 ++---
inc/x86_64/efibind.h | 2 +-
9 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Make.defaults b/Make.defaults
index c9f9b4f..83204a6 100755
--- a/Make.defaults
+++ b/Make.defaults
@@ -187,11 +187,11 @@ endif
ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
- -funsigned-char -fshort-wchar -fno-strict-aliasing \
+ -funsigned-char -fno-strict-aliasing \
-ffreestanding -fno-stack-protector
else
CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
- -funsigned-char -fshort-wchar -fno-strict-aliasing \
+ -funsigned-char -fno-strict-aliasing \
-ffreestanding -fno-stack-protector -fno-stack-check \
$(if $(findstring gcc,$(CC)),-fno-merge-all-constants,)
endif
diff --git a/inc/aarch64/efibind.h b/inc/aarch64/efibind.h
index d6b5d0f..1a1fb79 100644
--- a/inc/aarch64/efibind.h
+++ b/inc/aarch64/efibind.h
@@ -40,7 +40,7 @@ typedef int64_t intptr_t;
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
diff --git a/inc/arm/efibind.h b/inc/arm/efibind.h
index 8c578df..bc43931 100644
--- a/inc/arm/efibind.h
+++ b/inc/arm/efibind.h
@@ -48,7 +48,7 @@ typedef int32_t intptr_t;
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h
index 718e8d1..1b33f2f 100644
--- a/inc/ia32/efibind.h
+++ b/inc/ia32/efibind.h
@@ -87,7 +87,7 @@ Revision History
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h
index 1d2745b..1ad41f8 100644
--- a/inc/ia64/efibind.h
+++ b/inc/ia64/efibind.h
@@ -74,7 +74,7 @@ Revision History
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
diff --git a/inc/loongarch64/efibind.h b/inc/loongarch64/efibind.h
index 8ed83a5..806209d 100644
--- a/inc/loongarch64/efibind.h
+++ b/inc/loongarch64/efibind.h
@@ -44,7 +44,7 @@ typedef int64_t intptr_t;
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
diff --git a/inc/mips64el/efibind.h b/inc/mips64el/efibind.h
index cf77ddc..9b396cc 100644
--- a/inc/mips64el/efibind.h
+++ b/inc/mips64el/efibind.h
@@ -42,7 +42,7 @@ typedef int64_t intptr_t;
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
diff --git a/inc/riscv64/efibind.h b/inc/riscv64/efibind.h
index d8b4f39..b6d418c 100644
--- a/inc/riscv64/efibind.h
+++ b/inc/riscv64/efibind.h
@@ -17,13 +17,12 @@
*/
#include <stdint.h>
+#include <stddef.h>
//
// Basic EFI types of various widths
//
-#include <stddef.h>
-
typedef uint64_t UINT64;
typedef int64_t INT64;
typedef uint32_t UINT32;
@@ -33,7 +32,7 @@ typedef int16_t INT16;
typedef uint8_t UINT8;
typedef int8_t INT8;
typedef char CHAR8;
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
#undef VOID
typedef void VOID;
diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h
index e454ed2..8f431cb 100644
--- a/inc/x86_64/efibind.h
+++ b/inc/x86_64/efibind.h
@@ -98,7 +98,7 @@ Revision History
#include <stddef.h>
-typedef wchar_t CHAR16;
+typedef uint16_t CHAR16;
#define WCHAR CHAR16
typedef uint64_t UINT64;
--
2.47.1

File diff suppressed because it is too large Load Diff

View File

@@ -15,4 +15,4 @@ config BR2_PACKAGE_GNU_EFI
(IPF), IA-32 (x86), and MIPS platforms using the GNU toolchain
and the EFI development environment.
http://gnu-efi.sourceforge.net/
https://github.com/ncroxon/gnu-efi

View File

@@ -1,6 +1,5 @@
# From http://sourceforge.net/projects/gnu-efi/files
md5 0b93ad70dff96991dd87978fc4275bd1 gnu-efi-3.0.18.tar.bz2
sha1 4f12dc4ab3e7940070c87affea17bf8a6209957a gnu-efi-3.0.18.tar.bz2
# Locally computed
sha256 7f212c96ee66547eeefb531267b641e5473d7d8529f0bd8ccdefd33cf7413f5c gnu-efi-3.0.18.tar.bz2
sha256 42d352e9c28dd446fd0209cd6f75588c8e41f0934540bb382bbd61c752360265 README.efilib
sha256 a2e5dfd25e7fc0cd2027d75dc2517b4c74d94f801ff4784eca557ac1b9835899 gnu-efi-4.0.0.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE
sha256 42d352e9c28dd446fd0209cd6f75588c8e41f0934540bb382bbd61c752360265 licenses/LICENSE.efilib
sha256 7aa278b6f1a2125d0a0c596fa537caca5a41e7b03f7d2dd0489905f65ffdb984 licenses/LICENSE.edk2

View File

@@ -4,12 +4,11 @@
#
################################################################################
GNU_EFI_VERSION = 3.0.18
GNU_EFI_SOURCE = gnu-efi-$(GNU_EFI_VERSION).tar.bz2
GNU_EFI_SITE = http://downloads.sourceforge.net/project/gnu-efi
GNU_EFI_VERSION = 4.0.0
GNU_EFI_SITE = $(call github,ncroxon,gnu-efi,$(GNU_EFI_VERSION))
GNU_EFI_INSTALL_STAGING = YES
GNU_EFI_LICENSE = BSD-3-Clause and/or GPL-2.0+ (gnuefi), BSD-3-Clause (efilib)
GNU_EFI_LICENSE_FILES = README.efilib
GNU_EFI_LICENSE = BSD-3-Clause and/or GPL-2.0+ (gnuefi), BSD-3-Clause (efilib), BSD-2-Clause-Patent (EDK2 routines)
GNU_EFI_LICENSE_FILES = LICENSE licenses/LICENSE.edk2 licenses/LICENSE.efilib
# gnu-efi is a set of library and header files used to build
# standalone EFI applications such as bootloaders. There is no point