[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27705] [PATCH 3/4] gnu: grub-efi: Add grub.
From: |
Marius Bakke |
Subject: |
[bug#27705] [PATCH 3/4] gnu: grub-efi: Add grub. |
Date: |
Mon, 17 Jul 2017 23:26:06 +0200 |
User-agent: |
Notmuch/0.24.2 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) |
Danny Milosavljevic <address@hidden> writes:
> * gnu/packages/bootloaders.scm (grub-efi)[native-inputs]: Add grub.
> [arguments]: Add phase "install-non-efi".
[...]
> + (native-inputs
> + `(("grub" ,grub)
> + ,@(package-native-inputs grub)))
Since we take machine-specific code from it, I think it must be a
regular input.
However...
> (arguments
> `(;; TODO: Tests need a UEFI firmware for qemu. There is one at
> ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg .
> @@ -180,7 +183,15 @@ menu to select one of the installed operating systems.")
> (("\"mcopy\"")
> (string-append "\"" mtools
> "/bin/mcopy\"")))
> - #t))))))))))
> + #t)))
> + (add-after 'install 'install-non-efi
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + ;; grub-mkresuce can use it for making a hybrid image.
> + (copy-recursively (string-append (assoc-ref inputs "grub")
> + "/lib/grub/i386-pc")
> + (string-append (assoc-ref outputs "out")
> + "/lib/grub/i386-pc"))
> + #t)))))))))
I don't think we should do this in 'grub-efi'. Now users can not be
certain whether they have EFI boot or not, since grub will happily "fall
back" to i386-pc if it does not detect a UEFI system. It's a regression
of sorts.
However... The 'grub-hybrid' approach seems okay to me (although
building grub-efi again is unnecessary :)). If it works well, maybe we
could deprecate the other two GRUB packages.
FWIW Gentoo has taken the 'hybrid' approach for many years (building
once for each target platform and consolidating out/lib/grub). But it
would be good to know whether this configuration is supported upstream.
signature.asc
Description: PGP signature