diff options
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r-- | gnu/packages/bootloaders.scm | 93 |
1 files changed, 77 insertions, 16 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 01fd1093ff..38eb1d104f 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, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2019, 2021, 2023 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> @@ -648,7 +648,7 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2022.10") + (version "2023.07.02") (source (origin (patches (list %u-boot-rockchip-inno-usb-patch @@ -656,15 +656,14 @@ tree binary files. These are board description files used by Linux and BSD.") %u-boot-sifive-prevent-relocating-initrd-fdt %u-boot-rk3399-enable-emmc-phy-patch (search-patch "u-boot-fix-build-python-3.10.patch") - (search-patch "u-boot-infodocs-target.patch") - (search-patch "u-boot-patman-guix-integration.patch"))) + (search-patch "u-boot-fix-u-boot-lib-build.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" "u-boot-" version ".tar.bz2")) (sha256 (base32 - "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h")))) + "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb")))) (build-system gnu-build-system) (native-inputs (list bison @@ -676,6 +675,7 @@ tree binary files. These are board description files used by Linux and BSD.") perl pkg-config ;for 'make menuconfig' python + python-pyelftools swig (list util-linux "lib"))) (home-page "https://www.denx.de/wiki/U-Boot/") @@ -726,7 +726,12 @@ Info manual."))) (name "u-boot-tools") (native-inputs (modify-inputs (package-native-inputs u-boot) - (prepend python-coverage python-pycryptodomex python-pytest sdl2))) + (prepend python-coverage + python-filelock + python-pycryptodomex + python-pytest + python-pytest-xdist + sdl2))) (arguments `(#:make-flags '("HOSTCC=gcc") #:test-target "tcheck" @@ -739,7 +744,7 @@ Info manual."))) (("/bin/false") (which "false"))) (substitute* "tools/dtoc/fdt_util.py" (("'cc'") "'gcc'")) - (substitute* "tools/patman/test_util.py" + (substitute* "tools/u_boot_pylib/test_util.py" ;; python3-coverage is simply called coverage in guix. (("python3-coverage") "coverage") @@ -777,7 +782,16 @@ def test_ctrl_c")) ;; See https://bugs.gnu.org/34717 for ;; details. (("CONFIG_FIT_SIGNATURE=y") - "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n") + "CONFIG_FIT_SIGNATURE=n +CONFIG_UT_LIB_ASN1=n +CONFIG_TOOLS_LIBCRYPTO=n") + ;; Catch instances of implied CONFIG_FIG_SIGNATURE + ;; with VPL targets + (("CONFIG_SANDBOX_VPL=y") + "CONFIG_SANDBOX_VPL=y +CONFIG_FIT_SIGNATURE=n +CONFIG_VPL_FIT_SIGNATURE=n +CONFIG_TOOLS_LIBCRYPTO=n") ;; This test requires a sound system, which is un-used ;; in u-boot-tools. (("CONFIG_SOUND=y") "CONFIG_SOUND=n"))) @@ -828,6 +842,26 @@ def test_ctrl_c")) " This package provides board-independent tools " "of U-Boot.")))) +(define-public python-u-boot-pylib + (package + (inherit u-boot) + (name "python-u-boot-pylib") + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "tools/u_boot_pylib"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./u_boot_pylib"))))))) + (synopsis "U-Boot Python library") + (description "This package provides common Python code used by some of the +commands part of the U-Boot project, such as Patman."))) + ;;; This is packaged separately, as it can be used in other contexts than for ;;; U-Boot development. (define-public patman @@ -842,10 +876,13 @@ def test_ctrl_c")) #:tests? #f #:phases #~(modify-phases %standard-phases + ;; Patman fails to run during 'sanity-check phase, as it needs to be + ;; run within a git directory. + (delete 'sanity-check) (add-after 'unpack 'chdir (lambda _ (chdir "tools/patman")))))) - (inputs (list python-pygit2 python-requests)) + (inputs (list python-pygit2 python-requests python-u-boot-pylib)) (synopsis "Patch automation tool") (description "Patman is a patch automation script which: @itemize @@ -997,7 +1034,7 @@ removed so that it fits within common partitioning schemes."))) (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) -(define*-public (make-u-boot-sunxi64-package board triplet +(define*-public (make-u-boot-sunxi64-package board triplet scp-firmware #:key defconfig configs) (let ((base (make-u-boot-package board triplet #:defconfig defconfig #:configs configs))) @@ -1009,20 +1046,27 @@ removed so that it fits within common partitioning schemes."))) #~(modify-phases #$phases (add-after 'unpack 'set-environment (lambda* (#:key native-inputs inputs #:allow-other-keys) + (setenv "SCP" (search-input-file + native-inputs "libexec/scp.bin")) (setenv "BL31" (search-input-file inputs "bl31.bin")))))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (append (force scp-firmware)))) (inputs (modify-inputs (package-inputs base) (append arm-trusted-firmware-sun50i-a64)))))) (define-public u-boot-pine64-plus - (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu")) + (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" + (delay crust-pine64-plus))) (define-public u-boot-pine64-lts - (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu")) + (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu" + (delay crust-pine64-plus))) (define-public u-boot-pinebook (make-u-boot-sunxi64-package - "pinebook" "aarch64-linux-gnu" + "pinebook" "aarch64-linux-gnu" (delay crust-pinebook) ;; Fix regression with LCD video output introduced in 2020.01 ;; https://patchwork.ozlabs.org/patch/1225130/ #:configs '("CONFIG_VIDEO_BPP32=y"))) @@ -1104,7 +1148,7 @@ partition.")) (delete 'strip) (delete 'validate-runpath))))) (inputs - (modify-inputs (package-native-inputs base) + (modify-inputs (package-inputs base) (append arm-trusted-firmware-rk3399)))))) (define-public u-boot-qemu-arm @@ -1170,7 +1214,20 @@ Documentation} for more information (for example by running @samp{info (append sdl2)))))) (define-public u-boot-sifive-unleashed - (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")) + (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + (setenv "OPENSBI" (search-input-file inputs + "fw_dynamic.bin")))))))) + (inputs + (modify-inputs (package-inputs base) + (append opensbi-generic)))))) (define-public u-boot-sifive-unmatched (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))) @@ -1230,7 +1287,11 @@ Documentation} for more information (for example by running @samp{info "CONFIG_SATA_SIL=y" "CONFIG_SCSI=y" "CONFIG_SCSI_AHCI=y" - "CONFIG_DM_SCSI=y")))) + "CONFIG_DM_SCSI=y" + ;; Disable SPL FIT signatures, + ;; due to GPLv2 and Openssl + ;; license incompatibilities + "# CONFIG_SPL_FIT_SIGNATURE is not set")))) (package (inherit base) (arguments |