From 5126b01cf0d79664f58f569e566df03d32d69916 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Sat, 24 Feb 2024 01:53:23 +0100 Subject: [PATCH 1/2] refind: add BOOT_PREFIX and LABEL for misc setups fix binutils 2.38+ for aarch64 --- srcpkgs/refind/files/kernel.post-install | 11 +++++++---- srcpkgs/refind/files/refind-kernel-hook.conf | 8 +++++++- ...ompile-support-and-fix-binutils-aarch64.patch} | 15 ++++++++++++++- srcpkgs/refind/template | 3 +-- 4 files changed, 29 insertions(+), 8 deletions(-) rename srcpkgs/refind/patches/{add-cross-compile-support.patch => add-cross-compile-support-and-fix-binutils-aarch64.patch} (75%) diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install index fd18f9c45ffe07..6262cecf5f445e 100755 --- a/srcpkgs/refind/files/kernel.post-install +++ b/srcpkgs/refind/files/kernel.post-install @@ -20,14 +20,17 @@ touch "$REFIND_CONF" tmpfile=$(mktemp /tmp/refind.XXXXXXX) +: ${REFIND_LABEL:="Void Linux"} +: ${REFIND_BOOT_PREFIX:=""} + zversion=$(echo "$VERSION" | sed 's/[.]/[.]/g') zentry=$(cat < Date: Mon, 18 Mar 2024 18:31:10 +0100 Subject: [PATCH 2/2] refind: rename patch --- .../patches/add-cross-compile-support.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 srcpkgs/refind/patches/add-cross-compile-support.patch diff --git a/srcpkgs/refind/patches/add-cross-compile-support.patch b/srcpkgs/refind/patches/add-cross-compile-support.patch new file mode 100644 index 00000000000000..58bf38b85cbd03 --- /dev/null +++ b/srcpkgs/refind/patches/add-cross-compile-support.patch @@ -0,0 +1,44 @@ +--- a/Make.common ++++ b/Make.common +@@ -40,21 +40,13 @@ + # Note: TIANOBASE is defined in master Makefile and exported + GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw + prefix = /usr/bin/ +-ifeq ($(ARCH),aarch64) +- CC = $(prefix)aarch64-linux-gnu-gcc +- AS = $(prefix)aarch64-linux-gnu-as +- LD = $(prefix)aarch64-linux-gnu-ld +- AR = $(prefix)aarch64-linux-gnu-ar +- RANLIB = $(prefix)aarch64-linux-gnu-ranlib +- OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy +-else +- CC = $(prefix)gcc +- AS = $(prefix)as +- LD = $(prefix)ld +- AR = $(prefix)ar +- RANLIB = $(prefix)ranlib +- OBJCOPY = $(prefix)objcopy +-endif ++ ++CC = $(prefix)$(CROSS_COMPILE)gcc ++AS = $(prefix)$(CROSS_COMPILE)as ++LD = $(prefix)$(CROSS_COMPILE)ld ++AR = $(prefix)$(CROSS_COMPILE)ar ++RANLIB = $(prefix)$(CROSS_COMPILE)ranlib ++OBJCOPY = $(prefix)$(CROSS_COMPILE)objcopy + + ifeq ($(MAKEWITH),TIANO) + # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47) +@@ -148,8 +140,10 @@ + + ifeq ($(ARCH), aarch64) + GNUEFI_CFLAGS += -DEFIAARCH64 +- FORMAT = -O binary +- FORMAT_DRIVER = -O binary ++ ifneq ($(OBJCOPY_LT_2_38),) ++ FORMAT = -O binary ++ FORMAT_DRIVER = -O binary ++ endif + SUBSYSTEM_LDFLAG = -defsym=EFI_SUBSYSTEM=0xa + LDFLAGS += --warn-common --no-undefined --fatal-warnings +