From 1ab92e86599da62d98442ac4461cf602e7c1ef9f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 3 Jan 2023 10:10:30 -0500 Subject: gnu: Add waveshare-dtoverlays. * gnu/packages/raspberry-pi.scm (waveshare-dtoverlays): New variable. Signed-off-by: Maxim Cournoyer --- gnu/packages/raspberry-pi.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'gnu/packages/raspberry-pi.scm') diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index c0a2cb5bf2..8b809c18d3 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Danny Milosavljevic ;;; Copyright © 2021 Stefan -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -455,3 +455,35 @@ (define keep '("." ".." flash a memory card with an operating system image suitable for the Raspberry Pi single board computer.") (license license:asl2.0))) + +(define-public waveshare-dtoverlays + (let ((commit "6ea99d4afb4776fdb008708f3f30df1de6fc24e3") + (revision "0")) + (package + (name "waveshare-dtoverlays") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/swkim01/waveshare-dtoverlays") + (commit commit))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + ;; Delete pre-compiled device tree overlay binary files. + (snippet '(for-each delete-file (find-files "." "\\.dtbo$"))) + (sha256 + (base32 + "1c30wnlinicwlivlri25wns6x8nx7asf5fh2zqxkzr9h1jsxbzwz")))) + (build-system gnu-build-system) + (arguments (list #:tests? #f ;no test suite + #:make-flags #~(list (string-append "PREFIX=" + #$output)) + #:phases #~(modify-phases %standard-phases + (delete 'configure)))) + (native-inputs (list dtc)) + (home-page "https://github.com/swkim01/waveshare-dtoverlays/") + (synopsis "Device tree overlays for WaveShare SpotPear TFT LCDs") + (description "This package contains device tree overlay binaries to +support the WaveShare SpotPear @acronym{TFT, Thin-Film Transistor} +@acronym{LCDs, Liquid Crystal Display} on the Raspberry Pi.") + (license license:gpl3+)))) -- cgit v1.2.3 From 6c11c75702969f810eb216d973912a5cdf286d34 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 5 Jan 2023 00:27:02 -0500 Subject: gnu: Add raspberrypi-userland. * gnu/packages/raspberry-pi.scm (raspberrypi-userland): New variable. --- gnu/packages/raspberry-pi.scm | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'gnu/packages/raspberry-pi.scm') diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index 8b809c18d3..57f9de4c5c 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -37,8 +37,10 @@ (define-module (gnu packages raspberry-pi) #:use-module (gnu packages gcc) #:use-module (gnu packages guile) #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages qt) #:use-module (gnu packages tls) + #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system qt) @@ -375,6 +377,57 @@ (define-public %bcmrpi3-defconfig "arm64" "bcmrpi3_defconfig" "1bfnl4p0ddx3200dg91kmh2pln36w95y05x1asc312kixv0jgd81")) +(define-public raspberrypi-userland + ;; There are no release nor tag; use the latest commit. + (let ((revision "0") + (commit "54fd97ae4066a10b6b02089bc769ceed328737e0")) + (package + (name "raspberrypi-userland") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/raspberrypi/userland") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01853x2kx36vcm1wd0p20v72kw2p4xhnzp36jivh06mhma9b3h2v")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;no test suite + #:configure-flags #~(list (string-append "-DVMCS_INSTALL_PREFIX=" + #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda _ + (substitute* "interface/khronos/ext/egl_khr_image_client.c" + (("/opt/vc/lib/libvcsm.so") + (string-append #$output "/lib/libvcsm.so"))))) + (add-after 'unpack 'disable-hello_pi + (lambda _ + ;; Do not build hello_pi, which installs 32 MiB of binaries + ;; and source files to src/. + (substitute* "host_applications/linux/CMakeLists.txt" + ((".*add_subdirectory\\(apps/hello_pi).*") + "")) + (substitute* "makefiles/cmake/vmcs.cmake" + (("install.*host_applications/linux/apps/hello_pi" all) + (string-append "# " all)) + ((".*DESTINATION \\$\\{VMCS_INSTALL_PREFIX}/src)" all) + (string-append "# " all)))))))) + (native-inputs (list pkg-config)) + (home-page "https://github.com/raspberrypi/userland/") + (supported-systems (list "armhf-linux" "aarch64-linux")) + (synopsis "Raspberry Pi GPU-related libraries") + (description "This package package contains libraries to interface to +EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, VFC and OpenVG. It +also provides the @command{dtmerge}, @command{dtoverlay}, @command{dtparam}, +@command{raspivid} and @command{tvservice} commands, among others.") + (license license:bsd-3)))) + (define-public rpi-imager (package (name "rpi-imager") -- cgit v1.2.3 From 6ba3ed13ef5c0db627a9b19882389c96eb14578e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 5 Jan 2023 00:46:25 -0500 Subject: gnu: Add rpi-fbcp. * gnu/packages/raspberry-pi.scm (rpi-fbcp): New variable. --- gnu/packages/raspberry-pi.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/raspberry-pi.scm') diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index 57f9de4c5c..4c7da7376b 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -428,6 +428,41 @@ (define-public raspberrypi-userland @command{raspivid} and @command{tvservice} commands, among others.") (license license:bsd-3)))) +(define-public rpi-fbcp + ;; There are no release nor tag; use the latest commit. + (let ((revision "0") + (commit "af8d32246c23cb23e4030e6588668a14341f5ddc")) + (package + (name "rpi-fbcp") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tasanakorn/rpi-fbcp") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10wym2jckicxm5iwqgby6gbhkznyi1q8x41v0qahzv71x85xpsl5")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;no test suite + #:phases + #~(modify-phases %standard-phases + (replace 'install + ;; There is no installation target. + (lambda _ + (install-file "fbcp" (string-append #$output "/bin"))))))) + (inputs (list raspberrypi-userland)) + (home-page "https://github.com/tasanakorn/rpi-fbcp") + (synopsis "Mirror primary to secondary frame buffer on Raspberry Pi") + (description "The @command{fbcp} command provided by this package can be +used to copy the primary frame buffer to the secondary frame buffer of a +Raspberry Pi. It can for example mirror the primary HDMI output to a +secondary LCD display connected to the Raspberry Pi board.") + (license license:expat)))) + (define-public rpi-imager (package (name "rpi-imager") -- cgit v1.2.3