summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-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