[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#67403] [PATCH 2/8] gnu: Add bucts.
From: |
Denis 'GNUtoo' Carikli |
Subject: |
[bug#67403] [PATCH 2/8] gnu: Add bucts. |
Date: |
Thu, 23 Nov 2023 16:27:38 +0100 |
* 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
- [bug#67403] [PATCH 0/8] Coreboot related patches., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 1/8] gnu: ifdtool: Update to 4.22., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 8/8] gnu: Add nvramtool., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 5/8] gnu: ifdtool: Use cc-for-target., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 2/8] gnu: Add bucts.,
Denis 'GNUtoo' Carikli <=
- [bug#67403] [PATCH 3/8] gnu: intelmetool: Update to 4.22., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 4/8] gnu: ifdtool: Update to new style., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 6/8] gnu: intelmetool: Update to new style., Denis 'GNUtoo' Carikli, 2023/11/23
- [bug#67403] [PATCH 7/8] gnu: intelmetool: Use cc-for-target., Denis 'GNUtoo' Carikli, 2023/11/23