GNU bug report logs - #67403
[PATCH 0/8] Coreboot related patches.

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Thu, 23 Nov 2023 15:11:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 67403 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 23 Nov 2023 15:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 0/8] Coreboot related patches.
Date: Thu, 23 Nov 2023 16:09:41 +0100
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.

[1]https://issues.guix.gnu.org/66986

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 1/8] gnu: ifdtool: Update to 4.22.
Date: Thu, 23 Nov 2023 16:27:37 +0100
* gnu/packages/flashing-tools.scm (ifdtool): Update to 4.22.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [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 <at> 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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:03 GMT) Full text and rfc822 format available.

Message #14 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 3/8] gnu: intelmetool: Update to 4.22.
Date: Thu, 23 Nov 2023 16:27:39 +0100
* gnu/packages/flashing-tools.scm (intelmetool): Use coreboot-version and
  coreboot-source.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:03 GMT) Full text and rfc822 format available.

Message #17 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 4/8] gnu: ifdtool: Update to new style.
Date: Thu, 23 Nov 2023 16:27:40 +0100
* gnu/packages/flashing-tools.scm (ifdtool): Update to new style.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:04 GMT) Full text and rfc822 format available.

Message #20 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 5/8] gnu: ifdtool: Use cc-for-target.
Date: Thu, 23 Nov 2023 16:27:41 +0100
* gnu/packages/flashing-tools.scm (ifdtool): Use cc-for-target.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:04 GMT) Full text and rfc822 format available.

Message #23 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 6/8] gnu: intelmetool: Update to new style.
Date: Thu, 23 Nov 2023 16:27:42 +0100
* gnu/packages/flashing-tools.scm (intelmetool): Update to new style.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:04 GMT) Full text and rfc822 format available.

Message #26 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 7/8] gnu: intelmetool: Use cc-for-target.
Date: Thu, 23 Nov 2023 16:27:43 +0100
* gnu/packages/flashing-tools.scm (intelmetool): Use cc-for-target.

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

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





Information forwarded to , guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 23 Nov 2023 15:29:05 GMT) Full text and rfc822 format available.

Message #29 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 8/8] gnu: Add nvramtool.
Date: Thu, 23 Nov 2023 16:27:44 +0100
* gnu/packages/flashing-tools.scm (nvramtool): New variable.

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

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





Information forwarded to guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Fri, 22 Mar 2024 01:00:02 GMT) Full text and rfc822 format available.

Message #32 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 67403 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/8] Coreboot related patches.
Date: Fri, 22 Mar 2024 01:58:09 +0100
[Message part 1 (text/plain, inline)]
On Thu, 23 Nov 2023 16:09:41 +0100
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> wrote:
> This patchset updates some tools that use the Coreboot source, fixes
> a freedom bug, code and also add two new tools (bucts and nvramtool).
[...]
> 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.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#67403; Package guix-patches. (Thu, 19 Sep 2024 16:28:02 GMT) Full text and rfc822 format available.

Message #35 received at 67403 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 67403 <at> debbugs.gnu.org
Subject: Review of iftool patches
Date: Thu, 19 Sep 2024 18:26:12 +0200
[Message part 1 (text/plain, inline)]
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:
-----------
[1]https://issues.guix.gnu.org/67403
[2]https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67403

Denis.
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.