refind: allow menu-entry customization, fix build for aarch64

Closes: #48906 [via git-merge-pr]
This commit is contained in:
Mateusz Sylwestrzak 2024-02-24 01:53:23 +01:00 committed by Andrew J. Hesford
parent 239ca68dfc
commit 4eb080af9c
4 changed files with 30 additions and 9 deletions

View file

@ -12,7 +12,7 @@ if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
exit 0;
fi
: ${REFIND_CONF:=boot/EFI/refind/refind.conf}
: "${REFIND_CONF:=boot/EFI/refind/refind.conf}"
REFIND_CONF="${REFIND_CONF#/}"
mkdir -p "${REFIND_CONF%/*}"
@ -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 <<EOF
menuentry "Void Linux $VERSION" {
volume "Void Linux"
loader /vmlinuz-$VERSION
initrd /initramfs-$VERSION.img
options "$OPTIONS"
volume "$REFIND_LABEL"
loader "$REFIND_BOOT_PREFIX/vmlinuz-$VERSION"
initrd "$REFIND_BOOT_PREFIX/initramfs-$VERSION.img"
options "$OPTIONS"
}
EOF
)

View file

@ -18,5 +18,11 @@ UPDATE_REFIND_CONF=0
# /efi/EFI/BOOT/refind.conf
REFIND_CONF=/boot/EFI/refind/refind.conf
# addition kernel cmdline
# Set a custom label for Void boot entries
#REFIND_LABEL="Void Linux"
# Prefix for kernel and initramfs paths in Void boot entries
#REFIND_BOOT_PREFIX=""
# Additional kernel cmdline parameters
OPTIONS="quiet loglevel=4"

View file

@ -1,6 +1,6 @@
--- a/Make.common
+++ b/Make.common
@@ -40,21 +40,13 @@ REFIND_SBAT_CSV = refind-sbat.csv
@@ -40,21 +40,13 @@
# Note: TIANOBASE is defined in master Makefile and exported
GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
prefix = /usr/bin/
@ -29,3 +29,16 @@
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

View file

@ -1,7 +1,7 @@
# Template file for 'refind'
pkgname=refind
version=0.14.0.2
revision=2
revision=3
archs="x86_64* i686* aarch64*"
makedepends="gnu-efi-libs"
depends="bash dosfstools efibootmgr"
@ -73,7 +73,6 @@ do_install() {
vinstall gptsync/gptsync_${_EFI_ARCH}.efi 644 \
usr/share/refind/tools_${_EFI_ARCH}/
vinstall "${FILESDIR}/refind-kernel-hook.conf" 644 etc/default
vinstall ${FILESDIR}/kernel.post-install 744 \
etc/kernel.d/post-install 50-refind