guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#41560] [PATCH 6/8] image: Use grub-efi to install the EFI bootloade


From: Ludovic Courtès
Subject: [bug#41560] [PATCH 6/8] image: Use grub-efi to install the EFI bootloader.
Date: Thu, 28 May 2020 23:44:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * guix/utils.scm (target-intel?): New exported procedure.
> * gnu/build/image.scm (initialize-efi-partition): Rename bootloader-package
> argument to grub-efi.
> * gnu/system/image.scm (system-disk-image): Adapt accordingly to pass
> grub-efi package. Make sure that grub-efi is not built if we are not targeting
> an Intel system.

[...]

> +++ b/gnu/build/image.scm
> @@ -146,10 +146,10 @@ deduplicates files common to CLOSURE and the rest of 
> PREFIX."
>  
>  (define* (initialize-efi-partition root
>                                     #:key
> -                                   bootloader-package
> +                                   grub-efi
>                                     #:allow-other-keys)
>    "Install in ROOT directory, an EFI loader using BOOTLOADER-PACKAGE."
> -  (install-efi-loader bootloader-package root))
> +  (install-efi-loader grub-efi root))

Does it have to be GRUB?

> +++ b/gnu/system/image.scm
> @@ -235,6 +235,10 @@ used in the image."
>                                #:references-graphs '#$graph
>                                #:deduplicate? #f
>                                #:system-directory #$os
> +                              #:grub-efi #$(let-system (system target)
> +                                             (and (target-intel?
> +                                                   (or target system))
> +                                                  grub-efi))

Some AArch64 systems such as the SoftIron OverDrive 1000 use EFI too.
So I don’t think the above is correct.

> +(define* (target-intel? #:optional (target (or (%current-target-system)
> +                                               (%current-system))))
> +  (any (cut string-prefix? <> target) '("x86_64" "i686")))

Shouldn’t it include i[345]6 as well?

Also, I think no 32-bit Intel systems use EFI.

Actually, why do we need to guess, can’t we just use the bootloader
specified in the <operating-system> record?  (Naïve question, I haven’t
checked…)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]