diff options
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r-- | gnu/packages/bootloaders.scm | 87 |
1 files changed, 85 insertions, 2 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 520728b52c..156e4c4cdd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -430,6 +430,19 @@ tree binary files. These are board description files used by Linux and BSD.") also initializes the boards (RAM etc).") (license license:gpl2+))) +(define u-boot-2019.10 + (package + (inherit u-boot) + (version "2019.10") + (source (origin + (method url-fetch) + (uri (string-append + "ftp://ftp.denx.de/pub/u-boot/" + "u-boot-" version ".tar.bz2")) + (sha256 + (base32 + "053hcrwwlacqh2niisn0zas95zkbffw5aw5sdhixs8lmfdq60vcd")))))) + (define-public u-boot-tools (package (inherit u-boot) @@ -541,9 +554,9 @@ board-independent tools."))) "_" "-"))) (native-inputs `(,@(if (not (same-arch?)) - `(("cross-gcc" ,(cross-gcc triplet #:xgcc gcc-7)) + `(("cross-gcc" ,(cross-gcc triplet)) ("cross-binutils" ,(cross-binutils triplet))) - `(("gcc-7" ,gcc-7))) + `()) ,@(package-native-inputs u-boot))) (arguments `(#:modules ((ice-9 ftw) @@ -746,6 +759,76 @@ to Novena upstream, does not load u-boot.img from the first partition.") ("firmware-m0" ,rk3399-cortex-m0) ,@(package-native-inputs base)))))) +(define-public u-boot-rock64-rk3328 + (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu"))) + (package + (inherit base) + (version (package-version u-boot-2019.10)) + (source (package-source u-boot-2019.10)) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(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)) + (add-after 'unpack 'add-u-boot-itb + (lambda _ + (substitute* "Kconfig" + (("default .u-boot.itb. if SPL_LOAD_FIT && .ROCKCHIP_RK3399") + "default \"u-boot.itb\" if SPL_LOAD_FIT && (ARCH_ROCKCHIP")) + #t)))))) + (native-inputs + `(("firmware" ,arm-trusted-firmware-rk3328) + ,@(package-native-inputs base)))))) + +(define-public u-boot-firefly-rk3399 + (let ((base (make-u-boot-package "firefly-rk3399" "aarch64-linux-gnu"))) + (package + (inherit base) + (version (package-version u-boot-2019.10)) + (source (package-source u-boot-2019.10)) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(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)) + ;; Phases do not succeed on the bl31 ELF. + (delete 'strip) + (delete 'validate-runpath))))) + (native-inputs + `(("firmware" ,arm-trusted-firmware-rk3399) + ,@(package-native-inputs base)))))) + +(define-public u-boot-rockpro64-rk3399 + (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"))) + (package + (inherit base) + (version (package-version u-boot-2019.10)) + (source (package-source u-boot-2019.10)) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(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)) + ;; Phases do not succeed on the bl31 ELF. + (delete 'strip) + (delete 'validate-runpath))))) + (native-inputs + `(("firmware" ,arm-trusted-firmware-rk3399) + ,@(package-native-inputs base)))))) + (define-public vboot-utils (package (name "vboot-utils") |