From patchwork Thu Jan 5 17:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45869 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 72CD027BBEB; Thu, 5 Jan 2023 17:17:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 19B2B27BBE9 for ; Thu, 5 Jan 2023 17:17:46 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDTre-00049o-7F; Thu, 05 Jan 2023 12:17:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDTrT-00047r-Bo for guix-patches@gnu.org; Thu, 05 Jan 2023 12:17:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDTrS-0004u0-PZ for guix-patches@gnu.org; Thu, 05 Jan 2023 12:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDTrS-00079d-Fr for guix-patches@gnu.org; Thu, 05 Jan 2023 12:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60577] [PATCH 1/2] gnu: Add raspberrypi-userland. References: <20230105171253.13825-1-maxim.cournoyer@gmail.com> In-Reply-To: <20230105171253.13825-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jan 2023 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60577@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 60577-submit@debbugs.gnu.org id=B60577.167293897127422 (code B ref 60577); Thu, 05 Jan 2023 17:17:02 +0000 Received: (at 60577) by debbugs.gnu.org; 5 Jan 2023 17:16:11 +0000 Received: from localhost ([127.0.0.1]:52761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDTqc-00078D-Vn for submit@debbugs.gnu.org; Thu, 05 Jan 2023 12:16:11 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:43776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDTqa-00077r-JL for 60577@debbugs.gnu.org; Thu, 05 Jan 2023 12:16:09 -0500 Received: by mail-qt1-f176.google.com with SMTP id a16so30420193qtw.10 for <60577@debbugs.gnu.org>; Thu, 05 Jan 2023 09:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l48SpJH+AxyNhggN667lIayUP5yWdhLJEugLrmMUee4=; b=JOSwggRudHzau8tjTj6UkjN0Ms5Fop/TT9inQxRx4gA/l0Lkyx2D6VX6oAcdBdNf/n F4WMm+QU/AXrnS8r8eCR3aoVmTbfUhu9u0ZVUbtDn28w6Af+J/ZIV4RMlKZ5AhZ21FLD dks7Fmlp3BXAoXFfVzxlbDpaFgFrvldJIk8dWLACQWznQwjTOkue4x4u6rFud+PYMum6 UCGj+Y6kUnOA3PHIyXv+4wEP/0pNRcj9e6EQezO1sxuHncmySGpoxA3U8nPQ4LBTy/um VR2NuA2V0FjGuWDzNQ7JMrcCEHMVGZt+8dArnS5UzkkolIIPsb+l3CF8GWyrgkPzsLGm b+uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l48SpJH+AxyNhggN667lIayUP5yWdhLJEugLrmMUee4=; b=7/yRWFqyOv6ZVp49wAN4kMyMwSKv74hn5m0UYa7M9RSmIIu2b5+OZPp4+CEQWhr4oO dmRsey/9N9/HWjmgFsSJIC3W1ZCo5RqL3U8End5JBIZ0J9PsFISyZ/CpjmLjagC5pGDp NTvl7pYN6Nz3npgXUza3xqkLkCWrn8J18WYueM+B0BLimdHo5KE+LvZm48rXbUojXDQd oWl2SdB4Ufl4nDnSYO8bnMKpY7z0hHt4R3NJRwDufx6pkGtAnuXxaRHKxAaN4chXW7KS kw1bMyI6HBSr+lxXIzuo3/ttE7Pe+u828Oly/oiP88LkCqu4gdWAYlPKiRn5oqKxKPaw srkw== X-Gm-Message-State: AFqh2krhsawr1o3YgrCPlZk5Y1bAkiqOMz0j3Gfa6PGoaU9y43jwPzDv ldXKnZ3SYwk202Oc4zS14ZkTj4/LzSjm1ePB X-Google-Smtp-Source: AMrXdXvZ9WsmB98qia0tQTXWWdznu/G0xJ/yH2Fp+mXg3+mGIh2nAGIXJm7onAEYPDDtQo7mb9tkpg== X-Received: by 2002:ac8:5185:0:b0:3a7:e548:5e89 with SMTP id c5-20020ac85185000000b003a7e5485e89mr71096643qtn.49.1672938962833; Thu, 05 Jan 2023 09:16:02 -0800 (PST) Received: from localhost.localdomain (dsl-10-134-143.b2b2c.ca. [72.10.134.143]) by smtp.gmail.com with ESMTPSA id bz8-20020a05622a1e8800b0039cc64bcb53sm22123872qtb.27.2023.01.05.09.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 09:16:02 -0800 (PST) From: Maxim Cournoyer Date: Thu, 5 Jan 2023 12:15:57 -0500 Message-Id: <20230105171558.14088-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/raspberry-pi.scm (raspberrypi-userland): New variable. --- gnu/packages/raspberry-pi.scm | 55 ++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) base-commit: 80902fc210d8dc28e14d63d68f398aef796b5838 diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index c0a2cb5bf2..12625c1cf9 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. ;;; @@ -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")