SHA256
1
0
forked from pool/efibootmgr
efibootmgr/efibootmgr-0.6.0-derhat.diff
Raymund Will 005b0540c9 - Integrate SLE11 patches. [bnc#830784]
o Print EFI status for failed '--create' as well.  [bnc#811767]
 o Fix '--bootorder' handling.  [bnc#810899]
 o Print EFI status in case of failure.  [bnc#811767]
- Update version number to 0.6.0.
- Stop '--write-signature' overwriting unique signature.
- Fix gcc warnings.

OBS-URL: https://build.opensuse.org/package/show/Base:System/efibootmgr?expand=0&rev=11
2013-12-19 16:49:29 +00:00

72 lines
2.6 KiB
Diff

---
Makefile | 4 ++++
src/efibootmgr/efibootmgr.c | 12 ++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
default: all
+ OS_VENDOR := vendor
+ EFI_LOADER := boot.efi
+
SIGNING_KEY := jordan_hargrave
RELEASE_DATE := "23-Jan-2013"
RELEASE_MAJOR := 0
@@ -10,6 +13,7 @@
RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)
CFLAGS = $(EXTRA_CFLAGS) -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)\" \
+ -DDEFAULT_LOADER=\"\\\\efi\\\\$(OS_VENDOR)\\\\$(EFI_LOADER)\" \
-Wall -g -D_FILE_OFFSET_BITS=64
MODULES := src
--- a/src/efibootmgr/efibootmgr.c
+++ b/src/efibootmgr/efibootmgr.c
@@ -1,5 +1,6 @@
/*
- efibootmgr.c - Manipulates EFI variables as exported in /proc/efi/vars
+ efibootmgr.c - Manipulates EFI variables as exported in
+ /sys/firmware/efi/vars (previously as /proc/efi/vars)
Copyright (C) 2001-2004 Dell, Inc. <Matt_Domsch@dell.com>
@@ -18,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- This must tie the EFI_DEVICE_PATH to /boot/efi/EFI/redhat/grub.efi
+ This must tie the EFI_DEVICE_PATH to /boot/efi/efi/<vendor>/<loader>.efi
The EFI_DEVICE_PATH will look something like:
ACPI device path, length 12 bytes
Hardware Device Path, PCI, length 6 bytes
@@ -55,6 +56,9 @@
#define EFIBOOTMGR_VERSION "unknown (fix Makefile!)"
#endif
+#ifndef DEFAULT_LOADER
+#define DEFAULT_LOADER "\\EFI\\redhat\\grub.efi"
+#endif
typedef struct _var_entry {
struct dirent *name;
@@ -787,7 +791,7 @@ usage()
printf("\t-g | --gpt force disk with invalid PMBR to be treated as GPT\n");
printf("\t-H | --acpi_hid XXXX set the ACPI HID (used with -i)\n");
printf("\t-i | --iface name create a netboot entry for the named interface\n");
- printf("\t-l | --loader name (defaults to \\EFI\\redhat\\grub.efi)\n");
+ printf("\t-l | --loader name (defaults to \""DEFAULT_LOADER"\")\n");
printf("\t-L | --label label Boot manager display label (defaults to \"Linux\")\n");
printf("\t-n | --bootnext XXXX set BootNext to XXXX (hex)\n");
printf("\t-N | --delete-bootnext delete BootNext\n");
@@ -815,7 +819,7 @@ set_default_opts()
opts.active = -1; /* Don't set it */
opts.timeout = -1; /* Don't set it */
opts.edd10_devicenum = 0x80;
- opts.loader = "\\EFI\\redhat\\grub.efi";
+ opts.loader = DEFAULT_LOADER;
opts.label = "Linux";
opts.disk = "/dev/sda";
opts.iface = NULL;