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.scm91
1 files changed, 54 insertions, 37 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index b4bf72224a..cc23d77cf8 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -12,7 +12,7 @@
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian <vagrant@debian.org>
-;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
@@ -56,14 +56,15 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module (gnu packages sdl)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages swig)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages xorg)
- #:use-module (gnu packages web)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -113,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)
@@ -492,20 +495,26 @@ tree binary files. These are board description files used by Linux and BSD.")
;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io
(search-patch "u-boot-rockchip-inno-usb.patch"))
+(define %u-boot-sifive-prevent-relocating-initrd-fdt
+ ;; Fix boot in 2021.07 on Hifive unmatched, see
+ ;; https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
+ (search-patch "u-boot-sifive-prevent-reloc-initrd-fdt.patch"))
+
(define u-boot
(package
(name "u-boot")
- (version "2021.04")
+ (version "2021.07")
(source (origin
(patches
- (list %u-boot-rockchip-inno-usb-patch))
+ (list %u-boot-rockchip-inno-usb-patch
+ %u-boot-sifive-prevent-relocating-initrd-fdt))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
"u-boot-" version ".tar.bz2"))
(sha256
(base32
- "06p1vymf0dl6jc2xy5w7p42mpgppa46lmpm2ishmgsycnldqnhqd"))))
+ "0zm7igkdnz0w4ir8rfl2dislfrl0ip104grs5hvd30a5wkm7wari"))))
(native-inputs
`(("bc" ,bc)
("bison" ,bison)
@@ -515,6 +524,7 @@ tree binary files. These are board description files used by Linux and BSD.")
("perl" ,perl)
("python" ,python)
("python-coverage" ,python-coverage)
+ ("python-pycryptodomex" ,python-pycryptodomex)
("python-pytest" ,python-pytest)
("swig" ,swig)))
(build-system gnu-build-system)
@@ -524,21 +534,6 @@ tree binary files. These are board description files used by Linux and BSD.")
also initializes the boards (RAM etc).")
(license license:gpl2+)))
-(define-public u-boot-2021.07
- (package
- (inherit u-boot)
- (version "2021.07-rc4")
- (source (origin
- (patches
- (list %u-boot-rockchip-inno-usb-patch))
- (method url-fetch)
- (uri (string-append
- "https://ftp.denx.de/pub/u-boot/"
- "u-boot-" version ".tar.bz2"))
- (sha256
- (base32
- "0bnsywgy2b0jxim5h9dc807lqk5kq8hvgf4lcsmffnc0hf4isv8p"))))))
-
(define-public u-boot-tools
(package
(inherit u-boot)
@@ -567,9 +562,13 @@ also initializes the boards (RAM etc).")
;; This test would require git.
(("\\./tools/patman/patman") (which "true"))
;; FIXME: test fails, needs further investiation
- (("run_test \"binman\"") ": run_test \"binman\"")
+ (("run_test \"binman\"") "# run_test \"binman\"")
+ ;; FIXME: test_spl fails, needs further investiation
+ (("test_ofplatdata or test_handoff or test_spl")
+ "test_ofplatdata or test_handoff")
;; FIXME: code coverage not working
- (("run_test \"binman code coverage\"") ": run_test \"binman code coverage\"")
+ (("run_test \"binman code coverage\"")
+ "# run_test \"binman code coverage\"")
;; This test would require internet access.
(("\\./tools/buildman/buildman") (which "true")))
(substitute* "test/py/tests/test_sandbox_exit.py"
@@ -715,9 +714,6 @@ board-independent tools.")))
uboot-files)
#t)))))))))
-(define-public u-boot-vexpress
- (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
-
(define-public u-boot-malta
(make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
@@ -807,7 +803,34 @@ it fits within common partitioning schemes.")
(make-u-boot-package "A20-OLinuXino_MICRO" "arm-linux-gnueabihf"))
(define-public u-boot-nintendo-nes-classic-edition
- (make-u-boot-package "Nintendo_NES_Classic_Edition" "arm-linux-gnueabihf"))
+ (let ((base (make-u-boot-package "Nintendo_NES_Classic_Edition"
+ "arm-linux-gnueabihf")))
+ (package
+ (inherit base)
+ ;; Starting with 2019.01, FEL doesn't work anymore on A33.
+ (version "2018.11")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://ftp.denx.de/pub/u-boot/"
+ "u-boot-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0znkwljfwwn4y7j20pzz4ilqw8znphrfxns0x1lwdzh3xbr96z3k"))
+ (patches (search-patches
+ "u-boot-nintendo-nes-serial.patch"))))
+ (description "U-Boot is a bootloader used mostly for ARM boards. It
+also initializes the boards (RAM etc).
+
+This version is for the Nintendo NES Classic Edition. It is assumed that
+you have added a serial port to pins PB0 and PB1 as described on
+@url{https://linux-sunxi.org/Nintendo_NES_Classic_Edition}.
+
+In order to use FEL mode on the device, hold the Reset button on the
+device while it's being turned on (and a while longer).")
+ (native-inputs
+ `(("python" ,python-2)
+ ,@(package-native-inputs base))))))
(define-public u-boot-wandboard
(make-u-boot-package "wandboard" "arm-linux-gnueabihf"))
@@ -873,15 +896,11 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(patches
(search-patches "u-boot-riscv64-fix-extlinux.patch")))))))
-(define-public u-boot-sifive-fu540
- (make-u-boot-package "sifive_fu540" "riscv64-linux-gnu"))
+(define-public u-boot-sifive-unleashed
+ (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
(define-public u-boot-sifive-unmatched
- (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
- (package
- (inherit base)
- (version (package-version u-boot-2021.07))
- (source (package-source u-boot-2021.07)))))
+ (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))
(define-public u-boot-rock64-rk3328
(let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu")))
@@ -925,7 +944,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
`(modify-phases ,phases
- (add-after 'patch-rockpro64-config 'set-environment
+ (add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "BL31"
(search-input-file inputs "/bl31.elf"))))
@@ -939,9 +958,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(define-public u-boot-pinebook-pro-rk3399
(let ((base (make-u-boot-package "pinebook-pro-rk3399" "aarch64-linux-gnu")))
(package
- (inherit base)
- (version (package-version u-boot-2021.07))
- (source (package-source u-boot-2021.07))
+ (inherit base)
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)