>From 263b1dc0de9643094bc41f4be47b4b2317e95d7c Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic
Date: Sun, 18 Feb 2018 17:30:48 +0100
Subject: [FIXME] gnu: grub: Make sure that non-EFI grub doesn't try to use
EFI.
Tags: patch
* gnu/packages/bootloader.scm (grub)[arguments]<:phases>
[patch-/sys/firmware/efi-out]: New phase.
(grub-efi)[arguments]<:phases>[patch-/sys/firmware/efi-out]: Delete phase.
Fixes .
---
gnu/packages/bootloaders.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 59eb22f24..c09829e17 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -103,6 +103,11 @@
(copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz")
(system* "gunzip" "unifont.bdf.gz")
#t))
+ (add-after 'unpack 'patch-/sys/firmware/efi-out
+ (lambda _
+ (substitute* "grub-core/osdep/linux/platform.c"
+ (("/sys/firmware/efi") "/sys/firmware/non-efi"))
+ #t))
(add-before 'check 'disable-flaky-test
(lambda _
;; This test is unreliable. For more information, see:
@@ -177,6 +182,7 @@ menu to select one of the installed operating systems.")
`(cons "--with-platform=efi" ,flags))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'patch-/sys/firmware/efi-out)
(add-after 'patch-stuff 'use-absolute-efibootmgr-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "grub-core/osdep/unix/platform.c"