Upgraded efibootmgr from 17 to 18

This commit is contained in:
dslm4515
2023-03-27 18:24:30 -05:00
parent 94b95cc12c
commit 1b2161b7ae
2 changed files with 37 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#! /bin/bash
# efibootmngr
# Source: https://github.com/rhboot/efibootmgr/archive/17.tar.gz
# Source: https://github.com/rhboot/efibootmgr/archive/18/efibootmgr-18.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
@ -12,7 +12,9 @@
# Optional: NONE
# fix an outdated hotfix declaration causing compilation failure
sed -e '/extern int efi_set_verbose/d' -i src/efibootmgr.c
#sed -e '/extern int efi_set_verbose/d' -i src/efibootmgr.c
patch -Np1 -i ../patches/efibootmgr-chimera/build.patch
case $(uname -m) in
x86_64) export EFI_LOADER="grubx64.efi" ;;
@ -21,7 +23,8 @@ case $(uname -m) in
arm*) export EFI_LOADER="grubarm.efi" ;;
esac
read -p "Compile?" && make -j2 EXTRA_CFLAGS="$CFLAGS" EFIDIR="MLFS" EFI_LOADER="${EFI_LOADER}" &&
read -p "Compile?" && \
PCDIR=/usr/lib/pkgconfig make -j2 EXTRA_CFLAGS="$CFLAGS" EFIDIR="MLFS" EFI_LOADER="${EFI_LOADER}" &&
sudo -S make DESTDIR=$BUILD EXTRA_CFLAGS="$CFLAGS" EFIDIR="MLFS" EFI_LOADER="${EFI_LOADER}" install &&
sudo -S mkdir -pv /BMAN/install

View File

@ -0,0 +1,31 @@
--- a/src/efibootdump.c
+++ b/src/efibootdump.c
@@ -68,7 +68,7 @@ print_boot_entry(efi_load_option *loadopt, size_t data_size)
text_path = alloca(text_path_len);
if (!text_path)
error(100, "Couldn't allocate memory");
- rc = efidp_format_device_path((unsigned char *)text_path,
+ rc = efidp_format_device_path(text_path,
text_path_len, dp, pathlen);
if (rc < 0) {
printf("<bad device path>");
--- a/src/efibootmgr.c
+++ b/src/efibootmgr.c
@@ -972,7 +972,7 @@ show_var_path(efi_load_option *load_option, size_t boot_data_size)
pathlen = efi_loadopt_pathlen(load_option,
boot_data_size);
dp = efi_loadopt_path(load_option, boot_data_size);
- rc = efidp_format_device_path((unsigned char *)text_path,
+ rc = efidp_format_device_path(text_path,
text_path_len, dp, pathlen);
if (rc < 0) {
warning("Could not parse device path");
@@ -987,7 +987,7 @@ show_var_path(efi_load_option *load_option, size_t boot_data_size)
return;
}
- rc = efidp_format_device_path((unsigned char *)text_path,
+ rc = efidp_format_device_path(text_path,
text_path_len, dp, pathlen);
if (rc >= 0) {
printf("\t%s", text_path);