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.scm50
1 files changed, 24 insertions, 26 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 0108494f59..6d1fec3fcb 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -114,6 +114,8 @@
;; calling the ‘true’ binary instead. Python is only needed during
;; bootstrapping (for genptl.py), not when building from a release.
(list "PYTHON=true")
+ ;; Grub fails to load modules stripped with --strip-unneeded.
+ #:strip-flags '("--strip-debug" "--enable-deterministic-archives")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-stuff
(lambda* (#:key native-inputs inputs #:allow-other-keys)
@@ -140,9 +142,9 @@
;; Give the absolute file name of 'ckbcomp'.
(substitute* "util/grub-kbdcomp.in"
(("^ckbcomp ")
- (string-append (assoc-ref inputs "console-setup")
- "/bin/ckbcomp ")))
- #t))
+ (string-append
+ (search-input-file inputs "/bin/ckbcomp")
+ " ")))))
(add-after 'unpack 'set-freetype-variables
;; These variables need to be set to the native versions
;; of the dependencies because they are used to build
@@ -316,9 +318,8 @@ menu to select one of the installed operating systems.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "grub-core/osdep/unix/platform.c"
(("efibootmgr")
- (string-append (assoc-ref inputs "efibootmgr")
- "/sbin/efibootmgr")))
- #t))
+ (search-input-file inputs
+ "/sbin/efibootmgr")))))
(add-after 'patch-stuff 'use-absolute-mtools-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((mtools (assoc-ref inputs "mtools")))
@@ -353,8 +354,8 @@ menu to select one of the installed operating systems.")
`(modify-phases ,phases
(add-after 'install 'install-non-efi
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((input-dir (string-append (assoc-ref inputs "grub")
- "/lib/grub"))
+ (let ((input-dir (search-input-directory inputs
+ "/lib/grub"))
(output-dir (string-append (assoc-ref outputs "out")
"/lib/grub")))
(for-each
@@ -379,7 +380,10 @@ menu to select one of the installed operating systems.")
(file-name (git-file-name name version))
(sha256
(base32
- "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))))
+ "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))
+ (patches
+ (search-patches "syslinux-gcc10.patch"
+ "syslinux-strip-gnu-property.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("nasm" ,nasm)
@@ -399,6 +403,7 @@ menu to select one of the installed operating systems.")
(string-append "MANDIR=" %output "/share/man")
"PERL=perl"
"bios")
+ #:strip-flags '("--strip-debug" "--enable-deterministic-archives")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-files
@@ -887,9 +892,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -926,10 +930,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (let ((bl31 (string-append (assoc-ref inputs "firmware")
- "/bl31.elf")))
- (setenv "BL31" bl31))
- #t))))))
+ (let ((bl31 (search-input-file inputs "/bl31.elf")))
+ (setenv "BL31" bl31))))))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3328)
,@(package-native-inputs base))))))
@@ -944,9 +946,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -964,9 +964,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -984,9 +983,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))