summaryrefslogtreecommitdiff
path: root/gnu/packages/bootloaders.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r--gnu/packages/bootloaders.scm132
1 files changed, 120 insertions, 12 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c4b721c9f5..b0f992654e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -17,11 +17,12 @@
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2022, 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de>
-;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2023-2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2025 Esther Flashner <esther@flashner.co.il>
+;;; Copyright © 2025 André Batista <nandre@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -210,13 +211,13 @@
(substitute* "Makefile.in"
(("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
"grub_cmd_date grub_cmd_sleep"))))
- #$@(if (target-ppc64le?)
- #~((add-before 'check 'skip-tests
- (lambda _
- (substitute* "Makefile.in"
- ((" grub_cmd_date ") " ")
- ((" pseries_test ") " ")))))
- #~())
+ (add-before 'check 'skip-tests
+ (lambda _
+ (substitute* "Makefile.in"
+ ;; The grub_cmd_date sometimes fail (see:
+ ;; <https://savannah.gnu.org/bugs/index.php?67471>).
+ ((" grub_cmd_date ") " ")
+ ((" pseries_test ") " "))))
(add-before 'check 'disable-pixel-perfect-test
(lambda _
;; This test compares many screenshots rendered with an older
@@ -1939,9 +1940,9 @@ order to add a suitable bootloader menu entry.")
;;
;; TODO: Bump this timestamp at each modifications of the package (not only
;; for updates) by running: date +%s.
- (let ((timestamp "1733491642")
- (commit "24db39fb2983ca83ab5c6ee37cb57a4f7f6f94e6")
- (revision "3"))
+ (let ((timestamp "1756877872")
+ (commit "969ce2c559a6841a949a1b73a3967b1889e0c999")
+ (revision "4"))
(package
(name "ipxe")
(version (git-version "1.21.1" revision commit))
@@ -1953,7 +1954,7 @@ order to add a suitable bootloader menu entry.")
(file-name (git-file-name name version))
(sha256
(base32
- "0b2h4bsdgnyjna6piwfqqn985vqfjmbz80jh0n7hrnncp2v53qj6"))))
+ "0ijgc9w0az2zb5w5zlzfxjqizhx8fxc2rgq47wgbpka0ssindlvb"))))
(build-system gnu-build-system)
(arguments
(list
@@ -2031,6 +2032,13 @@ order to add a suitable bootloader menu entry.")
"/share/syslinux \\\n"
all))))))
#~())
+ #$@(if (target-x86-32?)
+ ;; Otherwise (u)int64 assertion failure on this arch.
+ ;; See <https://github.com/ipxe/ipxe/issues/1506>
+ #~((add-after 'enter-source-directory 'fix-x86-align
+ (lambda _
+ (setenv "HOST_EFI_CFLAGS" "-malign-double"))))
+ #~())
(delete 'configure) ; no configure script
(replace 'install
(lambda _
@@ -2154,3 +2162,103 @@ the features of iPXE without the hassle of reflashing.")
"-o" (string-append firmware
"/efi-" name ".rom")))))
'#$roms)))))))))))
+
+(define-public refind
+ (package
+ (name "refind")
+ (version "0.14.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/refind/" version
+ "/refind-src-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1w682p0j59apjcy26xzzhv70fyd8nqjs47i8cz2qcsx71pl3rngp"))
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (delete-file-recursively
+ "refind/tools_x64/gptsync_x64.efi")))))
+ (build-system gnu-build-system)
+ (outputs '("out" "doc"))
+ (native-inputs
+ (list binutils))
+ (inputs
+ (list gnu-efi))
+ (arguments
+ (list #:tests? #f ; no tests
+ #:make-flags
+ #~(list ;; Make build reproducible.
+ ;; Also disables secure boot anti-rollback protection.
+ ;; Otherwise, "objcopy --add-section" would change the
+ ;; timestamp inside the EFI file.
+ "OMIT_SBAT=1"
+ (string-append "AR=" #$(ar-for-target))
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "LD=" #$(ld-for-target))
+ (string-append "EFIINC=" (assoc-ref %build-inputs "gnu-efi")
+ "/include/efi")
+ (string-append "GNUEFILIB=" (assoc-ref %build-inputs "gnu-efi")
+ "/lib")
+ (string-append "EFILIB=" (assoc-ref %build-inputs "gnu-efi")
+ "/lib")
+ (string-append "EFICRT0=" (assoc-ref %build-inputs "gnu-efi")
+ "/lib")
+ (string-append "OBJCOPY=" (assoc-ref %build-inputs "binutils")
+ "/bin/objcopy"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'build 'build-fs
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (apply invoke "make" "fs" make-flags)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out-sbin (string-append #$output "/sbin"))
+ (out-share
+ (string-append #$output "/share/refind-"
+ #$version))
+ (out-share-refind
+ (string-append out-share "/refind")))
+ (mkdir-p out-share)
+ (copy-recursively "banners"
+ (string-append out-share "/banners"))
+ (copy-recursively "fonts"
+ (string-append out-share "/fonts"))
+ (for-each (lambda (name)
+ (copy-recursively name
+ (string-append
+ out-share-refind "/"
+ name)))
+ (find-files "." "^drivers_" #:directories? #t))
+ (copy-recursively "icons"
+ (string-append out-share-refind "/icons"))
+ ;(copy-recursively "keys" "/etc/refind.d")
+ (install-file "mkrlconf" out-sbin)
+ (install-file "mvrefind" out-sbin)
+ (install-file "refind-sb-healthcheck" out-sbin)
+ (install-file "refind-install" out-share)
+ (install-file "refind-mkdefault" out-sbin)
+ (install-file "refind.conf-sample" out-share-refind)
+ (for-each
+ (lambda (name)
+ (install-file name
+ (string-append #$output "/share/man/man8")))
+ (find-files "docs/man" "[.]8$"))
+ (for-each (lambda (f)
+ (install-file f out-share-refind))
+ (find-files "refind" "refind.*\\.efi$")))))
+ (add-after 'install 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out-doc
+ (string-append #$output:doc "/share/doc/refind-"
+ #$version)))
+ (copy-recursively "docs/refind"
+ (string-append out-doc "/refind"))
+ (copy-recursively "docs/Styles"
+ (string-append out-doc "/Styles"))))))))
+ (synopsis "rEFInd boot manager")
+ (description "This package provides a boot manager that is an EFI
+program.")
+ (home-page "https://www.rodsbooks.com/refind/")
+ (license license:gpl3+)))