summaryrefslogtreecommitdiffstats
path: root/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch')
-rw-r--r--meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
new file mode 100644
index 0000000..a1d9831
--- /dev/null
+++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
@@ -0,0 +1,30 @@
1From 6edc3ed5479b575f87eb51e335957b05fdd04fe8 Mon Sep 17 00:00:00 2001
2From: Fedora Ninjas <pjones@fedoraproject.org>
3Date: Wed, 28 Nov 2012 16:49:18 -0500
4Subject: [PATCH 1/5] Work around broken Apple firmware
5
6Alex Murray found that Apple's firmware sets an invalid EFI attribute on
7BootCurrent, which newer versions of the kernel then reject. This patch
8from him simply masks off the extraneous bit.
9---
10 src/lib/efivars_sysfs.c | 4 ++++
11 1 file changed, 4 insertions(+)
12
13diff --git a/src/lib/efivars_sysfs.c b/src/lib/efivars_sysfs.c
14index 182c70f..ea87325 100644
15--- a/src/lib/efivars_sysfs.c
16+++ b/src/lib/efivars_sysfs.c
17@@ -55,6 +55,10 @@ sysfs_read_variable(const char *name, efi_variable_t *var)
18 return EFI_INVALID_PARAMETER;
19 }
20 close(fd);
21+ /* latest apple firmware sets high bit which appears invalid
22+ to the linux kernel if we write it back so lets zero it out
23+ if it is set since it would be invalid to set it anyway */
24+ var->Attributes = var->Attributes & ~(1 << 31);
25 return var->Status;
26 }
27
28--
291.8.0
30