aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/raspberry-pi.scm
diff options
context:
space:
mode:
authorStefan <stefan-guix@vodafonemail.de>2022-12-01 13:36:01 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-12-01 14:31:29 -0500
commit0ea832805290e9ee25d53f14b918dea86e95009a (patch)
tree9880816c4124ef18aa3386d40811ae12dbcf94a8 /gnu/packages/raspberry-pi.scm
parent4e2e4b222f3b77e63602ffd5f1695b440d0faec7 (diff)
downloadguix-0ea832805290e9ee25d53f14b918dea86e95009a.tar
guix-0ea832805290e9ee25d53f14b918dea86e95009a.tar.gz
gnu: raspberry-pi: New make-raspi-bcm28-dtbs procedure.
* gnu/packages/raspberry-pi.scm (make-raspi-bcm28-dtbs): New procedure. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/raspberry-pi.scm')
-rw-r--r--gnu/packages/raspberry-pi.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index d4b183981b..18a041b6af 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -30,6 +30,7 @@
#:use-module (gnu packages file)
#:use-module (gnu packages gcc)
#:use-module (gnu packages linux)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -43,7 +44,8 @@
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
- #:export (raspi-config-file
+ #:export (make-raspi-bcm28-dtbs
+ raspi-config-file
raspi-custom-txt))
(define-public bcm2835
@@ -293,6 +295,27 @@ CONTENT can be a list of strings, which are concatenated with a newline
character. Alternatively CONTENT can be a string with the full file content."
(raspi-config-file "custom.txt" content))
+(define (make-raspi-bcm28-dtbs linux)
+ "Make a package with the device-tree files for Raspberry Pi models from the
+kernel LINUX."
+ (package
+ (inherit linux)
+ (name "raspi-bcm28-dtbs")
+ (source #f)
+ (build-system copy-build-system)
+ (arguments
+ #~(list
+ #:phases #~(modify-phases %standard-phases (delete 'unpack))
+ #:install-plan
+ (list (list (search-input-directory %build-inputs
+ "lib/dtbs/broadcom/")
+ "." #:include-regexp '("/bcm....-rpi.*\\.dtb")))))
+ (inputs (list linux))
+ (synopsis "Device-tree files for a Raspberry Pi")
+ (description
+ (format #f "The device-tree files for Raspberry Pi models from ~a."
+ (package-name linux)))))
+
(define (make-raspi-defconfig arch defconfig sha256-as-base32)
"Make for the architecture ARCH a file-like object from the DEFCONFIG file
with the hash SHA256-AS-BASE32. This object can be used as the #:defconfig