[PATCH 0/8] Coreboot related patches.

  • Open
  • quality assurance status badge
Details
One participant
  • Denis 'GNUtoo' Carikli
Owner
unassigned
Submitted by
Denis 'GNUtoo' Carikli
Severity
normal
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:09
(address . guix-patches@gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
cover.1700752093.git.GNUtoo@cyberdimension.org
Hi,

This patchset updates some tools that use the Coreboot source, fixes a freedom
bug, code and also add two new tools (bucts and nvramtool).

The freedom bug is the bug #66986[1] ("ifdtool: Firmwares with missing source
code present in source code"). It is fixed because the files mentioned in this
bug report are gone in Coreboot 4.22. I've also done a quick grep for words
like "reverse engineering" and that didn't find any nonfree license.

So upstream probably finished moving the nonfree files in a separate
repositories.


Denis 'GNUtoo' Carikli (8):
gnu: ifdtool: Update to 4.22.
gnu: Add bucts.
gnu: intelmetool: Update to 4.22.
gnu: ifdtool: Update to new style.
gnu: ifdtool: Use cc-for-target.
gnu: intelmetool: Update to new style.
gnu: intelmetool: Use cc-for-target.
gnu: Add nvramtool.

gnu/packages/flashing-tools.scm | 161 +++++++++++++++++++++++---------
1 file changed, 117 insertions(+), 44 deletions(-)


base-commit: 5283d24062be62f59ff9f14fa7095ebcfcb7a9a4
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 1/8] gnu: ifdtool: Update to 4.22.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
c833ca8f38b1309574bded76a5e2bb3f5fd623ad.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (ifdtool): Update to 4.22.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: Ib39395d4516440eae76920c5d58a51817736d385
---
gnu/packages/flashing-tools.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 23d21ca6a9..be9a48898e 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -381,7 +381,7 @@ (define-public heimdall
(define-public ifdtool
(package
(name "ifdtool")
- (version "4.9")
+ (version "4.22")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -390,7 +390,7 @@ (define-public ifdtool
(file-name (git-file-name name version))
(sha256
(base32
- "0jidj29jh6p65d17k304wlzhxvp4p3c2namgcdwg2sxq8jfr0zlm"))))
+ "125qw98f8zfhq0d5rpawxsjghqxwmg6yha1r1dqmwbxd7i12bj8f"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 2/8] gnu: Add bucts.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
e8b2125d9d33943e30f377aae4092ca00968d8f8.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(-)

Toggle diff (89 lines)
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
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 3/8] gnu: intelmetool: Update to 4.22.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
5c19ca2b4e520e2d7e6bf39fbc60f10623c5dcef.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (intelmetool): Use coreboot-version and
coreboot-source.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: If1d78511c6b0752e3938fb274ac754693f76a116
---
gnu/packages/flashing-tools.scm | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 4fe78ce783..1785bee910 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -467,16 +467,8 @@ (define-public ifdtool
(define-public intelmetool
(package
(name "intelmetool")
- (version "4.7")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://review.coreboot.org/p/coreboot")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0nw555i0fm5kljha9h47bk70ykbwv8ddfk6qhz6kfqb79vzhy4h2"))))
+ (version coreboot-version)
+ (source coreboot-source)
(build-system gnu-build-system)
(inputs
(list pciutils zlib))
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 4/8] gnu: ifdtool: Update to new style.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
f62283f1155b423189b1c2b9fb14fb297147966f.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (ifdtool): Update to new style.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: Id29bac48835edb8d24b996d0891e95d23bdeaed8
---
gnu/packages/flashing-tools.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 1785bee910..5be725d4a1 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -446,18 +446,18 @@ (define-public ifdtool
(source coreboot-source)
(build-system gnu-build-system)
(arguments
- `(#:make-flags
- (list "CC=gcc"
- "INSTALL=install"
- (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "util/ifdtool")
- #t))
- (delete 'configure)) ; no configure script
- #:tests? #f)) ; no test suite
+ (list
+ #:make-flags
+ #~(list "CC=gcc"
+ "INSTALL=install"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/ifdtool")))
+ (delete 'configure)) ; no configure script
+ #:tests? #f)) ; no test suite
(home-page "https://github.com/corna/me_cleaner/")
(synopsis "Intel Firmware Descriptor dumper")
(description "This package provides @command{ifdtool}, a program to
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 5/8] gnu: ifdtool: Use cc-for-target.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
3f44d2925e25748a5b553c8b2363c86fcc9801a1.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (ifdtool): Use cc-for-target.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: I50513337dc69f8daad17966af1193da44e7b054e
---
gnu/packages/flashing-tools.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 5be725d4a1..8959ed66ab 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -448,7 +448,7 @@ (define-public ifdtool
(arguments
(list
#:make-flags
- #~(list "CC=gcc"
+ #~(list (string-append "CC=" #$(cc-for-target))
"INSTALL=install"
(string-append "PREFIX=" #$output))
#:phases
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 6/8] gnu: intelmetool: Update to new style.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
1171674c705f1f6500e8961dc4baba25268ffef3.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (intelmetool): Update to new style.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: I2c1996cdb2d41804bad55acef25375062edc11de
---
gnu/packages/flashing-tools.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 8959ed66ab..c93e4616ea 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -473,18 +473,18 @@ (define-public intelmetool
(inputs
(list pciutils zlib))
(arguments
- `(#:make-flags
- (list "CC=gcc"
- "INSTALL=install"
- (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "util/intelmetool")
- #t))
- (delete 'configure)
- (delete 'check))))
+ (list
+ #:make-flags
+ #~(list "CC=gcc"
+ "INSTALL=install"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/intelmetool")))
+ (delete 'configure)
+ (delete 'check))))
(home-page "https://github.com/zamaudio/intelmetool")
(synopsis "Intel Management Engine tools")
(description "This package provides tools for working with Intel
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 7/8] gnu: intelmetool: Use cc-for-target.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
f8d0b975393a14ab601d9bc79c0d579dc91dcb0b.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (intelmetool): Use cc-for-target.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: I9c75eae35f30395528ecec5e44074fcbf04663ac
---
gnu/packages/flashing-tools.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index c93e4616ea..705fd76d6f 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -475,7 +475,7 @@ (define-public intelmetool
(arguments
(list
#:make-flags
- #~(list "CC=gcc"
+ #~(list (string-append "CC=" #$(cc-for-target))
"INSTALL=install"
(string-append "PREFIX=" #$output))
#:phases
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 23 Nov 2023 16:27
[PATCH 8/8] gnu: Add nvramtool.
(address . 67403@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
5a249dd2990f7856d7cc8347a8f0786befda20e7.1700752093.git.GNUtoo@cyberdimension.org
* gnu/packages/flashing-tools.scm (nvramtool): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: I4f1391d51cf861b281abb0cf7d46022b50e70c4e
---
gnu/packages/flashing-tools.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 705fd76d6f..bf6726d40b 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -496,6 +496,34 @@ (define-public intelmetool
;; This is obviously an Intel thing, plus it requires <cpuid.h>.
(supported-systems '("x86_64-linux" "i686-linux"))))
+(define-public nvramtool
+ (package
+ (name "nvramtool")
+ (version coreboot-version)
+ (source coreboot-source)
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "INSTALL=install"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/nvramtool")))
+ (delete 'configure)) ; no configure script
+ #:tests? #f)) ; no test suite
+ (home-page "https://coreboot.org")
+ (synopsis "Tool to read/write Coreboot settings")
+ (description "This package provides @command{nvramtool}. It can list the
+available values for each Coreboot settings, read/write them, and restore
+their default values. It also has lower level features like the ability to
+correct checksum if the settings data were corrupted, or ability to read/write
+individual bits in the CMOS memory holding the settings.")
+ (license license:gpl2)))
+
(define-public me-cleaner
(package
(name "me-cleaner")
--
2.41.0
D
D
Denis 'GNUtoo' Carikli wrote on 22 Mar 01:58 +0100
Re: [PATCH 0/8] Coreboot related patches.
(address . 67403@debbugs.gnu.org)
20240322015809.0e607bc5@primary_laptop
On Thu, 23 Nov 2023 16:09:41 +0100
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
Toggle quote (2 lines)
> This patchset updates some tools that use the Coreboot source, fixes
> a freedom bug, code and also add two new tools (bucts and nvramtool).
[...]
Toggle quote (9 lines)
> Denis 'GNUtoo' Carikli (8):
> gnu: ifdtool: Update to 4.22.
> gnu: Add bucts.
> gnu: intelmetool: Update to 4.22.
> gnu: ifdtool: Update to new style.
> gnu: ifdtool: Use cc-for-target.
> gnu: intelmetool: Update to new style.
> gnu: intelmetool: Use cc-for-target.
> gnu: Add nvramtool.
Ping.

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmX816EACgkQX138wUF3
4mMBcBAAnI6KKm/3JL5D0MlQScXNVgAJC2+HQxMwxeuMgpJu66LZCJ5XrP6KoAIr
TXCcGhLGbeE8J1kn6Dt577hCxHtOQ5/jsBJ6NaTHJcxbnwa9DeNgZWgce5kzyDk6
lWCloJ94plBKXWncKQa2amkzhWIDRDsYVfhdE5QnCl0o7IEBL7/Otv8P4Vn4MZ86
U3F1u9Au2BNE0fy+m2sK5YkP5uTgB6vTis9FWIt78KnpC0E1Qe6UoMxsoxV7dF+H
V2p72WsKQ0NJNJFsUk0dUx9pVsyqc1Z41OcOG8CAFaEFiNVjqrI3+JZzkFNMw4Bb
ySE2qeBKVwdSeoIrEfmBO84hc1z3mMqigXtijMXf/8rQxBZCK22IMgPRv3FVsdTR
b75nbHBo8x9uQlbyO+McFaDtkKEbFYqEaZpLXHgi/SBMgzEqwrQtCaZRpxRhDAXd
VCy2ZXb1tcMLZthhV8d+Rq+HhGCRrNWxumLFJbtmXd5B1EQSIoX/AV/7v6rjmKRY
HYHJORRK/haOPeCaI2zdycM1FjVXy1BXdRRYVjDOS8VmUMn2Oxc+j/5Aba99sqgu
7ImPj9cPq2EcPeMyKHodfmOgJfcA+3aO9SNvkLsdsLbh2l/22X05fB+Nung2FMhJ
/O7aEq+O55JoyyEZQLOnQQ1lqq8v1RtoccTj/vFqZ6qyF77qwGY=
=/lMB
-----END PGP SIGNATURE-----


D
D
Denis 'GNUtoo' Carikli wrote on 19 Sep 18:26 +0200
Review of iftool patches
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 67403@debbugs.gnu.org)
20240919182612.7441a485@primary_laptop
Hi,

I'm unsure if you are a Guix commiter or not but we're looking for a
review of a patchset that includes updating the Coreboot source code
and add more tools like ifdtools.

The patch has been sitting there for about 1 year and as I understand
the title of the patchset "Coreboot related patches" makes people
afraid because most Guix contributors are probably not familiar with
Coreboot and so they just skip this patch.

So if you're interested, the patch is available on
issues.guix.gnu.org[1] or debbugs.gnu.org[2] (Tor is blocked for [1],
probably by the datacenter, so use [2] in that case).

PS: I emailed you because you already did the same thing we're trying
to do: update the Coreboot revision. We also need to do it because
the current source code contains nonfree software, and that nonfree
software is gone in the source code of newer Coreboot versions.

References:
-----------

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmbsUKQACgkQX138wUF3
4mMPgQ/9F5H02bKsusDSsS8Fve3XNme6eUM3msGbf81B06UFsMUgOxOtUetaoWn5
PArv4YXOOsR27U/lVUQ/EO5uFhg5y41+6als3+Q1JjERW0AwJK3fqzW3PUD2yEJI
UtfN75l8JCfsf4bp1WM8OwVctOkUWmG0BsuvKRN9RB9N1CtNM2FZ84mv/KE1kECX
ccwBghcLzyXOZ2qkvqv9/Q0hYWrdRUklwH2G4jBaHLOIRGmCTmQ3a37ZuFn2dqA2
vxMdL09w4i2Oo++irJotZFSi4d9ctsAUmLj2BAjJE8V8/rOQJBCxZhyNB/Zsz1nr
NqlwN/nfnQQlaw92Spmx02DoPFa+DWni3p8/C/H7kzBA7SjDDahiPBG+qm5skUSA
l/Fiq1vVwpO4HUyInU+9WyGgO68nyXWITKxsh1GguLhOywy+ptQF8Dq+a8KUWpN/
h/qpQs455tr0MFBVxtovBpbYxSttR2zV3B3FmkiWiU+qGlF4+yTlY6JJx0FVqFed
6eSgCOtZr9LQiw4u0ISB70j80NfnWZGII1dbrlD7qGpDm0S6MKqY5oOxQ3v/TLsA
GCjBs/CLk4UzRtM6sM58vMIB9zAYvI5nIGzzRArX8kloLS81fsZhsteu020dzDlL
cfOYmn609CKE4vFz1YZDVwjLqVXEfxy4g7EysKrlmC1NkbHJsgg=
=dzv0
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 67403@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 67403
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch