From patchwork Tue Jan 9 23:14:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 58718 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 3BCF027BBEA; Tue, 9 Jan 2024 23:16:36 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 9105F27BBE2 for ; Tue, 9 Jan 2024 23:16:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNLKD-0001xZ-FL; Tue, 09 Jan 2024 18:16:01 -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 1rNLKA-0001vB-ET for guix-patches@gnu.org; Tue, 09 Jan 2024 18:15:58 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNLKA-0001hY-5l for guix-patches@gnu.org; Tue, 09 Jan 2024 18:15:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNLKH-0000NV-6n; Tue, 09 Jan 2024 18:16:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68355] [PATCH 7/8] gnu: Add make-crust-tools. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Tue, 09 Jan 2024 23:16:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68355 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68355@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by submit@debbugs.gnu.org id=B.1704842160959 (code B ref -1); Tue, 09 Jan 2024 23:16:05 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jan 2024 23:16:00 +0000 Received: from localhost ([127.0.0.1]:41284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNLKB-0000E2-8e for submit@debbugs.gnu.org; Tue, 09 Jan 2024 18:16:00 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNLK9-0008U9-8V for submit@debbugs.gnu.org; Tue, 09 Jan 2024 18:15:57 -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 1rNLJw-0001r1-NQ for guix-patches@gnu.org; Tue, 09 Jan 2024 18:15:44 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNLJq-0001T2-Vm for guix-patches@gnu.org; Tue, 09 Jan 2024 18:15:44 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40e5508ecb9so4787125e9.3 for ; Tue, 09 Jan 2024 15:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1704842137; x=1705446937; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ukqLaQYPPu84LtD3Uff5mkJBbJHLIJvKs3+vOWd9GzU=; b=B6YSvLyg9dqijdZ7UVapecYYK3Kq4SVML/E8Y/mE5UMxVy1X1cqa3j5TBoi4DR51lb cHHKuUmn5iiM8m+ma6jGKT+zOGvSdbcHZ9ldCc9AudRDUMvESZJBcVbSv8beLTT3onZf koihpT6g2qSgZQNyiDOvfAENF77UkSE7G4bbub25AL0p6fic1W8iWKN11u5hd06GyeVr sFmNtKaUj8mW93NXSemx8Q9Dk20U26lEvBfJH+eTijl5sM1T/X2dWO/WPVwEYH4XZcUR /kWlJQIdSDym6MQNLyLNvbZz86IJ8FFmPdoYmnNzvmTkUpQLouZ37VhueY3JvOKvk5Jv 5BhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704842137; x=1705446937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ukqLaQYPPu84LtD3Uff5mkJBbJHLIJvKs3+vOWd9GzU=; b=i6i5C8Ef3dIUPjxcuVj6QeCRnSI5SyG3d2pBTWPA/gmVGfv3h8G0QfgOyF2PAXP22H AgRY0AwMRJ98tKf8XsnooQzcYSjVWQtpobQP2OXXZN+h6AGPLcAT8dxnoto5Fg4TLXv6 lygotLrdl7Be693dXIzh+87dLpkVrx+aJNhI/JVXQLWfw//7B1z7wvBe9iuwtv7z955z ioRIUu3v3Cqfnr/U3VgZg5F0AFzAzSXevjv0o56RfGRwFqNM468EFmigBPsc3oQZI4Qf WL3SwwG3CVT8Qlw/fsc7sCgUbux5B5dZFnYRTQXzLgHM7vbcMtftbp2M4CtU/62BvT6A 8hHQ== X-Gm-Message-State: AOJu0YzBvtM3HXRuYga7JVXmtOil/Hpo5qO+7dMFTNu+RWDWQfIlwypt cL1sUmo2T2K30g59xq6JxkGcCOrGN229Z1qNlVoO2wHVuCQvPQ== X-Google-Smtp-Source: AGHT+IEbeoEUJ1o6SwLTTqPrM+G+rv4S0oGHYdFv38R1+3F/AYVF2SOWtgEDZzHaWBFIy+UoDsdIhw== X-Received: by 2002:a7b:c7c5:0:b0:40e:491a:ca78 with SMTP id z5-20020a7bc7c5000000b0040e491aca78mr37495wmk.10.1704842137343; Tue, 09 Jan 2024 15:15:37 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id p16-20020a05600c469000b0040e39cbf2a4sm56833wmo.42.2024.01.09.15.15.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 15:15:37 -0800 (PST) Date: Wed, 10 Jan 2024 00:14:41 +0100 Message-ID: <06c55ad18bd524cb50b250f1c3c4452702480cf4.1704841447.git.jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=jean@foundationdevices.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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/firmware.scm (make-crust-tools): New procedure. Change-Id: Iac05ecf1796e4c10692a423c12423ea9b078d141 --- gnu/packages/firmware.scm | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index e62f29993a..c3deab5224 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1245,6 +1245,48 @@ (define make-crust-package ;; Most files are dual-licensed "BSD-3 OR GPL2", a few are GPL2 only. (license (list license:bsd-3 license:gpl2))))) +(define make-crust-tools + (mlambda (platform firmware) + (package + (inherit firmware) + (name (string-append "crust-" + (string-replace-substring platform "_" "-") + "-tools")) + (arguments + (list #:make-flags + #~(list "V=1" + "LEX=flex" + (string-append "HOSTAR=" #$(ar-for-target)) + (string-append "HOSTCC=" #$(cc-for-target))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'do-not-build-tests + (lambda _ + ;; Attempting to build the tools test binary on a + ;; non-aarch64 architecture fails with: "No cache + ;; cleaning implementation available for this + ;; architecture". Avoid building it (see: + ;; https://github.com/crust-firmware/crust/issues/182). + (substitute* "tools/Makefile" + (("tools-y \\+= test") "")))) + (replace 'configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (copy-file (search-input-file inputs "/libexec/.config") + ".config"))) + (replace 'build + (lambda* (#:key make-flags parallel-build? #:allow-other-keys) + (apply invoke "make" "tools" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags)))) + (replace 'install + (lambda _ + (install-file "build/tools/load" + (string-append #$output "/bin"))))))) + (synopsis "System control processor firmware for Allwinner sunxi boards (tools)") + (inputs (list firmware))))) + (define-public crust-pinebook (make-crust-package "pinebook"))