From patchwork Fri Jan 19 13:54:47 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: 59128 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 5EB2027BBEA; Fri, 19 Jan 2024 13:56:37 +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_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 0261527BBEB for ; Fri, 19 Jan 2024 13:56:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQpLx-0003TN-Fy; Fri, 19 Jan 2024 08:56:15 -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 1rQpLp-0003Rx-BF for guix-patches@gnu.org; Fri, 19 Jan 2024 08:56:07 -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 1rQpLo-0007xi-4r for guix-patches@gnu.org; Fri, 19 Jan 2024 08:56:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQpLp-0001wb-64; Fri, 19 Jan 2024 08:56:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68355] [PATCH v2 8/9] 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: Fri, 19 Jan 2024 13:56: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: othacehe@gnu.org, Jean-Pierre De Jesus DIAZ , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 68355-submit@debbugs.gnu.org id=B68355.17056725417374 (code B ref 68355); Fri, 19 Jan 2024 13:56:05 +0000 Received: (at 68355) by debbugs.gnu.org; 19 Jan 2024 13:55:41 +0000 Received: from localhost ([127.0.0.1]:57883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQpLQ-0001um-Bz for submit@debbugs.gnu.org; Fri, 19 Jan 2024 08:55:41 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:52237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQpLM-0001tw-Jl for 68355@debbugs.gnu.org; Fri, 19 Jan 2024 08:55:37 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e80046264so9286295e9.0 for <68355@debbugs.gnu.org>; Fri, 19 Jan 2024 05:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1705672528; x=1706277328; darn=debbugs.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=P/qlo2+o2jM/QGMY+GTbiW6GlzAqikrS+6dBFpqrRzA=; b=OTsfRFpsI5qfHBvTP/d9nRCHGgJnFE+uONEf3bNMSHJR6TYesZLNF2Nkdd4nWoTEg/ pALpwZ8lD27N34FHmOGPEqWqv0g8ydFJQeeaox6me6S8azuUoCLYLEQmZfX/7APEL33d rR33cQZZvLSX3x+XRiZWM1SC7yhyHZn22GXz2poManSK6TRN+8Nm5uzhWQh4bRjgJ8q8 sqOaWLTIDYOICSelDJenbpC/kpb2sCbFNxMxOr+PR1aU4PdN/KVoCZoE9+H2zfN7zBrS 7YW4vR6vWDHQ/b/qQp0X6nDGpabBmUsLEHLU15r+8EStQzxbEVDoPs8eWLvyQ+F4hjsR QaHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705672528; x=1706277328; 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=P/qlo2+o2jM/QGMY+GTbiW6GlzAqikrS+6dBFpqrRzA=; b=u48GQp5fZCOuQFOgQozV8lZUOqoiiTgyQPKWqjSgC49ValTBtiw80/G4XUToZTknM+ DsQayGLdzc2wgaePJbQp/CXeEdcvrOYtn7gruyDEOi49NaZchtNMS+mutSb0cWImUypv TVmzCseiw61uAgXldG6lOcQS1nAHQ5H2l3lnRQ3BneXVas8PTOWrD2IAuRfizxuHHc9G EcnjgUMkICjfQK5bAkHGd7O0CYXPAJ4WdWX7Amfr9uVUegpEzZGSb+NB+H61d2Y9ccAi eMR6xxNV/dhyYmSk7ta8lubVh2BkTBYzUKpR62BtvwYX9BXzUskrRHASyJQIPrTOUniI 4K1g== X-Gm-Message-State: AOJu0YxDAH1QA3kDYoOHd4bgMGQPL/iGGzDB/9m8BzcHP+5N1pAzxJ+9 Cl5uU7So/KMkhvP52bH92wmf0B+/2th6l4U5ewC2uKf1GQrG9Wt8MP4u7H38vA5hdqMejk+6yv4 KfuM= X-Google-Smtp-Source: AGHT+IF+iTzj6e41c8yssBxnyamoUazHr0aAlS+ruGThcps8vhRx4SgLyzD1FQ3HaoHCWmSiZ096RA== X-Received: by 2002:a05:600c:214e:b0:40e:49e8:4068 with SMTP id v14-20020a05600c214e00b0040e49e84068mr1444709wml.93.1705672528619; Fri, 19 Jan 2024 05:55:28 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s8-20020a05600c45c800b0040e527602c8sm33314846wmo.9.2024.01.19.05.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 05:55:28 -0800 (PST) Date: Fri, 19 Jan 2024 14:54:47 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <4e6b129a26d38305073c392c04707498a2ddfe69.1705672190.git.jean@foundationdevices.com> References: <4e6b129a26d38305073c392c04707498a2ddfe69.1705672190.git.jean@foundationdevices.com> 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: , 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 | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 129dd0dfdd..41fe55eb2e 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1252,6 +1252,50 @@ (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 "Firmware for Allwinner sunxi SoCs (tools)") + (inputs (list firmware))))) + (define-public crust-pinebook (make-crust-package "pinebook"))