me
/
guix
Archived
1
0
Fork 0

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>
master
Stefan 2022-12-01 13:36:01 -05:00 committed by Maxim Cournoyer
parent 4e2e4b222f
commit 0ea8328052
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 24 additions and 1 deletions

View File

@ -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