From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: 67403@debbugs.gnu.org
Cc: "Denis 'GNUtoo' Carikli" <GNUtoo@cyberdimension.org>
Subject: [bug#67403] [PATCH 2/8] gnu: Add bucts.
Date: Thu, 23 Nov 2023 16:27:38 +0100 [thread overview]
Message-ID: <e8b2125d9d33943e30f377aae4092ca00968d8f8.1700752093.git.GNUtoo@cyberdimension.org> (raw)
In-Reply-To: <cover.1700752093.git.GNUtoo@cyberdimension.org>
* gnu/packages/flashing-tools.scm (bucts): New variable
(ifdtool): Use coreboot-source and coreboot-version.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
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
--
2.41.0
next prev parent reply other threads:[~2023-11-23 15:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 15:09 [bug#67403] [PATCH 0/8] Coreboot related patches Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 1/8] gnu: ifdtool: Update to 4.22 Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` Denis 'GNUtoo' Carikli [this message]
2023-11-23 15:27 ` [bug#67403] [PATCH 3/8] gnu: intelmetool: " Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 4/8] gnu: ifdtool: Update to new style Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 5/8] gnu: ifdtool: Use cc-for-target Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 6/8] gnu: intelmetool: Update to new style Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 7/8] gnu: intelmetool: Use cc-for-target Denis 'GNUtoo' Carikli
2023-11-23 15:27 ` [bug#67403] [PATCH 8/8] gnu: Add nvramtool Denis 'GNUtoo' Carikli
2024-03-22 0:58 ` [bug#67403] [PATCH 0/8] Coreboot related patches Denis 'GNUtoo' Carikli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e8b2125d9d33943e30f377aae4092ca00968d8f8.1700752093.git.GNUtoo@cyberdimension.org \
--to=gnutoo@cyberdimension.org \
--cc=67403@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).