refind: update to 0.14.2.

This commit is contained in:
Đoàn Trần Công Danh 2025-06-03 22:29:09 +07:00
parent 3dd0e99f86
commit d3b490afc5
4 changed files with 31 additions and 44 deletions

View file

@ -1,6 +1,6 @@
--- a/Make.common --- a/Make.common
+++ b/Make.common +++ b/Make.common
@@ -40,21 +40,13 @@ @@ -53,21 +53,13 @@ REFIND_SBAT_CSV = refind-sbat.csv
# Note: TIANOBASE is defined in master Makefile and exported # Note: TIANOBASE is defined in master Makefile and exported
GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
prefix = /usr/bin/ prefix = /usr/bin/
@ -29,16 +29,3 @@
ifeq ($(MAKEWITH),TIANO) ifeq ($(MAKEWITH),TIANO)
# Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47) # 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

@ -6,7 +6,7 @@
# #
# Copyright (c) 2006 Christoph Pfisterer # Copyright (c) 2006 Christoph Pfisterer
@@ -201,7 +201,7 @@ @@ -201,7 +201,7 @@ static fsw_status_t fsw_strcoerce_%(enc1
# write output file # write output file
@ -27,7 +27,7 @@
def enc_backbuffer(backbuffer): def enc_backbuffer(backbuffer):
compdata = [] compdata = []
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@ for filename in sys.argv[1:]:
mode = origimage.mode mode = origimage.mode
data = origimage.getdata() data = origimage.getdata()
@ -36,7 +36,7 @@
basename = filename[:-4] basename = filename[:-4]
identname = basename.replace("-", "_") identname = basename.replace("-", "_")
@@ -70,31 +70,31 @@ @@ -70,31 +70,31 @@ for filename in sys.argv[1:]:
planes[2].append(pixeldata[0]) planes[2].append(pixeldata[0])
if planes[0] == planes[1] and planes[0] == planes[2]: if planes[0] == planes[1] and planes[0] == planes[2]:
@ -73,7 +73,7 @@
output = """static UINT8 image_%s_compdata[] = { output = """static UINT8 image_%s_compdata[] = {
""" % identname """ % identname
@@ -107,8 +107,8 @@ @@ -107,8 +107,8 @@ for filename in sys.argv[1:]:
static BUILTIN_IMAGE image_%s = { NULL, %d, %d, %d, %d, image_%s_compdata, %d }; static BUILTIN_IMAGE image_%s = { NULL, %d, %d, %d, %d, image_%s_compdata, %d };
""" % (identname, width, height, imgmode, planecount, identname, len(compdata)) """ % (identname, width, height, imgmode, planecount, identname, len(compdata))
@ -97,7 +97,7 @@
def enc_backbuffer(backbuffer): def enc_backbuffer(backbuffer):
"""Helper function for RLE compression, encodes a string of uncompressable data.""" """Helper function for RLE compression, encodes a string of uncompressable data."""
@@ -51,7 +52,7 @@ @@ -51,7 +52,7 @@ def encode_plane(rawdata, identname, pla
rawlen = len(rawdata) rawlen = len(rawdata)
compdata = compress_rle(rawdata) compdata = compress_rle(rawdata)
complen = len(compdata) complen = len(compdata)
@ -106,7 +106,7 @@
output = """static const UINT8 eei_%s_planedata_%s[%d] = { output = """static const UINT8 eei_%s_planedata_%s[%d] = {
""" % (identname, planename, complen) """ % (identname, planename, complen)
@@ -67,7 +68,7 @@ @@ -67,7 +68,7 @@ def encode_plane(rawdata, identname, pla
### main loop ### main loop
@ -115,7 +115,7 @@
planenames = ( "blue", "green", "red", "alpha", "grey" ) planenames = ( "blue", "green", "red", "alpha", "grey" )
@@ -79,7 +80,7 @@ @@ -79,7 +80,7 @@ for filename in sys.argv[1:]:
mode = origimage.mode mode = origimage.mode
data = origimage.getdata() data = origimage.getdata()
@ -124,7 +124,7 @@
basename = filename[:-4] # TODO!!!!!! basename = filename[:-4] # TODO!!!!!!
identname = basename.replace("-", "_") identname = basename.replace("-", "_")
@@ -109,16 +110,16 @@ @@ -109,16 +110,16 @@ for filename in sys.argv[1:]:
planes[2].append(pixeldata) planes[2].append(pixeldata)
else: else:
@ -144,7 +144,7 @@
# invert greyscale values for use as alpha # invert greyscale values for use as alpha
planes[3] = map(lambda x: 255-x, planes[0]) planes[3] = map(lambda x: 255-x, planes[0])
planes[0] = [] planes[0] = []
@@ -131,30 +132,30 @@ @@ -131,30 +132,30 @@ for filename in sys.argv[1:]:
planeinfo = [ "NULL, 0", "NULL, 0", "NULL, 0", "NULL, 0" ] planeinfo = [ "NULL, 0", "NULL, 0", "NULL, 0", "NULL, 0" ]
if len(planes[0]) > 0 and planes[0] == planes[1] and planes[0] == planes[2]: if len(planes[0]) > 0 and planes[0] == planes[1] and planes[0] == planes[2]:
@ -180,7 +180,7 @@
planeinfo[2] = planeinfo[1] planeinfo[2] = planeinfo[1]
else: else:
(output_part, planeinfo[2]) = encode_plane(planes[2], identname, planenames[2]) (output_part, planeinfo[2]) = encode_plane(planes[2], identname, planenames[2])
@@ -162,7 +163,7 @@ @@ -162,7 +163,7 @@ for filename in sys.argv[1:]:
if len(planes[3]) > 0: if len(planes[3]) > 0:
if reduce(lambda x,y: x+y, planes[3]) == 0: if reduce(lambda x,y: x+y, planes[3]) == 0:
@ -189,7 +189,7 @@
else: else:
(output_part, planeinfo[3]) = encode_plane(planes[3], identname, planenames[3]) (output_part, planeinfo[3]) = encode_plane(planes[3], identname, planenames[3])
output = output + output_part output = output + output_part
@@ -172,8 +173,8 @@ @@ -172,8 +173,8 @@ for filename in sys.argv[1:]:
output = output + " { %s },\n" % planeinfo[i] output = output + " { %s },\n" % planeinfo[i]
output = output + "} };\n" output = output + "} };\n"
@ -213,7 +213,7 @@
def enc_backbuffer(backbuffer): def enc_backbuffer(backbuffer):
"""Helper function for RLE compression, encodes a string of uncompressable data.""" """Helper function for RLE compression, encodes a string of uncompressable data."""
@@ -51,14 +52,14 @@ @@ -51,14 +52,14 @@ def encode_plane(rawdata, planename):
rawlen = len(rawdata) rawlen = len(rawdata)
compdata = compress_rle(rawdata) compdata = compress_rle(rawdata)
complen = len(compdata) complen = len(compdata)
@ -230,7 +230,7 @@
planenames = ( "blue", "green", "red", "alpha", "grey" ) planenames = ( "blue", "green", "red", "alpha", "grey" )
@@ -70,7 +71,7 @@ @@ -70,7 +71,7 @@ for filename in sys.argv[1:]:
mode = origimage.mode mode = origimage.mode
data = origimage.getdata() data = origimage.getdata()
@ -239,7 +239,7 @@
(basename, extension) = os.path.splitext(filename) (basename, extension) = os.path.splitext(filename)
identname = basename.replace("-", "_") identname = basename.replace("-", "_")
@@ -102,16 +103,16 @@ @@ -102,16 +103,16 @@ for filename in sys.argv[1:]:
planes[2].append(pixeldata) planes[2].append(pixeldata)
else: else:
@ -259,7 +259,7 @@
# invert greyscale values for use as alpha # invert greyscale values for use as alpha
planes[3] = map(lambda x: 255-x, planes[0]) planes[3] = map(lambda x: 255-x, planes[0])
planes[0] = [] planes[0] = []
@@ -124,12 +125,12 @@ @@ -124,12 +125,12 @@ for filename in sys.argv[1:]:
pixelformat = "EG_EIPIXELMODE" pixelformat = "EG_EIPIXELMODE"
if len(planes[0]) > 0 and planes[0] == planes[1] and planes[0] == planes[2]: if len(planes[0]) > 0 and planes[0] == planes[1] and planes[0] == planes[2]:
@ -274,7 +274,7 @@
imagedata.extend(encode_plane(planes[0], planenames[0])) imagedata.extend(encode_plane(planes[0], planenames[0]))
imagedata.extend(encode_plane(planes[1], planenames[1])) imagedata.extend(encode_plane(planes[1], planenames[1]))
imagedata.extend(encode_plane(planes[2], planenames[2])) imagedata.extend(encode_plane(planes[2], planenames[2]))
@@ -137,7 +138,7 @@ @@ -137,7 +138,7 @@ for filename in sys.argv[1:]:
if len(planes[3]) > 0: if len(planes[3]) > 0:
if reduce(lambda x,y: x+y, planes[3]) == 0: if reduce(lambda x,y: x+y, planes[3]) == 0:
@ -283,7 +283,7 @@
else: else:
imagedata.extend(encode_plane(planes[3], planenames[3])) imagedata.extend(encode_plane(planes[3], planenames[3]))
pixelformat = pixelformat + "_ALPHA" pixelformat = pixelformat + "_ALPHA"
@@ -152,8 +153,8 @@ @@ -152,8 +153,8 @@ for filename in sys.argv[1:]:
output = output + "\n};\n" output = output + "\n};\n"
output = output + "static EG_EMBEDDED_IMAGE egemb_%s = { %d, %d, %s, EG_EICOMPMODE_RLE, egemb_%s_data, %d };\n" % (identname, width, height, pixelformat, identname, len(imagedata)) output = output + "static EG_EMBEDDED_IMAGE egemb_%s = { %d, %d, %s, EG_EICOMPMODE_RLE, egemb_%s_data, %d };\n" % (identname, width, height, pixelformat, identname, len(imagedata))

View file

@ -1,6 +1,6 @@
--- a/refind-install --- a/refind-install
+++ b/refind-install +++ b/refind-install
@@ -344,19 +344,8 @@ DeterminePlatform() { @@ -345,19 +345,8 @@ DeterminePlatform() {
# $ThisDir to point to the directory in which this script resides, # $ThisDir to point to the directory in which this script resides,
# and $RefindDir to point to where the rEFInd binaries live # and $RefindDir to point to where the rEFInd binaries live
CheckForFiles() { CheckForFiles() {
@ -22,7 +22,7 @@
if [[ ! -f "$RefindDir/refind_$Platform.efi" ]] ; then if [[ ! -f "$RefindDir/refind_$Platform.efi" ]] ; then
echo "The rEFInd binary file is missing! Aborting installation!" echo "The rEFInd binary file is missing! Aborting installation!"
@@ -365,8 +354,6 @@ CheckForFiles() { @@ -366,8 +355,6 @@ CheckForFiles() {
if [[ -f "$RefindDir/refind.conf-sample" ]] ; then if [[ -f "$RefindDir/refind.conf-sample" ]] ; then
ConfFile="$RefindDir/refind.conf-sample" ConfFile="$RefindDir/refind.conf-sample"
@ -31,7 +31,7 @@
else else
echo "The sample configuration file is missing! Aborting installation!" echo "The sample configuration file is missing! Aborting installation!"
exit 1 exit 1
@@ -374,8 +361,6 @@ CheckForFiles() { @@ -375,8 +362,6 @@ CheckForFiles() {
if [[ -d "$RefindDir/icons" ]] ; then if [[ -d "$RefindDir/icons" ]] ; then
IconsDir="$RefindDir/icons" IconsDir="$RefindDir/icons"
@ -40,7 +40,7 @@
else else
echo "The icons directory is missing! Aborting installation!" echo "The icons directory is missing! Aborting installation!"
exit 1 exit 1
@@ -613,7 +598,6 @@ SetBootFS() { @@ -614,7 +599,6 @@ SetBootFS() {
CopyDrivers() { CopyDrivers() {
if [[ $InstallDrivers == "all" ]] ; then if [[ $InstallDrivers == "all" ]] ; then
mkdir -p "$InstallDir/$TargetDir/drivers_$1" mkdir -p "$InstallDir/$TargetDir/drivers_$1"
@ -48,7 +48,7 @@
cp "$RefindDir"/drivers_"$1"/*_"$1".efi "$InstallDir/$TargetDir/drivers_$1/" 2> /dev/null cp "$RefindDir"/drivers_"$1"/*_"$1".efi "$InstallDir/$TargetDir/drivers_$1/" 2> /dev/null
elif [[ "$InstallDrivers" == "boot" ]] ; then elif [[ "$InstallDrivers" == "boot" ]] ; then
SetBootFS SetBootFS
@@ -638,7 +622,6 @@ CopyDrivers() { @@ -639,7 +623,6 @@ CopyDrivers() {
if [[ -n $BootFS ]] ; then if [[ -n $BootFS ]] ; then
echo "Installing driver for $BootFS (${DriverType}_$1.efi)" echo "Installing driver for $BootFS (${DriverType}_$1.efi)"
mkdir -p "$InstallDir/$TargetDir/drivers_$1" mkdir -p "$InstallDir/$TargetDir/drivers_$1"
@ -56,7 +56,7 @@
cp "$RefindDir/drivers_$1/${DriverType}_$1.efi" "$InstallDir/$TargetDir/drivers_$1"/ 2> /dev/null cp "$RefindDir/drivers_$1/${DriverType}_$1.efi" "$InstallDir/$TargetDir/drivers_$1"/ 2> /dev/null
fi fi
fi fi
@@ -679,7 +662,6 @@ CopyRefindFiles() { @@ -680,7 +663,6 @@ CopyRefindFiles() {
fi fi
if [[ $InstallDrivers == "all" ]] ; then if [[ $InstallDrivers == "all" ]] ; then
cp -r "$RefindDir"/drivers_* "$InstallDir/$TargetDir/" 2> /dev/null cp -r "$RefindDir"/drivers_* "$InstallDir/$TargetDir/" 2> /dev/null
@ -64,7 +64,7 @@
elif [[ $Upgrade == 1 || $InstallToEspOnMac == 1 ]] ; then elif [[ $Upgrade == 1 || $InstallToEspOnMac == 1 ]] ; then
CopyDrivers "$Platform" CopyDrivers "$Platform"
CopyTools "$Platform" CopyTools "$Platform"
@@ -703,8 +685,8 @@ CopyRefindFiles() { @@ -704,8 +686,8 @@ CopyRefindFiles() {
if [[ $LocalKeys == 0 ]] ; then if [[ $LocalKeys == 0 ]] ; then
echo "Storing copies of rEFInd Secure Boot public keys in $EtcKeysDir" echo "Storing copies of rEFInd Secure Boot public keys in $EtcKeysDir"
mkdir -p "$EtcKeysDir" mkdir -p "$EtcKeysDir"
@ -75,7 +75,7 @@
fi fi
fi fi
if [[ "$TargetDir" == '/System/Library/CoreServices' ]] ; then if [[ "$TargetDir" == '/System/Library/CoreServices' ]] ; then
@@ -741,7 +723,7 @@ CopyRefindFiles() { @@ -742,7 +724,7 @@ CopyRefindFiles() {
Problems=1 Problems=1
fi fi
mkdir -p "$InstallDir/$TargetDir/keys" mkdir -p "$InstallDir/$TargetDir/keys"
@ -84,7 +84,7 @@
cp -rf "$EtcKeysDir"/*.[cd]er "$InstallDir/$TargetDir/keys/" 2> /dev/null cp -rf "$EtcKeysDir"/*.[cd]er "$InstallDir/$TargetDir/keys/" 2> /dev/null
if [[ -f "$InstallDir/$TargetDir/refind.conf" ]] ; then if [[ -f "$InstallDir/$TargetDir/refind.conf" ]] ; then
echo "Existing refind.conf file found; copying sample file as refind.conf-sample" echo "Existing refind.conf file found; copying sample file as refind.conf-sample"
@@ -1149,14 +1131,12 @@ ReSignBinaries() { @@ -1152,14 +1134,12 @@ ReSignBinaries() {
GenerateKeys GenerateKeys
mkdir -p "$TempDir/drivers_$Platform" mkdir -p "$TempDir/drivers_$Platform"
cp "$RefindDir"/refind.conf-sample "$TempDir" 2> /dev/null cp "$RefindDir"/refind.conf-sample "$TempDir" 2> /dev/null
@ -100,7 +100,7 @@
[[ -e "$Driver" ]] || break # handle the case of no files [[ -e "$Driver" ]] || break # handle the case of no files
TempName=$(basename "$Driver") TempName=$(basename "$Driver")
SignOneBinary "$Driver" "$TempDir/drivers_$Platform/$TempName" SignOneBinary "$Driver" "$TempDir/drivers_$Platform/$TempName"
@@ -1416,7 +1396,7 @@ InstallSBKey() { @@ -1419,7 +1399,7 @@ InstallSBKey() {
if [ "$LocalKeys" == "1" ] ; then if [ "$LocalKeys" == "1" ] ; then
UsedDerKey="$DerKey" UsedDerKey="$DerKey"
else else

View file

@ -1,7 +1,7 @@
# Template file for 'refind' # Template file for 'refind'
pkgname=refind pkgname=refind
version=0.14.0.2 version=0.14.2
revision=4 revision=1
archs="x86_64* i686* aarch64*" archs="x86_64* i686* aarch64*"
makedepends="gnu-efi-libs" makedepends="gnu-efi-libs"
depends="bash dosfstools efibootmgr" depends="bash dosfstools efibootmgr"
@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-3.0-only, BSD-3-Clause, BSD-2-Clause, GPL-2.0-only, LGPL-2.1-only" license="GPL-3.0-only, BSD-3-Clause, BSD-2-Clause, GPL-2.0-only, LGPL-2.1-only"
homepage="https://sourceforge.net/projects/refind/" homepage="https://sourceforge.net/projects/refind/"
distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz" distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz"
checksum=26a0c55dfd3565499e1f82d8fe57464dbef19ca886ce6d01a815228b8efc8b0f checksum=f7d93ce80da76b86c567281ea225b6a87907ce86ff77233c9357a522c115c8f0
conf_files="/etc/default/refind-kernel-hook.conf" conf_files="/etc/default/refind-kernel-hook.conf"
make_dirs="/etc/refind.d/keys 0755 root root" make_dirs="/etc/refind.d/keys 0755 root root"