From ba8d1f158c67aab93c4f50daeca920b9580288b6 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 30 Jun 2022 11:16:46 +0200 Subject: [PATCH 4/7] gnu: Provide private implementation with selection of the u-boot package. * gnu/packages/bootloaders.scm: Provide private implementation of make-u-boot-package and make-u-boot-sunxi64-package so that the public API does not change. The private allows to specify the u-boot package. diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index fc8be31f37..cab97852f1 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -684,7 +684,7 @@ (define-public u-boot-tools also initializes the boards (RAM etc). This package provides its board-independent tools."))) -(define-public (make-u-boot-package board triplet) +(define* (make-u-boot-package-priv board triplet #:optional (u-boot u-boot)) "Returns a u-boot package for BOARD cross-compiled for TRIPLET." (let ((same-arch? (lambda () (string=? (%current-system) @@ -767,6 +767,9 @@ (define-public (make-u-boot-package board triplet) uboot-files) #t))))))))) +(define-public (make-u-boot-package board triplet) + (make-u-boot-package-priv board triplet)) + (define-public u-boot-malta (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) @@ -797,8 +800,9 @@ (define-public u-boot-am335x-boneblack (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) -(define-public (make-u-boot-sunxi64-package board triplet) - (let ((base (make-u-boot-package board triplet))) +(define* (make-u-boot-sunxi64-package-priv board triplet #:optional (u-boot +u-boot)) + (let ((base (make-u-boot-package-priv board triplet u-boot))) (package (inherit base) (arguments @@ -821,6 +825,9 @@ (define-public (make-u-boot-sunxi64-package board triplet) `(("firmware" ,arm-trusted-firmware-sun50i-a64) ,@(package-native-inputs base)))))) +(define-public (make-u-boot-sunxi64-package board triplet) + (make-u-boot-sunxi64-package-priv board triplet)) + (define-public u-boot-pine64-plus (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu")) -- 2.36.1