From patchwork Thu Nov 23 15:27:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis 'GNUtoo' Carikli X-Patchwork-Id: 56767 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 05E4327BBE9; Thu, 23 Nov 2023 15:29:35 +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.9 required=5.0 tests=BAYES_00,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 32E2C27BBE2 for ; Thu, 23 Nov 2023 15:29:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6BdX-0003Yy-HZ; Thu, 23 Nov 2023 10:29:03 -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 1r6BdT-0003Xd-7n for guix-patches@gnu.org; Thu, 23 Nov 2023 10:28:59 -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 1r6BdS-0007Z2-W5 for guix-patches@gnu.org; Thu, 23 Nov 2023 10:28:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6BdW-0002j5-Rg for guix-patches@gnu.org; Thu, 23 Nov 2023 10:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67403] [PATCH 2/8] gnu: Add bucts. Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Thu, 23 Nov 2023 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67403 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67403@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli , ( , Christopher Baines , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , jgart X-Debbugs-Original-Xcc: ( , Christopher Baines , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , jgart Received: via spool by 67403-submit@debbugs.gnu.org id=B67403.170075330910389 (code B ref 67403); Thu, 23 Nov 2023 15:29:02 +0000 Received: (at 67403) by debbugs.gnu.org; 23 Nov 2023 15:28:29 +0000 Received: from localhost ([127.0.0.1]:34705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6Bcy-0002hV-Ar for submit@debbugs.gnu.org; Thu, 23 Nov 2023 10:28:28 -0500 Received: from cyberdimension.org ([80.67.179.20]:43426 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6Bcs-0002gW-VO for 67403@debbugs.gnu.org; Thu, 23 Nov 2023 10:28:23 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id c074010e; Thu, 23 Nov 2023 15:28:15 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 5e896988; Thu, 23 Nov 2023 15:28:14 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Thu, 23 Nov 2023 16:27:38 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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/flashing-tools.scm (bucts): New variable (ifdtool): Use coreboot-source and coreboot-version. Signed-off-by: Denis 'GNUtoo' Carikli Change-Id: I5964f138c3947298f047afb16dd30b54c396018b --- gnu/packages/flashing-tools.scm | 73 ++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 10 deletions(-) diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index be9a48898e..4fe78ce783 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -378,19 +378,72 @@ (define-public heimdall referred to as the \"Odin 3 protocol\".") (license license:expat))) +(define-public coreboot-version "4.22") + +(define-public coreboot-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/coreboot/coreboot") + (commit coreboot-version))) + (file-name (git-file-name "coreboot" coreboot-version)) + (sha256 + (base32 + "125qw98f8zfhq0d5rpawxsjghqxwmg6yha1r1dqmwbxd7i12bj8f")))) + +(define-public bucts + (package + (name "bucts") + (version coreboot-version) + (source coreboot-source) + (inputs (list pciutils)) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;no tests + #:make-flags #~(list (string-append "CC=" + #$(cc-for-target)) + (string-append "DESTDIR=" + #$output) "INSTALL=install" + "PREFIX=/") + #:phases #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'enter-source + (lambda _ + (chdir "util/bucts"))) + (add-after 'enter-source 'fixup-version + (lambda _ + (substitute* "Makefile" + (("^VERSION:=*") + #$(string-append "VERSION:=" version))))) + ;; no install target + (replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin")) + (doc (string-append #$output "/share/doc/bucts/")) + (licenses (string-append #$output + "/share/licenses/bucts/"))) + (install-file "bucts" bin) + (install-file "readme.md" doc) + (install-file "../../COPYING" licenses))))))) + (home-page "https://coreboot.org") + (synopsis "Tool to manipulate swap boot firmware bootblocks on the Intel + I945 chipsets") + (description + "This package provides @command{bucts}. That command can flip a + bit in the BUC.TS register of the Intel I945 chipsets and show the +register status. When the bit is set, it swaps the bootblock +location. Because the bootblock region is often set read-only by the +default BIOS, this enables to bypass that restriction and is used as +part of a procedure to replace the nonfree BIOS with free software on +various computers (Lenovo X60, X60s, X60T, T60, probably more).") + (license license:gpl2))) + (define-public ifdtool (package (name "ifdtool") - (version "4.22") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/coreboot/coreboot") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "125qw98f8zfhq0d5rpawxsjghqxwmg6yha1r1dqmwbxd7i12bj8f")))) + (version coreboot-version) + (source coreboot-source) (build-system gnu-build-system) (arguments `(#:make-flags