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.scm122
1 files changed, 111 insertions, 11 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c4b721c9f5..0632f5de65 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -210,13 +210,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 +1939,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 +1953,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
@@ -2154,3 +2154,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+)))