Update u-boot to 2023.07.02

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Vagrant Cascadian
Severity
normal
V
V
Vagrant Cascadian wrote on 18 Jun 2023 10:49
WIP update u-boot to 2023.07-rc4
(address . guix-patches@gnu.org)
87o7ld9mu8.fsf@wireframe
The attached patch updates u-boot to 2023.07-rc4... though mostly just
getting this patch out there for review purposes, but should probably
wait until 2023.07 is released in July. Alternately, could try to update
to 2023.04, although honestly that version had quite a few issues in
Debian and might be best skipped!

Builds most of the u-boot-* packages successfully, notable issues are
with u-boot-tools failing to build, and unable to cross-build
u-boot-puma-rk3399 and u-boot-rockpro64-rk3399 due to the dependency on
python-pyelftools not being cross-buildable ... though
u-boot-pinebook-pro-rk3399 uses python-pyelftools just fine, somehow?!

I have not boot-tested anything with this patch.

This patch depends on the patch updating python-pyelftools:


...or fixing the failing build of python-pyelftools some other way!

It also would be nice to pull in the updated arm-trusted-firmware:


...although this is not strictly necessary.

(e.g. python-pyelftools and arm-trusted-firmware are why this is patch 3
in a series, but strictly speaking, this *could* be applied
independently).

It also might be time to make some more noise on the forgotten
crust-firmware patch, as there is a workaround in this patch because
that is missing from guix:



live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZI7FHwAKCRDcUY/If5cW
qt1uAQCVZgfK9+vyp4AHPfNJxv/lHbkitW81FM2ftRiC9KSvDAEArE1DxynptVgN
j6N4JRjmbWX0T25UWItH2bJwCTLiZQY=
=TO90
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 3 Jul 2023 03:26
Re: WIP update u-boot to 2023.07-rc5
(address . 64149@debbugs.gnu.org)
87jzvhyecs.fsf@wireframe
On 2023-06-18, Vagrant Cascadian wrote:
Toggle quote (6 lines)
> The attached patch updates u-boot to 2023.07-rc4... though mostly just
> getting this patch out there for review purposes, but should probably
> wait until 2023.07 is released in July. Alternately, could try to update
> to 2023.04, although honestly that version had quite a few issues in
> Debian and might be best skipped!

This patch updates to 2023.07-rc5.

2023.07 is scheduled for upstream release tomorrow.


Toggle quote (6 lines)
> Builds most of the u-boot-* packages successfully, notable issues are
> with u-boot-tools failing to build, and unable to cross-build
> u-boot-puma-rk3399 and u-boot-rockpro64-rk3399 due to the dependency on
> python-pyelftools not being cross-buildable ... though
> u-boot-pinebook-pro-rk3399 uses python-pyelftools just fine, somehow?!

Still similarly broken.


Toggle quote (2 lines)
> I have not boot-tested anything with this patch.

Still have not done this either...


Toggle quote (6 lines)
> This patch depends on the patch updating python-pyelftools:
>
> https://issues.guix.gnu.org/64144
>
> ...or fixing the failing build of python-pyelftools some other way!

Merged that yesterday...


Toggle quote (6 lines)
> It also would be nice to pull in the updated arm-trusted-firmware:
>
> https://issues.guix.gnu.org/64142
>
> ...although this is not strictly necessary.

Still preferred, but not strictly necessary.


Toggle quote (6 lines)
> It also might be time to make some more noise on the forgotten
> crust-firmware patch, as there is a workaround in this patch because
> that is missing from guix:
>
> https://issues.guix.gnu.org/48371

This needs more research, may not be needed with recent
arm-trusted-firmware...


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKIj0wAKCRDcUY/If5cW
qgElAQDa1YBStDGNtkkY2Wb7gU8R3UhH4Ppigl19ekgCmhHCQgEAtNjml0m9gRaf
EKq9g5bZCWUnbyx2jt+A+toHvmqf7Qw=
=5wlv
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 5 Jul 2023 00:59
(address . 64149@debbugs.gnu.org)
87wmzfwaep.fsf@wireframe
On 2023-07-02, Vagrant Cascadian wrote:
Toggle quote (11 lines)
> On 2023-06-18, Vagrant Cascadian wrote:
>> The attached patch updates u-boot to 2023.07-rc4... though mostly just
>> getting this patch out there for review purposes, but should probably
>> wait until 2023.07 is released in July. Alternately, could try to update
>> to 2023.04, although honestly that version had quite a few issues in
>> Debian and might be best skipped!
>
> This patch updates to 2023.07-rc5.
>
> 2023.07 is scheduled for upstream release tomorrow.

Postponed another week, 2023.07-rc6 came out yesterday instead...


Toggle quote (3 lines)
>> Builds most of the u-boot-* packages successfully, notable issues are
>> with u-boot-tools failing to build

u-boot-tools needs some updates to the patch disabling openssl
support...


Toggle quote (7 lines)
>> , and unable to cross-build
>> u-boot-puma-rk3399 and u-boot-rockpro64-rk3399 due to the dependency on
>> python-pyelftools not being cross-buildable ... though
>> u-boot-pinebook-pro-rk3399 uses python-pyelftools just fine, somehow?!
>
> Still similarly broken.

Still a bit baffled by this, but maybe I can get a machine running on a
native build at least...


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKSkTgAKCRDcUY/If5cW
qvQhAPwOTG3iOLz7nqcuRxHjlMtVTIuNVwOoY3XdDuaXOKV5HQD+LxDAGi0GoCJM
8503vTnCsr4cYzvbllSPfJZ7GrilOQg=
=4qav
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 5 Jul 2023 03:10
(address . 64149@debbugs.gnu.org)
87ttujw4cg.fsf@wireframe
On 2023-07-04, Vagrant Cascadian wrote:
Toggle quote (14 lines)
> On 2023-07-02, Vagrant Cascadian wrote:
>> On 2023-06-18, Vagrant Cascadian wrote:
>>> The attached patch updates u-boot to 2023.07-rc4... though mostly just
>>> getting this patch out there for review purposes, but should probably
>>> wait until 2023.07 is released in July. Alternately, could try to update
>>> to 2023.04, although honestly that version had quite a few issues in
>>> Debian and might be best skipped!
>>
>> This patch updates to 2023.07-rc5.
>>
>> 2023.07 is scheduled for upstream release tomorrow.
>
> Postponed another week, 2023.07-rc6 came out yesterday instead...

Updated patch to 2023.07-rc6 and fixed some things!


Toggle quote (6 lines)
>>> Builds most of the u-boot-* packages successfully, notable issues are
>>> with u-boot-tools failing to build
>
> u-boot-tools needs some updates to the patch disabling openssl
> support...

Still needed, although I find it strange that we are running the u-boot
testsuite with the u-boot-tools package... as it mostly runs tests for
the u-boot-sandbox targets rather than the tools... seems much more
appropriate for the... u-boot-sandbox package? :)

At any rate, whereever the tests are run from, it appears to also need
the python-filelock package as an input, as well as patching out
CONFIG_*_SIGNATURE and/or related variables... still poking at that.


Toggle quote (7 lines)
>>> , and unable to cross-build
>>> u-boot-puma-rk3399 and u-boot-rockpro64-rk3399 due to the dependency on
>>> python-pyelftools not being cross-buildable ... though
>>> u-boot-pinebook-pro-rk3399 uses python-pyelftools just fine, somehow?!
>>
>> Still similarly broken.

These two are fixed with this patch!


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKTC/wAKCRDcUY/If5cW
qm5sAQDQDvRgnC+T1uZcBKOSQk7aPQxL4QZVYc8irLJZtHPEzAD/dZAp2h43uPvf
7woeaAX0V8lL7MEiDqFgcsBrmdou3g0=
=5Vdv
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 5 Jul 2023 03:13
(address . 64149@debbugs.gnu.org)
87r0pnw47b.fsf@wireframe
On 2023-07-04, Vagrant Cascadian wrote:
Toggle quote (18 lines)
> On 2023-07-04, Vagrant Cascadian wrote:
>> On 2023-07-02, Vagrant Cascadian wrote:
>>> On 2023-06-18, Vagrant Cascadian wrote:
>>>> Builds most of the u-boot-* packages successfully, notable issues are
>>>> with u-boot-tools failing to build
>>
>> u-boot-tools needs some updates to the patch disabling openssl
>> support...
>
> Still needed, although I find it strange that we are running the u-boot
> testsuite with the u-boot-tools package... as it mostly runs tests for
> the u-boot-sandbox targets rather than the tools... seems much more
> appropriate for the... u-boot-sandbox package? :)
>
> At any rate, whereever the tests are run from, it appears to also need
> the python-filelock package as an input, as well as patching out
> CONFIG_*_SIGNATURE and/or related variables... still poking at that.

More specifically:

+make O=/tmp/guix-build-u-boot-tools-2023.07-rc6.drv-0/u-boot-2023.07-rc6/build-sandbox_vpl -s -j4
../scripts/dtc-version.sh: line 18: which: command not found
In file included from ../tools/imagetool.h:24,
from ../tools/aisimage.c:7:
../include/image.h:1397:12: fatal error: openssl/evp.h: No such file or directory
1397 | # include <openssl/evp.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.host:112: tools/aisimage.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ../tools/imagetool.h:24,
from ../tools/atmelimage.c:7:
../include/image.h:1397:12: fatal error: openssl/evp.h: No such file or directory
1397 | # include <openssl/evp.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.host:112: tools/atmelimage.o] Error 1
In file included from ../tools/imagetool.h:24,
from ../tools/fit_common.c:20:
../include/image.h:1397:12: fatal error: openssl/evp.h: No such file or directory
1397 | # include <openssl/evp.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.host:112: tools/fit_common.o] Error 1
In file included from ../tools/imagetool.h:24,
from ../tools/fit_image.c:16:
../include/image.h:1397:12: fatal error: openssl/evp.h: No such file or directory
1397 | # include <openssl/evp.h>
| ^~~~~~~~~~~~~~~
compilation terminated.

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKTDuAAKCRDcUY/If5cW
qtqiAP4k5wHK3JWmUrlasiI2gnI9vbNlfhg56r1FqSZgPdifpAEAoffzKwOAsk5p
xffQ4P6wdoZBVZexR9i065HWG0c+dwA=
=XHRL
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 5 Jul 2023 04:50
Re: WIP update u-boot to 2023.07-rc6
(address . 64149@debbugs.gnu.org)
87o7krvzq6.fsf@wireframe
On 2023-07-04, Vagrant Cascadian wrote:
Toggle quote (9 lines)
> On 2023-07-04, Vagrant Cascadian wrote:
>> On 2023-07-04, Vagrant Cascadian wrote:
>>> On 2023-07-02, Vagrant Cascadian wrote:
>>>> On 2023-06-18, Vagrant Cascadian wrote:
>>>>> Builds most of the u-boot-* packages successfully, notable issues are
>>>>> with u-boot-tools failing to build
>>>
>>> u-boot-tools needs some updates to the patch disabling openssl
>>> support...
...
Toggle quote (4 lines)
>> At any rate, whereever the tests are run from, it appears to also need
>> the python-filelock package as an input, as well as patching out
>> CONFIG_*_SIGNATURE and/or related variables... still poking at that.

Figured it out! The sandbox_vpl_defconfig target did not define the
CONFIG_FIT_SIGNATURE, which was used as a reference point to inject the
openssl disablement, and so was not getting the values we wanted to add
in the configuration.

Attached patch which gets everything building again!

Still have not boot-tested anything.

The one thing I would probably prefer is to split this into one package
per line, but I tried to aim for a smaller diff:

- (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
+ (prepend python-coverage python-filelock python-pycryptodomex
+python-pytest python-pytest-xdist sdl2)))

Though, apparently I have the worst of both worlds, split across two
lines and not indented correctly! Easy enough to fix with the next
iteration...


I still think it is probably best to wait till the 2023.07 release to
actually push to master... but hopefully this resolves most of the
hardest work!


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKTaYQAKCRDcUY/If5cW
qoyvAQChkOuDLSrJS4Zaq4DkM3R0Jmda7mmnkv0EvTV4MLq/ggEAlpO/CEcHxbJ8
KWbPbUh+WUeIOOiLArwCX0nmu85qUQ8=
=wNfk
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 6 Jul 2023 19:50
(address . 64149@debbugs.gnu.org)
87edllgc9u.fsf@wireframe
On 2023-07-04, Vagrant Cascadian wrote:
Toggle quote (2 lines)
> Attached patch which gets everything building again!

Oops, did not test patman, and it is failing:


Not sure when I will have time to look at that...

Would be nice if I were able to do "guix refresh --list-dependent --inherits-from u-boot"
instead of manually figuring this out... or if it supported that out of
the box somehow...

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKb+3QAKCRDcUY/If5cW
qr8HAP9LZqJYiLNw9TTnuyn5sSO5Cp5uLR7u1R1DwfS+xhvWiAD+LqVY3w/K0bRt
aDYW5n30m5pPTLlCo362H1bAJIYWlgI=
=9aWw
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 8 Jul 2023 06:03
[PATCH 0/2]
(name . Vagrant Cascadian)(address . vagrant@debian.org)
cover.1688788818.git.maxim.cournoyer@gmail.com
Hi Vagrant,

I've fixed patman, to be applied on top of your u-boot update commit.
I'll now post some review comments.

Thanks,

Maxim Cournoyer (2):
gnu: Add python-u-boot-pylib.
gnu: patman: Add python-u-boot-pylib to inputs.

gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 25 +++++++++++++++++--
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 ++++++++++++++++++
3 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch


base-commit: 14888e5b25202047cd467461a4032326fe9de344
prerequisite-patch-id: c2991e79f14f2a4b285e6a627fd850b8cafe8638
--
2.40.1
M
M
Maxim Cournoyer wrote on 8 Jul 2023 06:03
[PATCH 1/2] gnu: Add python-u-boot-pylib.
(name . Vagrant Cascadian)(address . vagrant@debian.org)
930d43aa16eee3ca8a9350ec8f24bc596aea159c.1688788818.git.maxim.cournoyer@gmail.com
* gnu/packages/bootloaders.scm (python-u-boot-pylib): New variable.
* gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 23 +++++++++++++++++-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index bb13280dc7..c12b29447d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,6 +1996,7 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
+ %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 3f04411f1b..c1a76ab90e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -655,7 +655,8 @@ (define u-boot
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")
+ (search-patch "u-boot-fix-u-boot-lib-build.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
@@ -831,6 +832,26 @@ (define-public u-boot-tools
" This package provides board-independent tools "
"of U-Boot."))))
+(define-public python-u-boot-pylib
+ (package
+ (inherit u-boot)
+ (name "python-u-boot-pylib")
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "tools/u_boot_pylib")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./u_boot_pylib")))))))
+ (synopsis "U-Boot Python library")
+ (description "This package provides common Python code used by some of the
+commands part of the U-Boot project, such as Patman.")))
+
;;; This is packaged separately, as it can be used in other contexts than for
;;; U-Boot development.
(define-public patman
diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
new file mode 100644
index 0000000000..233c437de6
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
@@ -0,0 +1,24 @@
+Submitted upstream (see:
+https://lists.denx.de/pipermail/u-boot/2023-July/521984.html)
+
+diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml
+index 3f33caf6f8..037c5d629e 100644
+--- a/tools/u_boot_pylib/pyproject.toml
++++ b/tools/u_boot_pylib/pyproject.toml
+@@ -9,7 +9,7 @@ authors = [
+ { name="Simon Glass", email="sjg@chromium.org" },
+ ]
+ description = "U-Boot python library"
+-readme = "README.md"
++readme = "README.rst"
+ requires-python = ">=3.7"
+ classifiers = [
+ "Programming Language :: Python :: 3",
+@@ -20,3 +20,7 @@ classifiers = [
+ [project.urls]
+ "Homepage" = "https://u-boot.readthedocs.io"
+ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
++
++[tool.setuptools.packages.find]
++where = [".."]
++include = ["u_boot_pylib*"]
--
2.40.1
M
M
Maxim Cournoyer wrote on 8 Jul 2023 06:03
[PATCH 2/2] gnu: patman: Add python-u-boot-pylib to inputs.
(name . Vagrant Cascadian)(address . vagrant@debian.org)
e1a6018e5f50c446f91fe8b48b49022ab3f2adad.1688788818.git.maxim.cournoyer@gmail.com
* gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
---
gnu/packages/bootloaders.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c1a76ab90e..789248afeb 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -869,7 +869,7 @@ (define-public patman
(add-after 'unpack 'chdir
(lambda _
(chdir "tools/patman"))))))
- (inputs (list python-pygit2 python-requests))
+ (inputs (list python-pygit2 python-requests python-u-boot-pylib))
(synopsis "Patch automation tool")
(description "Patman is a patch automation script which:
@itemize
--
2.40.1
M
M
Maxim Cournoyer wrote on 8 Jul 2023 06:23
Re: bug#64149: WIP update u-boot to 2023.07-rc4
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87pm53xc9i.fsf_-_@gmail.com
Hi Vagrant,

Some quick comments:

Vagrant Cascadian <vagrant@debian.org> writes:


[...]


Toggle quote (7 lines)
> The one thing I would probably prefer is to split this into one package
> per line, but I tried to aim for a smaller diff:
>
> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
> + (prepend python-coverage python-filelock python-pycryptodomex
> +python-pytest python-pytest-xdist sdl2)))

Odd indentation; please use something like:

(prepend package1
package2
...)
Toggle quote (9 lines)
> Though, apparently I have the worst of both worlds, split across two
> lines and not indented correctly! Easy enough to fix with the next
> iteration...
>
>
> I still think it is probably best to wait till the 2023.07 release to
> actually push to master... but hopefully this resolves most of the
> hardest work!

Haha! I see you had the same comment yourself.

Toggle quote (13 lines)
>
> live well,
> vagrant
>
> From d734cc541f920963e8cf8d68061d5329c9712d00 Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant@debian.org>
> Date: Sun, 2 Jul 2023 18:20:39 -0700
> Subject: [PATCH 2/2] gnu: u-boot: Update to 2023.07-rc6.
>
> * gnu/packages/patches/u-boot-infodocs-target.patch: Remove file.
> * gnu/packages/patches/u-boot-patman-guix-integration.patch: Remove
> file.

Nitpick: I'd use "Delete" here instead of "Remove".

Toggle quote (2 lines)
> * gnu/local.mk: Remove patches.

Nitpick: I'd use "De-register" instead of remove.

Toggle quote (103 lines)
> * gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
> * gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
> * gnu/packages/bootloaders.scm (u-boot): Update to 2023.07-rc6.
> [native-inputs]: Add python-pyelftools.
> [source]: Remove patches.
> (u-boot-tools)[phases]: Update substitution for python3-coverage.
> Adjust 'patch to catch more openssl incompatibilities.
> [native-inputs]: Add python-filelock and python-pytest-xdist.
> (make-u-boot-sunxi64-package): Set SCP environment variable.
> (u-boot-sifive-unleashed): Update to use opensbi.
> (u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
> package-inputs instead of native-inputs.
> (u-boot-rockpro64-rk3399)[phases]: Add 'disable-spl-fit-signature.
> ---
> gnu/local.mk | 2 -
> gnu/packages/bootloaders.scm | 46 +-
> .../u-boot-allow-disabling-openssl.patch | 13 +-
> .../patches/u-boot-infodocs-target.patch | 84 --
> .../u-boot-patman-guix-integration.patch | 1244 -----------------
> ...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
> 6 files changed, 46 insertions(+), 1351 deletions(-)
> delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
> delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 6470f1abd4..fe46cd58f2 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1997,8 +1997,6 @@ dist_patch_DATA = \
> %D%/packages/patches/twinkle-bcg729.patch \
> %D%/packages/patches/u-boot-allow-disabling-openssl.patch \
> %D%/packages/patches/u-boot-fix-build-python-3.10.patch \
> - %D%/packages/patches/u-boot-infodocs-target.patch \
> - %D%/packages/patches/u-boot-patman-guix-integration.patch \
> %D%/packages/patches/u-boot-nintendo-nes-serial.patch \
> %D%/packages/patches/u-boot-rockchip-inno-usb.patch \
> %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index a9685a9ef9..446dc8fc97 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
> (define u-boot
> (package
> (name "u-boot")
> - (version "2022.10")
> + (version "2023.07-rc6")
> (source (origin
> (patches
> (list %u-boot-rockchip-inno-usb-patch
> %u-boot-allow-disabling-openssl-patch
> %u-boot-sifive-prevent-relocating-initrd-fdt
> %u-boot-rk3399-enable-emmc-phy-patch
> - (search-patch "u-boot-fix-build-python-3.10.patch")
> - (search-patch "u-boot-infodocs-target.patch")
> - (search-patch "u-boot-patman-guix-integration.patch")))
> + (search-patch "u-boot-fix-build-python-3.10.patch")))
> (method url-fetch)
> (uri (string-append
> "https://ftp.denx.de/pub/u-boot/"
> "u-boot-" version ".tar.bz2"))
> (sha256
> (base32
> - "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
> + "1dgvr228imbhzq7vzr8iialijl3k4mhjdirjrm6hsy6qbm6jyj5r"))))
> (build-system gnu-build-system)
> (native-inputs
> (list bison
> @@ -676,6 +674,7 @@ (define u-boot
> perl
> pkg-config ;for 'make menuconfig'
> python
> + python-pyelftools
> swig
> (list util-linux "lib")))
> (home-page "https://www.denx.de/wiki/U-Boot/")
> @@ -726,7 +725,8 @@ (define-public u-boot-tools
> (name "u-boot-tools")
> (native-inputs
> (modify-inputs (package-native-inputs u-boot)
> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
> + (prepend python-coverage python-filelock python-pycryptodomex
> +python-pytest python-pytest-xdist sdl2)))
> (arguments
> `(#:make-flags '("HOSTCC=gcc")
> #:test-target "tcheck"
> @@ -739,7 +739,7 @@ (define-public u-boot-tools
> (("/bin/false") (which "false")))
> (substitute* "tools/dtoc/fdt_util.py"
> (("'cc'") "'gcc'"))
> - (substitute* "tools/patman/test_util.py"
> + (substitute* "tools/u_boot_pylib/test_util.py"
> ;; python3-coverage is simply called coverage in guix.
> (("python3-coverage") "coverage")
>
> @@ -778,6 +778,9 @@ (define-public u-boot-tools
> ;; details.
> (("CONFIG_FIT_SIGNATURE=y")
> "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
> + ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
> + (("CONFIG_SANDBOX_VPL=y")
> + "CONFIG_SANDBOX_VPL=y\nCONFIG_FIT_SIGNATURE=n\nCONFIG_VPL_FIT_SIGNATURE=n\nCONFIG_TOOLS_LIBCRYPTO=n")

I know it's already busted on the line above, but we can format this in
a more readable way by using something like:
"\
CONFIG1=y
CONFIG2=n
...\n"

Toggle quote (9 lines)
> ;; This test requires a sound system, which is un-used
> ;; in u-boot-tools.
> (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
> @@ -1009,6 +1012,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
> #~(modify-phases #$phases
> (add-after 'unpack 'set-environment
> (lambda* (#:key native-inputs inputs #:allow-other-keys)
> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371

Trick to avoid busting the 80 characters per line limit: for links, you
can do (see: $link), which typically gets split like:

;; blablabla (see:
;; https://...)

Toggle quote (57 lines)
> + (setenv "SCP" "/dev/null")
> (setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
> (inputs
> (modify-inputs (package-inputs base)
> @@ -1104,7 +1109,7 @@ (define-public u-boot-puma-rk3399
> (delete 'strip)
> (delete 'validate-runpath)))))
> (inputs
> - (modify-inputs (package-native-inputs base)
> + (modify-inputs (package-inputs base)
> (append arm-trusted-firmware-rk3399))))))
>
> (define-public u-boot-qemu-arm
> @@ -1170,7 +1175,20 @@ (define-public u-boot-sandbox
> (append sdl2))))))
>
> (define-public u-boot-sifive-unleashed
> - (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
> + (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
> + (package
> + (inherit base)
> + (arguments
> + (substitute-keyword-arguments (package-arguments base)
> + ((#:phases phases)
> + #~(modify-phases #$phases
> + (add-after 'unpack 'set-environment
> + (lambda* (#:key inputs #:allow-other-keys)
> + (setenv "OPENSBI" (search-input-file inputs
> + "fw_dynamic.bin"))))))))
> + (inputs
> + (modify-inputs (package-inputs base)
> + (append opensbi-generic))))))
>
> (define-public u-boot-sifive-unmatched
> (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
> @@ -1230,7 +1248,8 @@ (define-public u-boot-rockpro64-rk3399
> "CONFIG_SATA_SIL=y"
> "CONFIG_SCSI=y"
> "CONFIG_SCSI_AHCI=y"
> - "CONFIG_DM_SCSI=y"))))
> + "CONFIG_DM_SCSI=y"
> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
> (package
> (inherit base)
> (arguments
> @@ -1240,6 +1259,13 @@ (define-public u-boot-rockpro64-rk3399
> (add-after 'unpack 'set-environment
> (lambda* (#:key inputs #:allow-other-keys)
> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
> + ;; incompatibilities
> + (add-after 'unpack 'disable-spl-fit-signature
> + (lambda _
> + (substitute* "configs/rockpro64-rk3399_defconfig"
> + (("CONFIG_SPL_FIT_SIGNATURE=y")
> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))

Is this really needed, given we use "# CONFIG_SPL_FIT_SIGNATURE is not
set" in #:configs above?

The rest LGTM, thank you!

--
Maxim
V
V
Vagrant Cascadian wrote on 8 Jul 2023 23:36
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
875y6ugk65.fsf@wireframe
On 2023-07-08, Maxim Cournoyer wrote:
Toggle quote (15 lines)
> Vagrant Cascadian <vagrant@debian.org> writes:
> [...]
>> The one thing I would probably prefer is to split this into one package
>> per line, but I tried to aim for a smaller diff:
>>
>> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
>> + (prepend python-coverage python-filelock python-pycryptodomex
>> +python-pytest python-pytest-xdist sdl2)))
>
> Odd indentation; please use something like:
>
> (prepend package1
> package2
> ...)

Yup, that is the aproach I would propose for the next and/or final
patch(es)!


Toggle quote (11 lines)
>> From d734cc541f920963e8cf8d68061d5329c9712d00 Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant@debian.org>
>> Date: Sun, 2 Jul 2023 18:20:39 -0700
>> Subject: [PATCH 2/2] gnu: u-boot: Update to 2023.07-rc6.
>>
>> * gnu/packages/patches/u-boot-infodocs-target.patch: Remove file.
>> * gnu/packages/patches/u-boot-patman-guix-integration.patch: Remove
>> file.
>
> Nitpick: I'd use "Delete" here instead of "Remove".

Not my style, but not strongly opinionated either. :)

Toggle quote (4 lines)
>> * gnu/local.mk: Remove patches.
>
> Nitpick: I'd use "De-register" instead of remove.

Even less my style, but also not strongly opinionated. :)


Toggle quote (15 lines)
>> @@ -778,6 +778,9 @@ (define-public u-boot-tools
>> ;; details.
>> (("CONFIG_FIT_SIGNATURE=y")
>> "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
>> + ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
>> + (("CONFIG_SANDBOX_VPL=y")
>> + "CONFIG_SANDBOX_VPL=y\nCONFIG_FIT_SIGNATURE=n\nCONFIG_VPL_FIT_SIGNATURE=n\nCONFIG_TOOLS_LIBCRYPTO=n")
>
> I know it's already busted on the line above, but we can format this in
> a more readable way by using something like:
> "\
> CONFIG1=y
> CONFIG2=n
> ...\n"

Will experiment with it, and if I can get it to work, also fix the
CONFIG_FIT_SIGNATURE stuff too.


Toggle quote (17 lines)
>> ;; This test requires a sound system, which is un-used
>> ;; in u-boot-tools.
>> (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
>> @@ -1009,6 +1012,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
>> #~(modify-phases #$phases
>> (add-after 'unpack 'set-environment
>> (lambda* (#:key native-inputs inputs #:allow-other-keys)
>> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
>
> Trick to avoid busting the 80 characters per line limit: for links, you
> can do (see: $link), which typically gets split like:
>
> ;; blablabla (see:
> ;; https://...)
>
>> + (setenv "SCP" "/dev/null")

Yeah, that sounds good...

Although, now that "Add crust firmware for sunxi devices"
(https://issues.guix.gnu.org/48371)finally got merged, we will have to
fix this properly. :)


Toggle quote (25 lines)
>> @@ -1230,7 +1248,8 @@ (define-public u-boot-rockpro64-rk3399
>> "CONFIG_SATA_SIL=y"
>> "CONFIG_SCSI=y"
>> "CONFIG_SCSI_AHCI=y"
>> - "CONFIG_DM_SCSI=y"))))
>> + "CONFIG_DM_SCSI=y"
>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>> (package
>> (inherit base)
>> (arguments
>> @@ -1240,6 +1259,13 @@ (define-public u-boot-rockpro64-rk3399
>> (add-after 'unpack 'set-environment
>> (lambda* (#:key inputs #:allow-other-keys)
>> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
>> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
>> + ;; incompatibilities
>> + (add-after 'unpack 'disable-spl-fit-signature
>> + (lambda _
>> + (substitute* "configs/rockpro64-rk3399_defconfig"
>> + (("CONFIG_SPL_FIT_SIGNATURE=y")
>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>
> Is this really needed, given we use "# CONFIG_SPL_FIT_SIGNATURE is not
> set" in #:configs above?

Only having it in #:configs resulted in a build failure (e.g. there were
conflicting entries or something). Having it in both places seems better
as it ensures it does not accidentally get enabled somehow. But we
probably could drop the part in #:configs if we wanted ... or re-write
how #:configs works, though that would be more than I want to get into
right now! :)

Toggle quote (2 lines)
> The rest LGTM, thank you!

Thanks for the review!

Will try and incorporate the above suggestions and the patman patches
and get another patch series ready for 2023.07-rc6, and then hopefully
monday the actual release of 2023.07...


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKnW4gAKCRDcUY/If5cW
qnwZAP9gVa/dRVijnkmsr1nO1tKOSsNMus0ZMoBnaDFz/GKXHwD/RcM7kO9QOnsd
TmwsPet/kKHS1jATgdnSipI3OO0dggs=
=oEhj
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 9 Jul 2023 01:21
Re: [PATCH 2/2] gnu: patman: Add python-u-boot-pylib to inputs.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87351ygfb2.fsf@wireframe
On 2023-07-08, Maxim Cournoyer wrote:
Toggle quote (21 lines)
> * gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
> ---
> gnu/packages/bootloaders.scm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index c1a76ab90e..789248afeb 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -869,7 +869,7 @@ (define-public patman
> (add-after 'unpack 'chdir
> (lambda _
> (chdir "tools/patman"))))))
> - (inputs (list python-pygit2 python-requests))
> + (inputs (list python-pygit2 python-requests python-u-boot-pylib))
> (synopsis "Patch automation tool")
> (description "Patman is a patch automation script which:
> @itemize
> --
> 2.40.1

This was not sufficient to get patman building again:

starting phase `sanity-check' validating 'patch-manager' /gnu/store/d22rsfa7pr8ff6ai1hp72qjljiyayzrx-patman-2023.07-rc6/lib/python3.10/site-packages
...checking requirements: OK ...trying to load module patman: OK ...trying to load endpoint console_scripts patman: ERROR:
Traceback (most recent call last): File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, in run_pipe
last_pipe = cros_subprocess.Popen(cmd, cwd=cwd, **kwargs) File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", line 83, in __init__
super(Popen, self).__init__(args, stdin=stdin, File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 969, in __init__ self._execute_child(args, executable, preexec_fn, close_fds,
File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKnvggAKCRDcUY/If5cW
qmqBAQDqZ++5qd9cqwllVyRIrZBSKjitthNl4Y60OWU3bybwxAD/UZnG9OOEdnzJ
AjwqQcLXftfwBn7PxzQad+il12dUFws=
=OVje
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 9 Jul 2023 03:38
[PATCH v2] bug#64149: WIP update u-boot to 2023.07-rc6
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87zg45g8yg.fsf@wireframe
On 2023-07-08, Vagrant Cascadian wrote:
Toggle quote (19 lines)
> On 2023-07-08, Maxim Cournoyer wrote:
>> Vagrant Cascadian <vagrant@debian.org> writes:
>> [...]
>>> The one thing I would probably prefer is to split this into one package
>>> per line, but I tried to aim for a smaller diff:
>>>
>>> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
>>> + (prepend python-coverage python-filelock python-pycryptodomex
>>> +python-pytest python-pytest-xdist sdl2)))
>>
>> Odd indentation; please use something like:
>>
>> (prepend package1
>> package2
>> ...)
>
> Yup, that is the aproach I would propose for the next and/or final
> patch(es)!

Included in the upcoming patch series.

Toggle quote (14 lines)
>>> * gnu/packages/patches/u-boot-infodocs-target.patch: Remove file.
>>> * gnu/packages/patches/u-boot-patman-guix-integration.patch: Remove
>>> file.
>>
>> Nitpick: I'd use "Delete" here instead of "Remove".
>
> Not my style, but not strongly opinionated either. :)
>
>>> * gnu/local.mk: Remove patches.
>>
>> Nitpick: I'd use "De-register" instead of remove.
>
> Even less my style, but also not strongly opinionated. :)

And also included.

Toggle quote (15 lines)
>>> @@ -778,6 +778,9 @@ (define-public u-boot-tools
>>> ;; details.
>>> (("CONFIG_FIT_SIGNATURE=y")
>>> "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
>>> + ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
>>> + (("CONFIG_SANDBOX_VPL=y")
>>> + "CONFIG_SANDBOX_VPL=y\nCONFIG_FIT_SIGNATURE=n\nCONFIG_VPL_FIT_SIGNATURE=n\nCONFIG_TOOLS_LIBCRYPTO=n")
>>
>> I know it's already busted on the line above, but we can format this in
>> a more readable way by using something like:
>> "\
>> CONFIG1=y
>> CONFIG2=n
>> ...\n"

I did something somewhat like that, in a way that did not require using
\n at all, for both the CONFIG_FIT_SIGNATURE and CONFIG_SANDBOX_VPL
lines.


Toggle quote (16 lines)
>>> @@ -1009,6 +1012,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
>>> #~(modify-phases #$phases
>>> (add-after 'unpack 'set-environment
>>> (lambda* (#:key native-inputs inputs #:allow-other-keys)
>>> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
>>
>> Trick to avoid busting the 80 characters per line limit: for links, you
>> can do (see: $link), which typically gets split like:
>>
>> ;; blablabla (see:
>> ;; https://...)
>>
>>> + (setenv "SCP" "/dev/null")
>
> Yeah, that sounds good...

Oops, forgot that... because...

Toggle quote (4 lines)
> Although, now that "Add crust firmware for sunxi devices"
> (https://issues.guix.gnu.org/48371) finally got merged, we will have to
> fix this properly. :)

I made this work. :)


Toggle quote (32 lines)
>>> @@ -1230,7 +1248,8 @@ (define-public u-boot-rockpro64-rk3399
>>> "CONFIG_SATA_SIL=y"
>>> "CONFIG_SCSI=y"
>>> "CONFIG_SCSI_AHCI=y"
>>> - "CONFIG_DM_SCSI=y"))))
>>> + "CONFIG_DM_SCSI=y"
>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>> (package
>>> (inherit base)
>>> (arguments
>>> @@ -1240,6 +1259,13 @@ (define-public u-boot-rockpro64-rk3399
>>> (add-after 'unpack 'set-environment
>>> (lambda* (#:key inputs #:allow-other-keys)
>>> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
>>> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
>>> + ;; incompatibilities
>>> + (add-after 'unpack 'disable-spl-fit-signature
>>> + (lambda _
>>> + (substitute* "configs/rockpro64-rk3399_defconfig"
>>> + (("CONFIG_SPL_FIT_SIGNATURE=y")
>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>
>> Is this really needed, given we use "# CONFIG_SPL_FIT_SIGNATURE is not
>> set" in #:configs above?
>
> Only having it in #:configs resulted in a build failure (e.g. there were
> conflicting entries or something). Having it in both places seems better
> as it ensures it does not accidentally get enabled somehow. But we
> probably could drop the part in #:configs if we wanted ... or re-write
> how #:configs works, though that would be more than I want to get into
> right now! :)

I stuck with the above rationale and left it as it was...

I've included the patch updating arm-trusted-firmware to 2.9 from
https://issues.guix.gnu.org/64142and the patches submitted regarding
patman, although as mentioned patman still needs some updates.


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKoPpwAKCRDcUY/If5cW
qkm9AQDKwc14rPZ+5vQWYiUweURaP5AOwr/qINsaxVbZjqL/2AEAs7b/FJoZvEdb
qUHA4U4psaH0frNJSnYgW60zteesXAM=
=UoPU
-----END PGP SIGNATURE-----

V
V
vagrant wrote on 9 Jul 2023 03:47
[PATCH 1/5] gnu: arm-trusted-firmware: Update to 2.9.
(address . 64149@debbugs.gnu.org)
20230709014736.54114-1-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/firmware.scm (make-arm-trusted-firmware): Update to 2.9.
---
gnu/packages/firmware.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 3dcc882e0c..0492dabeed 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1025,7 +1025,7 @@ (define* (make-arm-trusted-firmware platform
(gnu-triplet->nix-system triplet))))))
(package
(name (string-append "arm-trusted-firmware-" platform))
- (version "2.8")
+ (version "2.9")
(source
(origin
(method git-fetch)
@@ -1036,7 +1036,7 @@ (define* (make-arm-trusted-firmware platform
(file-name (git-file-name "arm-trusted-firmware" version))
(sha256
(base32
- "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))
+ "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
(snippet
#~(begin
(use-modules (guix build utils))

base-commit: 2986ba899f5ee374008c501e26fb653147ed7891
--
2.39.2
V
V
vagrant wrote on 9 Jul 2023 03:47
[PATCH 2/5] gnu: u-boot: Update to 2023.07-rc6.
(address . 64149@debbugs.gnu.org)
20230709014736.54114-2-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/patches/u-boot-infodocs-target.patch: Delete file.
* gnu/packages/patches/u-boot-patman-guix-integration.patch: Delete file.
* gnu/local.mk: De-register patches.
* gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
* gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
* gnu/packages/bootloaders.scm (u-boot): Update to 2023.07-rc6.
[native-inputs]: Add python-pyelftools.
[source]: Remove patches.
(u-boot-tools)[phases]: Update substitution for python3-coverage.
Adjust 'patch to catch more openssl incompatibilities.
Split lines in 'patch phase.
[native-inputs]: Add python-filelock and python-pytest-xdist.
(make-u-boot-sunxi64-package): Set SCP environment variable.
(u-boot-sifive-unleashed): Update to use opensbi.
(u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
package-inputs instead of native-inputs.
(u-boot-rockpro64-rk3399)[phases]: Add 'disable-spl-fit-signature.
---
gnu/local.mk | 2 -
gnu/packages/bootloaders.scm | 57 +-
.../u-boot-allow-disabling-openssl.patch | 13 +-
.../patches/u-boot-infodocs-target.patch | 84 --
.../u-boot-patman-guix-integration.patch | 1244 -----------------
...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
6 files changed, 56 insertions(+), 1352 deletions(-)
delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch

Toggle diff (387 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index fa6f76e790..bb13280dc7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,8 +1996,6 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
- %D%/packages/patches/u-boot-infodocs-target.patch \
- %D%/packages/patches/u-boot-patman-guix-integration.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 01fd1093ff..8be5303a74 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
(define u-boot
(package
(name "u-boot")
- (version "2022.10")
+ (version "2023.07-rc6")
(source (origin
(patches
(list %u-boot-rockchip-inno-usb-patch
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")
- (search-patch "u-boot-infodocs-target.patch")
- (search-patch "u-boot-patman-guix-integration.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
"u-boot-" version ".tar.bz2"))
(sha256
(base32
- "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
+ "1dgvr228imbhzq7vzr8iialijl3k4mhjdirjrm6hsy6qbm6jyj5r"))))
(build-system gnu-build-system)
(native-inputs
(list bison
@@ -676,6 +674,7 @@ (define u-boot
perl
pkg-config ;for 'make menuconfig'
python
+ python-pyelftools
swig
(list util-linux "lib")))
(home-page "https://www.denx.de/wiki/U-Boot/")
@@ -726,7 +725,12 @@ (define-public u-boot-tools
(name "u-boot-tools")
(native-inputs
(modify-inputs (package-native-inputs u-boot)
- (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
+ (prepend python-coverage
+ python-filelock
+ python-pycryptodomex
+ python-pytest
+ python-pytest-xdist
+ sdl2)))
(arguments
`(#:make-flags '("HOSTCC=gcc")
#:test-target "tcheck"
@@ -739,7 +743,7 @@ (define-public u-boot-tools
(("/bin/false") (which "false")))
(substitute* "tools/dtoc/fdt_util.py"
(("'cc'") "'gcc'"))
- (substitute* "tools/patman/test_util.py"
+ (substitute* "tools/u_boot_pylib/test_util.py"
;; python3-coverage is simply called coverage in guix.
(("python3-coverage") "coverage")
@@ -777,7 +781,15 @@ (define-public u-boot-tools
;; See https://bugs.gnu.org/34717 for
;; details.
(("CONFIG_FIT_SIGNATURE=y")
- "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
+ "CONFIG_FIT_SIGNATURE=n
+CONFIG_UT_LIB_ASN1=n
+CONFIG_TOOLS_LIBCRYPTO=n")
+ ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
+ (("CONFIG_SANDBOX_VPL=y")
+ "CONFIG_SANDBOX_VPL=y
+CONFIG_FIT_SIGNATURE=n
+CONFIG_VPL_FIT_SIGNATURE=n
+CONFIG_TOOLS_LIBCRYPTO=n")
;; This test requires a sound system, which is un-used
;; in u-boot-tools.
(("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
@@ -1009,6 +1021,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
+ ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
+ (setenv "SCP" "/dev/null")
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
(inputs
(modify-inputs (package-inputs base)
@@ -1104,7 +1118,7 @@ (define-public u-boot-puma-rk3399
(delete 'strip)
(delete 'validate-runpath)))))
(inputs
- (modify-inputs (package-native-inputs base)
+ (modify-inputs (package-inputs base)
(append arm-trusted-firmware-rk3399))))))
(define-public u-boot-qemu-arm
@@ -1170,7 +1184,20 @@ (define-public u-boot-sandbox
(append sdl2))))))
(define-public u-boot-sifive-unleashed
- (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
+ (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "OPENSBI" (search-input-file inputs
+ "fw_dynamic.bin"))))))))
+ (inputs
+ (modify-inputs (package-inputs base)
+ (append opensbi-generic))))))
(define-public u-boot-sifive-unmatched
(let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
@@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
"CONFIG_SATA_SIL=y"
"CONFIG_SCSI=y"
"CONFIG_SCSI_AHCI=y"
- "CONFIG_DM_SCSI=y"))))
+ "CONFIG_DM_SCSI=y"
+ "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
(package
(inherit base)
(arguments
@@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "BL31" (search-input-file inputs "/bl31.elf"))))
+ ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
+ ;; incompatibilities
+ (add-after 'unpack 'disable-spl-fit-signature
+ (lambda _
+ (substitute* "configs/rockpro64-rk3399_defconfig"
+ (("CONFIG_SPL_FIT_SIGNATURE=y")
+ "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
(add-after 'unpack 'patch-header
(lambda _
(substitute* "include/config_distro_bootcmd.h"
diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
index 5f2856dbb4..5195a7a6f8 100644
--- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
+++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
@@ -128,29 +128,28 @@ index 94b7685392..eec599b0ee 100644
datai = 0;
for (cfgi = 0; cfgi < cfgn; cfgi++) {
e = &image_cfg[cfgi];
-@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+@@ -1624,10 +1640,12 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params,
&datai, delay);
}
+#if defined(CONFIG_KWB_SECURE)
- if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz,
- headersz, image, secure_hdr))
+ if (secure_hdr && add_secure_header_v1(params, ptr + *dataoff, payloadsz,
+ image, headersz, secure_hdr))
return NULL;
+#endif
- *imagesz = headersz;
+ /* Calculate and set the header checksum */
+ main_hdr->checksum = image_checksum8(main_hdr, headersz);
--- a/tools/image-host.c
+++ b/tools/image-host.c
-@@ -14,10 +14,12 @@
+@@ -14,8 +14,10 @@
#include <image.h>
#include <version.h>
+#ifdef CONFIG_FIT_PRELOAD
#include <openssl/pem.h>
#include <openssl/evp.h>
-
- #define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig"
+#endif
/**
diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch
deleted file mode 100644
index 5b21a99de3..0000000000
--- a/gnu/packages/patches/u-boot-infodocs-target.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333259
-
-diff --git a/Makefile b/Makefile
-index de5746399a..597a8886c3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2372,7 +2372,7 @@ tcheck:
- # Documentation targets
- # ---------------------------------------------------------------------------
- DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
-- linkcheckdocs dochelp refcheckdocs
-+ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
- PHONY += $(DOC_TARGETS)
- $(DOC_TARGETS): scripts_basic FORCE
- $(Q)$(MAKE) $(build)=doc $@
-diff --git a/doc/Makefile b/doc/Makefile
-index f5de65e927..d0904a9f99 100644
---- a/doc/Makefile
-+++ b/doc/Makefile
-@@ -69,6 +69,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
- htmldocs:
- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
-
-+texinfodocs:
-+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
-+
-+# Note: the 'info' Make target is generated by sphinx itself when
-+# running the texinfodocs target defined above.
-+infodocs: texinfodocs
-+ $(MAKE) -C $(BUILDDIR)/texinfo info
-+
- linkcheckdocs:
- @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
-
-@@ -109,6 +117,8 @@ cleandocs:
- dochelp:
- @echo ' U-Boot documentation in different formats from ReST:'
- @echo ' htmldocs - HTML'
-+ @echo ' texinfodocs - Texinfo'
-+ @echo ' infodocs - Info'
- @echo ' latexdocs - LaTeX'
- @echo ' pdfdocs - PDF'
- @echo ' epubdocs - EPUB'
-diff --git a/doc/conf.py b/doc/conf.py
-index 62c8d31270..3db70f80c1 100644
---- a/doc/conf.py
-+++ b/doc/conf.py
-@@ -449,7 +449,7 @@ for fn in os.listdir('.'):
- # One entry per manual page. List of tuples
- # (source start file, name, description, authors, manual section).
- man_pages = [
-- (master_doc, 'dasuboot', 'The U-Boot Documentation',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
- [author], 1)
- ]
-
-@@ -463,8 +463,8 @@ man_pages = [
- # (source start file, target name, title, author,
- # dir menu entry, description, category)
- texinfo_documents = [
-- (master_doc, 'DasUBoot', 'The U-Boot Documentation',
-- author, 'DasUBoot', 'One line description of project.',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
-+ author, 'U-Boot', 'Boot loader for embedded systems',
- 'Miscellaneous'),
- ]
-
-diff --git a/doc/media/Makefile b/doc/media/Makefile
-index b9b43a34c3..9b32258696 100644
---- a/doc/media/Makefile
-+++ b/doc/media/Makefile
-@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke
-
- # Media build rules
-
--.PHONY: all html epub xml latex
-+.PHONY: all html texinfo epub xml latex
-
- all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
- html: all
-+texinfo: all
- epub: all
- xml: all
- latex: $(IMGPDF) all
diff --git a/gnu/packages/patches/u-boot-patman-guix-integration.patch b/gnu/packages/patches/u-boot-patman-guix-integration.patch
deleted file mode 100644
index 3472656c99..0000000000
--- a/gnu/packages/patches/u-boot-patman-guix-integration.patch
+++ /dev/null
@@ -1,1244 +0,0 @@
-These changes correspond to commits 9ff7500ace..3154de3dd6 already merged to
-the u-boot-dm custodian repo (at
-https://source.denx.de/u-boot/custodians/u-boot-dm/-/commits/next), scheduled
-to be pulled after the next release.
-
-diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py
-index c9d3e35052..1b98ec7fee 100644
---- a/tools/patman/__init__.py
-+++ b/tools/patman/__init__.py
-@@ -1,6 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0+
-
- __all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess',
-- 'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream',
-+ 'func_test', 'get_maintainer', 'gitutil', '__main__', 'patchstream',
- 'project', 'series', 'setup', 'settings', 'terminal',
- 'test_checkpatch', 'test_util', 'tools', 'tout']
-diff --git a/tools/patman/main.py b/tools/patman/__main__.py
-similarity index 89%
-rename from tools/patman/main.py
-rename to tools/patman/__main__.py
-index 8067a288ab..749e6348b6 100755
---- a/tools/patman/main.py
-+++ b/tools/patman/__main__.py
-@@ -7,6 +7,7 @@
- """See README for more information"""
-
- from argparse import ArgumentParser
-+import importlib.resources
- import os
- import re
- import sys
-@@ -19,6 +20,7 @@ if __name__ == "__main__":
-
- # Our modules
- from patman import control
-+from patman import func_test
- from patman import gitutil
- from patman import project
- from patman import settings
-@@ -53,7 +55,8 @@ parser.add_argument('-H', '--full-help', action='store_true', dest='full_help',
- default=False, help='Display the README file')
-
- subparsers = parser.add_subparsers(dest='cmd')
--send = subparsers.add_parser('send')
-+send = subparsers.add_parser(
-+ 'send', help='Format, check and email patches (default command)')
- send.add_argument('-i', '--ignore-errors', action='store_true',
- dest='ignore_errors', default=False,
- help='Send patches email even if patch errors are found')
-@@ -62,6 +65,12 @@ send.add_argument('-l', '--limit-cc', dest='limit', type=int, default=None,
- send.add_argument('-m', '--no-maintainers', action='store_false',
- dest='add_maintainers', default=True,
- help="Don't cc the file maintainers automatically")
-+send.add_argument(
-+ '--get-maintainer-script', dest='get_maintainer_script', type=str,
-+ action='store',
-+ default=os.path.join(gitutil.get_top_level(), 'scripts',
-+ 'get_maintainer.pl') + ' --norolestats',
-+ help='File name of the get_maintainer.pl (or compatible) script.')
- send.add_argument('-n', '--dry-run', action='store_true', dest='dry_run',
- default=False, help="Do a dry run (create but don't email patches)")
- send.add_argument('-r', '--in-reply-to', type=str, action='store',
-@@ -94,9 +103,11 @@ send.add_argument('--smtp-server', type=str,
-
- send.add_argument('patchfiles', nargs='*')
-
--test_parser = subparsers.add_parser('test', help='Run tests')
--test_parser.add_argument('testname', type=str, default=None, nargs='?',
-- help="Specify the test to run")
-+# Only add the 'test' action if the test data files are available.
-+if os.path.exists(func_test.TEST_DATA_DIR):
-+ test_parser = subparsers.add_parser('test', help='Run tests')
-+ test_parser.add_argument('testname', type=str, default=None, nargs='?',
-+ help="Specify the test to run")
-
- status = subparsers.add_parser('status',
- help='Check status of patches in patchwork')
-@@ -113,7 +124,7 @@ status.add_argument('-f', '--force', action='store_true',
- argv = sys.argv[1:]
- args, rest = parser.parse_known_args(argv)
- if hasattr(args, 'project'):
-- settings.Setup(gitutil, parser, args.project, '')
-+ settings.Setup(parser, args.project)
- args, rest = parser.parse_known_args(argv)
-
- # If we have a command, it is safe to parse all arguments
-@@ -160,11 +171,8 @@ elif args.cmd == 'send':
- fd.close()
-
- elif args.full_help:
-- tools.print_full_help(
-- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
-- 'README.rst')
-- )
--
-+ with importlib.resources.path('patman', 'README.rst') as readme:
-+ tools.print_full_help(str(readme))
- else:
- # If we are not processing tags, no need to warning about bad ones
- if not args.process_tags:
-diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
-index d1b902dd96..012c0d895c 100644
---- a/tools/patman/checkpatch.py
-+++ b/tools/patman/checkpatch.py
-@@ -211,7 +211,7 @@ def check_patch(fname, verbose=False, show_types=False, use_tree=False):
- stdout: Full output of checkpatch
- """
- chk = find_check_patch()
-- args = [chk]
-+ args = [chk, '--u-boot', '--strict']
- if not use_tree:
- args.append('--no-tree')
- if show_types:
-diff --git a/tools/patman/control.py b/tools/patman/control.py
-index bf426cf7bc..38e98dab84 100644
---- a/tools/patman/control.py
-+++ b/tools/patman/control.py
-@@ -94,8 +94,8 @@ def check_patches(series, patch_files, run_checkpatch, verbose, use_tree):
-
-
- def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
-- ignore_bad_tags, add_maintainers, limit, dry_run, in_reply_to,
-- thread, smtp_server):
-+ ignore_bad_tags, add_maintainers, get_maintainer_script, limit,
-+ dry_run, in_reply_to, thread, smtp_server):
- """Email patches to the recipients
-
- This emails out the patches and cover letter using 'git send-email'. Each
-@@ -123,6 +123,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
- ignore_bad_tags (bool): True to just print a warning for unknown tags,
- False to halt with an error
- add_maintainers (bool): Run the get_maintainer.pl script for each patch
-+ get_maintainer_script (str): The script used to retrieve which
-+ maintainers to cc
- limit (int): Limit on the number of people that can be cc'd on a single
- patch or the cover letter (None if no limit)
-
This message was truncated. Download the full message here.
V
V
vagrant wrote on 9 Jul 2023 03:47
[PATCH 3/5] gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts.
(address . 64149@debbugs.gnu.org)
20230709014736.54114-3-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument
for System Control Processor (SCP) firmware.
[native-inputs]: Add SCP firmware.
[phases]: Adjust 'set-environment to also set SCP variable.
(u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate
crust firmware as the SCP firmware.
---
gnu/packages/bootloaders.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 8be5303a74..18f6398692 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1009,7 +1009,7 @@ (define-public u-boot-am335x-boneblack
(define-public u-boot-am335x-evm
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
-(define*-public (make-u-boot-sunxi64-package board triplet
+(define*-public (make-u-boot-sunxi64-package board triplet scpfirmware
#:key defconfig configs)
(let ((base (make-u-boot-package
board triplet #:defconfig defconfig #:configs configs)))
@@ -1021,22 +1021,24 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
- ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
- (setenv "SCP" "/dev/null")
+ (setenv "SCP" (search-input-file native-inputs "libexec/scp.bin"))
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base)
+ (append scpfirmware)))
(inputs
(modify-inputs (package-inputs base)
(append arm-trusted-firmware-sun50i-a64))))))
(define-public u-boot-pine64-plus
- (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" crust-pine64-plus))
(define-public u-boot-pine64-lts
- (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu" crust-pine64-plus))
(define-public u-boot-pinebook
(make-u-boot-sunxi64-package
- "pinebook" "aarch64-linux-gnu"
+ "pinebook" "aarch64-linux-gnu" crust-pinebook
;; Fix regression with LCD video output introduced in 2020.01
;; https://patchwork.ozlabs.org/patch/1225130/
#:configs '("CONFIG_VIDEO_BPP32=y")))
--
2.39.2
V
V
vagrant wrote on 9 Jul 2023 03:47
[PATCH 5/5] gnu: patman: Add python-u-boot-pylib to inputs.
(address . 64149@debbugs.gnu.org)
20230709014736.54114-5-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
---
gnu/packages/bootloaders.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 827894e447..9098b2a8e2 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -878,7 +878,7 @@ (define-public patman
(add-after 'unpack 'chdir
(lambda _
(chdir "tools/patman"))))))
- (inputs (list python-pygit2 python-requests))
+ (inputs (list python-pygit2 python-requests python-u-boot-pylib))
(synopsis "Patch automation tool")
(description "Patman is a patch automation script which:
@itemize
--
2.39.2
V
V
vagrant wrote on 9 Jul 2023 03:47
[PATCH 4/5] gnu: Add python-u-boot-pylib.
(address . 64149@debbugs.gnu.org)
20230709014736.54114-4-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (python-u-boot-pylib): New variable.
* gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 23 +++++++++++++++++-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index bb13280dc7..c12b29447d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1996,6 +1996,7 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
+ %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 18f6398692..827894e447 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -655,7 +655,8 @@ (define u-boot
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")
+ (search-patch "u-boot-fix-u-boot-lib-build.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
@@ -840,6 +841,26 @@ (define-public u-boot-tools
" This package provides board-independent tools "
"of U-Boot."))))
+(define-public python-u-boot-pylib
+ (package
+ (inherit u-boot)
+ (name "python-u-boot-pylib")
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "tools/u_boot_pylib")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./u_boot_pylib")))))))
+ (synopsis "U-Boot Python library")
+ (description "This package provides common Python code used by some of the
+commands part of the U-Boot project, such as Patman.")))
+
;;; This is packaged separately, as it can be used in other contexts than for
;;; U-Boot development.
(define-public patman
diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
new file mode 100644
index 0000000000..233c437de6
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
@@ -0,0 +1,24 @@
+Submitted upstream (see:
+https://lists.denx.de/pipermail/u-boot/2023-July/521984.html)
+
+diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml
+index 3f33caf6f8..037c5d629e 100644
+--- a/tools/u_boot_pylib/pyproject.toml
++++ b/tools/u_boot_pylib/pyproject.toml
+@@ -9,7 +9,7 @@ authors = [
+ { name="Simon Glass", email="sjg@chromium.org" },
+ ]
+ description = "U-Boot python library"
+-readme = "README.md"
++readme = "README.rst"
+ requires-python = ">=3.7"
+ classifiers = [
+ "Programming Language :: Python :: 3",
+@@ -20,3 +20,7 @@ classifiers = [
+ [project.urls]
+ "Homepage" = "https://u-boot.readthedocs.io"
+ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
++
++[tool.setuptools.packages.find]
++where = [".."]
++include = ["u_boot_pylib*"]
--
2.39.2
V
V
Vagrant Cascadian wrote on 9 Jul 2023 04:36
Re: [PATCH 2/2] gnu: patman: Add python-u-boot-pylib to inputs.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87wmz9g6ak.fsf@wireframe
On 2023-07-08, Vagrant Cascadian wrote:
Toggle quote (10 lines)
> On 2023-07-08, Maxim Cournoyer wrote:
> starting phase `sanity-check' validating 'patch-manager' /gnu/store/d22rsfa7pr8ff6ai1hp72qjljiyayzrx-patman-2023.07-rc6/lib/python3.10/site-packages
> ...checking requirements: OK ...trying to load module patman: OK ...trying to load endpoint console_scripts patman: ERROR:
> Traceback (most recent call last): File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, in run_pipe
> last_pipe = cros_subprocess.Popen(cmd, cwd=cwd, **kwargs) File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", line 83, in __init__
> super(Popen, self).__init__(args, stdin=stdin, File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 969, in __init__ self._execute_child(args, executable, preexec_fn, close_fds,
> File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 1845, in _execute_child
> raise child_exception_type(errno_num, err_msg, err_filename)
> FileNotFoundError: [Errno 2] No such file or directory: 'git'

Adding git to inputs or native inputs avoided that part... but still
ends with an error:

...trying to load endpoint console_scripts patman: ERROR:
Traceback (most recent call last):
File "/gnu/store/iqsjkp55pcx5bfcp2jm9yj5rlx9a0whd-sanity-check.py", line 89, in <module>
ep.load()
File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2471
, in load
return self.resolve()
File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2477
, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/gnu/store/v76an72qxvclc5qy46bddin3rcljka2f-patman-2023.07-rc6/lib/python3.10/site-packages/patman/__main__.py", line 47, in
<module>
parser.add_argument('-p', '--project', default=project.detect_project(),
File "/gnu/store/v76an72qxvclc5qy46bddin3rcljka2f-patman-2023.07-rc6/lib/python3.10/site-packages/patman/project.py", line 19, in
detect_project
top_level = gitutil.get_top_level()
File "/gnu/store/v76an72qxvclc5qy46bddin3rcljka2f-patman-2023.07-rc6/lib/python3.10/site-packages/patman/gitutil.py", line 627, in
get_top_level
return command.output_one_line('git', 'rev-parse', '--show-toplevel')
File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/comman
d.py", line 128, in output_one_line
result = run_pipe([cmd], capture=True, oneline=True,
File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/comman
d.py", line 112, in run_pipe
raise Exception("Error running '%s'" % user_pipestr)
Exception: Error running 'git rev-parse --show-toplevel'
error: in phase 'sanity-check': uncaught exception:


It seems to be running git on some repository that presumably does not
exist?


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKodIwAKCRDcUY/If5cW
qnMAAPsHb/4mfT8Md8ZafPfMfyacOxziAExaeasHZNM9JqaUFgD+LyOcu2ItOOpb
X20yUmIqQqYSv1A9oLpEcG6FKa3q+gs=
=SuAk
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 10 Jul 2023 06:01
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87cz10xvn3.fsf@gmail.com
Hi Vagrant,

Vagrant Cascadian <vagrant@debian.org> writes:

Toggle quote (24 lines)
> On 2023-07-08, Maxim Cournoyer wrote:
>> * gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
>> ---
>> gnu/packages/bootloaders.scm | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
>> index c1a76ab90e..789248afeb 100644
>> --- a/gnu/packages/bootloaders.scm
>> +++ b/gnu/packages/bootloaders.scm
>> @@ -869,7 +869,7 @@ (define-public patman
>> (add-after 'unpack 'chdir
>> (lambda _
>> (chdir "tools/patman"))))))
>> - (inputs (list python-pygit2 python-requests))
>> + (inputs (list python-pygit2 python-requests python-u-boot-pylib))
>> (synopsis "Patch automation tool")
>> (description "Patman is a patch automation script which:
>> @itemize
>> --
>> 2.40.1
>
> This was not sufficient to get patman building again:

Oh, indeed, seems I hadn't gone to that point in my testing.

Toggle quote (8 lines)
> starting phase `sanity-check' validating 'patch-manager' /gnu/store/d22rsfa7pr8ff6ai1hp72qjljiyayzrx-patman-2023.07-rc6/lib/python3.10/site-packages
> ...checking requirements: OK ...trying to load module patman: OK ...trying to load endpoint console_scripts patman: ERROR:
> Traceback (most recent call last): File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, in run_pipe
> last_pipe = cros_subprocess.Popen(cmd, cwd=cwd, **kwargs) File "/gnu/store/rlf99syqlc9kyf76rba3sbxsafszf017-python-u-boot-pylib-2023.07-rc6/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", line 83, in __init__
> super(Popen, self).__init__(args, stdin=stdin, File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 969, in __init__ self._execute_child(args, executable, preexec_fn, close_fds,
> File "/gnu/store/kj6wzba6p192baizq99b489rs8bynpn7-python-3.10.7/lib/python3.10/subprocess.py", line 1845, in _execute_child
> raise child_exception_type(errno_num, err_msg, err_filename)
> FileNotFoundError: [Errno 2] No such file or directory: 'git'
I've made a patch to patman so that it falls back to use the current
working directory when git or its metadata is unavailable, but I still
got this error in the sanity-check phase:

Toggle snippet (19 lines)
phase `check' succeeded after 0.0 seconds
starting phase `sanity-check'
usage: iqsjkp55pcx5bfcp2jm9yj5rlx9a0whd-sanity-check.py [-h] [-b BRANCH]
[-c COUNT] [-e END]
[-D] [-p PROJECT]
[-P PATCHWORK_URL]
[-s START] [-v] [-H]
{send,status} ...
iqsjkp55pcx5bfcp2jm9yj5rlx9a0whd-sanity-check.py: error: argument cmd: invalid choice: '/gnu/store/caxygz92s8zf7lk7a58d2yr873hzx46w-patman-2023.07-rc6/lib/python3.10/site-packages' (choose from 'send', 'status')
validating 'patch-manager' /gnu/store/caxygz92s8zf7lk7a58d2yr873hzx46w-patman-2023.07-rc6/lib/python3.10/site-packages
...checking requirements: OK
...trying to load module patman: OK
...trying to load endpoint console_scripts patman: failed to retrieve top level via git; using CWD
failed to retrieve top level via git; using CWD
error: in phase 'sanity-check': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("/gnu/store/iqsjkp55pcx5bfcp2jm9yj5rlx9a0whd-sanity-check.py" "/gnu/store/caxygz92s8zf7lk7a58d2yr873hzx46w-patman-2023.07-rc6/lib/python3.10/site-packages") exit-status: 2 term-signal: #f stop-signal: #f>
phase `sanity-check' failed after 0.2 seconds

Perhaps for the time being deleting that phase with an explanatory
comment would be the best course of action.

--
Thanks,
Maxim
V
V
Vagrant Cascadian wrote on 10 Jul 2023 21:35
Re: [PATCH 2/5] gnu: u-boot: Update to 2023.07-rc6.
(address . 64149@debbugs.gnu.org)
87ilar5zl2.fsf@wireframe
On 2023-07-08, vagrant@debian.org wrote:
Toggle quote (9 lines)
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
> (define u-boot
> (package
> (name "u-boot")
> - (version "2022.10")
> + (version "2023.07-rc6")

And 2023.07 is out!


Toggle quote (5 lines)
> (sha256
> (base32
> - "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
> + "1dgvr228imbhzq7vzr8iialijl3k4mhjdirjrm6hsy6qbm6jyj5r"))))

With the hash 002375xvmalqdy4gkvpc3aq91g12gwmq7rjmqgdiqwxfcss23s8j

All still built fine for me except patman...


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKxdmgAKCRDcUY/If5cW
qkrDAQCuPXpdkKV7f/rVOQlwjige2O38cdSVXnDt3O9e7oHQBwEAmlNm2ErmJqUH
jKNfVPkXI0GH+vm4qC+XVC+A/zEcYwI=
=bL9t
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 10 Jul 2023 21:39
Re: [PATCH 5/5] gnu: patman: Add python-u-boot-pylib to inputs.
(address . 64149@debbugs.gnu.org)
87edlf5zel.fsf@wireframe
On 2023-07-08, vagrant@debian.org wrote:
Toggle quote (4 lines)
> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
>
> * gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.

So I did successfully build with 'sanity-check removed.

I tried creating a little git playground for patman to run the patman
self-tests with, but 'sanity-check ended up in some other directory and
still failed.

Even "patman --help" spits out this ugly traceback if it is not run from
inside a working git directory...

Soo.... maybe deleting 'sanity-check is the way to go here? Not sure
what else we would be missing...

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZKxegwAKCRDcUY/If5cW
qqXtAP9D5C4ba3zeQgEq+jxTubumIB7smsT+ugZvut++wcdKPAEA6/L/i+yEUlME
pmI5oHEX4UONxAj87KMA62v4rC/6Ug8=
=M7XZ
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 12 Jul 2023 16:49
[PATCH v3 0/6] Update u-boot to 2023.07.02
(address . 64149@debbugs.gnu.org)
874jm95gmz.fsf@wireframe
Changes since v2:

* Update to 2023.07.02.
* Drop sanity-check phase for patman build.

Maxim Cournoyer (2):
gnu: Add python-u-boot-pylib.
gnu: patman: Add python-u-boot-pylib to inputs.

Vagrant Cascadian (4):
gnu: arm-trusted-firmware: Update to 2.9.
gnu: u-boot: Update to 2023.07.02.
gnu: u-boot: Add crust firmware to pinebook, pine64_plus and
pine64-lts.
(patman)[phases]: Remove 'sanity-check.

gnu/local.mk | 3 +-
gnu/packages/bootloaders.scm | 91 +-
gnu/packages/firmware.scm | 4 +-
.../u-boot-allow-disabling-openssl.patch | 13 +-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +
.../patches/u-boot-infodocs-target.patch | 84 --
.../u-boot-patman-guix-integration.patch | 1244 -----------------
...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
8 files changed, 113 insertions(+), 1358 deletions(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch


base-commit: 713d3952e4872ed025e3068d0ece759c780b2f6d
--
2.39.2
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZK69hAAKCRDcUY/If5cW
qpsKAP97DuzUj5uRyaIHT94G5Ln27ACR8V63oJFQscze7hL1nwEAvawJzEMH0fEW
+J9Gk+WHQ7cUrVrbpeBq+klBbwhoJgo=
=wedm
-----END PGP SIGNATURE-----

V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 1/6] gnu: arm-trusted-firmware: Update to 2.9.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-1-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/firmware.scm (make-arm-trusted-firmware): Update to 2.9.
---
gnu/packages/firmware.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 3dcc882e0c..0492dabeed 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1025,7 +1025,7 @@ (define* (make-arm-trusted-firmware platform
(gnu-triplet->nix-system triplet))))))
(package
(name (string-append "arm-trusted-firmware-" platform))
- (version "2.8")
+ (version "2.9")
(source
(origin
(method git-fetch)
@@ -1036,7 +1036,7 @@ (define* (make-arm-trusted-firmware platform
(file-name (git-file-name "arm-trusted-firmware" version))
(sha256
(base32
- "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))
+ "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
(snippet
#~(begin
(use-modules (guix build utils))
--
2.39.2
V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 2/6] gnu: u-boot: Update to 2023.07.02.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-2-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/patches/u-boot-infodocs-target.patch: Delete file.
* gnu/packages/patches/u-boot-patman-guix-integration.patch: Delete file.
* gnu/local.mk: De-register patches.
* gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
* gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
* gnu/packages/bootloaders.scm (u-boot): Update to 2023.07.02.
[native-inputs]: Add python-pyelftools.
[source]: Remove patches.
(u-boot-tools)[phases]: Update substitution for python3-coverage.
Adjust 'patch to catch more openssl incompatibilities.
Split lines in 'patch phase.
[native-inputs]: Add python-filelock and python-pytest-xdist.
(make-u-boot-sunxi64-package): Set SCP environment variable.
(u-boot-sifive-unleashed): Update to use opensbi.
(u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
package-inputs instead of native-inputs.
(u-boot-rockpro64-rk3399)[phases]: Add 'disable-spl-fit-signature.
---
gnu/local.mk | 2 -
gnu/packages/bootloaders.scm | 57 +-
.../u-boot-allow-disabling-openssl.patch | 13 +-
.../patches/u-boot-infodocs-target.patch | 84 --
.../u-boot-patman-guix-integration.patch | 1244 -----------------
...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
6 files changed, 56 insertions(+), 1352 deletions(-)
delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch

Toggle diff (387 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c817c9c926..0e0087b6aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1999,8 +1999,6 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
- %D%/packages/patches/u-boot-infodocs-target.patch \
- %D%/packages/patches/u-boot-patman-guix-integration.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 01fd1093ff..d1633b2b70 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
(define u-boot
(package
(name "u-boot")
- (version "2022.10")
+ (version "2023.07.02")
(source (origin
(patches
(list %u-boot-rockchip-inno-usb-patch
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")
- (search-patch "u-boot-infodocs-target.patch")
- (search-patch "u-boot-patman-guix-integration.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
"u-boot-" version ".tar.bz2"))
(sha256
(base32
- "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
+ "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb"))))
(build-system gnu-build-system)
(native-inputs
(list bison
@@ -676,6 +674,7 @@ (define u-boot
perl
pkg-config ;for 'make menuconfig'
python
+ python-pyelftools
swig
(list util-linux "lib")))
(home-page "https://www.denx.de/wiki/U-Boot/")
@@ -726,7 +725,12 @@ (define-public u-boot-tools
(name "u-boot-tools")
(native-inputs
(modify-inputs (package-native-inputs u-boot)
- (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
+ (prepend python-coverage
+ python-filelock
+ python-pycryptodomex
+ python-pytest
+ python-pytest-xdist
+ sdl2)))
(arguments
`(#:make-flags '("HOSTCC=gcc")
#:test-target "tcheck"
@@ -739,7 +743,7 @@ (define-public u-boot-tools
(("/bin/false") (which "false")))
(substitute* "tools/dtoc/fdt_util.py"
(("'cc'") "'gcc'"))
- (substitute* "tools/patman/test_util.py"
+ (substitute* "tools/u_boot_pylib/test_util.py"
;; python3-coverage is simply called coverage in guix.
(("python3-coverage") "coverage")
@@ -777,7 +781,15 @@ (define-public u-boot-tools
;; See https://bugs.gnu.org/34717 for
;; details.
(("CONFIG_FIT_SIGNATURE=y")
- "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
+ "CONFIG_FIT_SIGNATURE=n
+CONFIG_UT_LIB_ASN1=n
+CONFIG_TOOLS_LIBCRYPTO=n")
+ ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
+ (("CONFIG_SANDBOX_VPL=y")
+ "CONFIG_SANDBOX_VPL=y
+CONFIG_FIT_SIGNATURE=n
+CONFIG_VPL_FIT_SIGNATURE=n
+CONFIG_TOOLS_LIBCRYPTO=n")
;; This test requires a sound system, which is un-used
;; in u-boot-tools.
(("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
@@ -1009,6 +1021,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
+ ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
+ (setenv "SCP" "/dev/null")
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
(inputs
(modify-inputs (package-inputs base)
@@ -1104,7 +1118,7 @@ (define-public u-boot-puma-rk3399
(delete 'strip)
(delete 'validate-runpath)))))
(inputs
- (modify-inputs (package-native-inputs base)
+ (modify-inputs (package-inputs base)
(append arm-trusted-firmware-rk3399))))))
(define-public u-boot-qemu-arm
@@ -1170,7 +1184,20 @@ (define-public u-boot-sandbox
(append sdl2))))))
(define-public u-boot-sifive-unleashed
- (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
+ (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "OPENSBI" (search-input-file inputs
+ "fw_dynamic.bin"))))))))
+ (inputs
+ (modify-inputs (package-inputs base)
+ (append opensbi-generic))))))
(define-public u-boot-sifive-unmatched
(let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
@@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
"CONFIG_SATA_SIL=y"
"CONFIG_SCSI=y"
"CONFIG_SCSI_AHCI=y"
- "CONFIG_DM_SCSI=y"))))
+ "CONFIG_DM_SCSI=y"
+ "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
(package
(inherit base)
(arguments
@@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "BL31" (search-input-file inputs "/bl31.elf"))))
+ ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
+ ;; incompatibilities
+ (add-after 'unpack 'disable-spl-fit-signature
+ (lambda _
+ (substitute* "configs/rockpro64-rk3399_defconfig"
+ (("CONFIG_SPL_FIT_SIGNATURE=y")
+ "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
(add-after 'unpack 'patch-header
(lambda _
(substitute* "include/config_distro_bootcmd.h"
diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
index 5f2856dbb4..5195a7a6f8 100644
--- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
+++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
@@ -128,29 +128,28 @@ index 94b7685392..eec599b0ee 100644
datai = 0;
for (cfgi = 0; cfgi < cfgn; cfgi++) {
e = &image_cfg[cfgi];
-@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+@@ -1624,10 +1640,12 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params,
&datai, delay);
}
+#if defined(CONFIG_KWB_SECURE)
- if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz,
- headersz, image, secure_hdr))
+ if (secure_hdr && add_secure_header_v1(params, ptr + *dataoff, payloadsz,
+ image, headersz, secure_hdr))
return NULL;
+#endif
- *imagesz = headersz;
+ /* Calculate and set the header checksum */
+ main_hdr->checksum = image_checksum8(main_hdr, headersz);
--- a/tools/image-host.c
+++ b/tools/image-host.c
-@@ -14,10 +14,12 @@
+@@ -14,8 +14,10 @@
#include <image.h>
#include <version.h>
+#ifdef CONFIG_FIT_PRELOAD
#include <openssl/pem.h>
#include <openssl/evp.h>
-
- #define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig"
+#endif
/**
diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch
deleted file mode 100644
index 5b21a99de3..0000000000
--- a/gnu/packages/patches/u-boot-infodocs-target.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333259
-
-diff --git a/Makefile b/Makefile
-index de5746399a..597a8886c3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2372,7 +2372,7 @@ tcheck:
- # Documentation targets
- # ---------------------------------------------------------------------------
- DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
-- linkcheckdocs dochelp refcheckdocs
-+ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
- PHONY += $(DOC_TARGETS)
- $(DOC_TARGETS): scripts_basic FORCE
- $(Q)$(MAKE) $(build)=doc $@
-diff --git a/doc/Makefile b/doc/Makefile
-index f5de65e927..d0904a9f99 100644
---- a/doc/Makefile
-+++ b/doc/Makefile
-@@ -69,6 +69,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
- htmldocs:
- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
-
-+texinfodocs:
-+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
-+
-+# Note: the 'info' Make target is generated by sphinx itself when
-+# running the texinfodocs target defined above.
-+infodocs: texinfodocs
-+ $(MAKE) -C $(BUILDDIR)/texinfo info
-+
- linkcheckdocs:
- @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
-
-@@ -109,6 +117,8 @@ cleandocs:
- dochelp:
- @echo ' U-Boot documentation in different formats from ReST:'
- @echo ' htmldocs - HTML'
-+ @echo ' texinfodocs - Texinfo'
-+ @echo ' infodocs - Info'
- @echo ' latexdocs - LaTeX'
- @echo ' pdfdocs - PDF'
- @echo ' epubdocs - EPUB'
-diff --git a/doc/conf.py b/doc/conf.py
-index 62c8d31270..3db70f80c1 100644
---- a/doc/conf.py
-+++ b/doc/conf.py
-@@ -449,7 +449,7 @@ for fn in os.listdir('.'):
- # One entry per manual page. List of tuples
- # (source start file, name, description, authors, manual section).
- man_pages = [
-- (master_doc, 'dasuboot', 'The U-Boot Documentation',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
- [author], 1)
- ]
-
-@@ -463,8 +463,8 @@ man_pages = [
- # (source start file, target name, title, author,
- # dir menu entry, description, category)
- texinfo_documents = [
-- (master_doc, 'DasUBoot', 'The U-Boot Documentation',
-- author, 'DasUBoot', 'One line description of project.',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
-+ author, 'U-Boot', 'Boot loader for embedded systems',
- 'Miscellaneous'),
- ]
-
-diff --git a/doc/media/Makefile b/doc/media/Makefile
-index b9b43a34c3..9b32258696 100644
---- a/doc/media/Makefile
-+++ b/doc/media/Makefile
-@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke
-
- # Media build rules
-
--.PHONY: all html epub xml latex
-+.PHONY: all html texinfo epub xml latex
-
- all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
- html: all
-+texinfo: all
- epub: all
- xml: all
- latex: $(IMGPDF) all
diff --git a/gnu/packages/patches/u-boot-patman-guix-integration.patch b/gnu/packages/patches/u-boot-patman-guix-integration.patch
deleted file mode 100644
index 3472656c99..0000000000
--- a/gnu/packages/patches/u-boot-patman-guix-integration.patch
+++ /dev/null
@@ -1,1244 +0,0 @@
-These changes correspond to commits 9ff7500ace..3154de3dd6 already merged to
-the u-boot-dm custodian repo (at
-https://source.denx.de/u-boot/custodians/u-boot-dm/-/commits/next), scheduled
-to be pulled after the next release.
-
-diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py
-index c9d3e35052..1b98ec7fee 100644
---- a/tools/patman/__init__.py
-+++ b/tools/patman/__init__.py
-@@ -1,6 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0+
-
- __all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess',
-- 'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream',
-+ 'func_test', 'get_maintainer', 'gitutil', '__main__', 'patchstream',
- 'project', 'series', 'setup', 'settings', 'terminal',
- 'test_checkpatch', 'test_util', 'tools', 'tout']
-diff --git a/tools/patman/main.py b/tools/patman/__main__.py
-similarity index 89%
-rename from tools/patman/main.py
-rename to tools/patman/__main__.py
-index 8067a288ab..749e6348b6 100755
---- a/tools/patman/main.py
-+++ b/tools/patman/__main__.py
-@@ -7,6 +7,7 @@
- """See README for more information"""
-
- from argparse import ArgumentParser
-+import importlib.resources
- import os
- import re
- import sys
-@@ -19,6 +20,7 @@ if __name__ == "__main__":
-
- # Our modules
- from patman import control
-+from patman import func_test
- from patman import gitutil
- from patman import project
- from patman import settings
-@@ -53,7 +55,8 @@ parser.add_argument('-H', '--full-help', action='store_true', dest='full_help',
- default=False, help='Display the README file')
-
- subparsers = parser.add_subparsers(dest='cmd')
--send = subparsers.add_parser('send')
-+send = subparsers.add_parser(
-+ 'send', help='Format, check and email patches (default command)')
- send.add_argument('-i', '--ignore-errors', action='store_true',
- dest='ignore_errors', default=False,
- help='Send patches email even if patch errors are found')
-@@ -62,6 +65,12 @@ send.add_argument('-l', '--limit-cc', dest='limit', type=int, default=None,
- send.add_argument('-m', '--no-maintainers', action='store_false',
- dest='add_maintainers', default=True,
- help="Don't cc the file maintainers automatically")
-+send.add_argument(
-+ '--get-maintainer-script', dest='get_maintainer_script', type=str,
-+ action='store',
-+ default=os.path.join(gitutil.get_top_level(), 'scripts',
-+ 'get_maintainer.pl') + ' --norolestats',
-+ help='File name of the get_maintainer.pl (or compatible) script.')
- send.add_argument('-n', '--dry-run', action='store_true', dest='dry_run',
- default=False, help="Do a dry run (create but don't email patches)")
- send.add_argument('-r', '--in-reply-to', type=str, action='store',
-@@ -94,9 +103,11 @@ send.add_argument('--smtp-server', type=str,
-
- send.add_argument('patchfiles', nargs='*')
-
--test_parser = subparsers.add_parser('test', help='Run tests')
--test_parser.add_argument('testname', type=str, default=None, nargs='?',
-- help="Specify the test to run")
-+# Only add the 'test' action if the test data files are available.
-+if os.path.exists(func_test.TEST_DATA_DIR):
-+ test_parser = subparsers.add_parser('test', help='Run tests')
-+ test_parser.add_argument('testname', type=str, default=None, nargs='?',
-+ help="Specify the test to run")
-
- status = subparsers.add_parser('status',
- help='Check status of patches in patchwork')
-@@ -113,7 +124,7 @@ status.add_argument('-f', '--force', action='store_true',
- argv = sys.argv[1:]
- args, rest = parser.parse_known_args(argv)
- if hasattr(args, 'project'):
-- settings.Setup(gitutil, parser, args.project, '')
-+ settings.Setup(parser, args.project)
- args, rest = parser.parse_known_args(argv)
-
- # If we have a command, it is safe to parse all arguments
-@@ -160,11 +171,8 @@ elif args.cmd == 'send':
- fd.close()
-
- elif args.full_help:
-- tools.print_full_help(
-- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
-- 'README.rst')
-- )
--
-+ with importlib.resources.path('patman', 'README.rst') as readme:
-+ tools.print_full_help(str(readme))
- else:
- # If we are not processing tags, no need to warning about bad ones
- if not args.process_tags:
-diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
-index d1b902dd96..012c0d895c 100644
---- a/tools/patman/checkpatch.py
-+++ b/tools/patman/checkpatch.py
-@@ -211,7 +211,7 @@ def check_patch(fname, verbose=False, show_types=False, use_tree=False):
- stdout: Full output of checkpatch
- """
- chk = find_check_patch()
-- args = [chk]
-+ args = [chk, '--u-boot', '--strict']
- if not use_tree:
- args.append('--no-tree')
- if show_types:
-diff --git a/tools/patman/control.py b/tools/patman/control.py
-index bf426cf7bc..38e98dab84 100644
---- a/tools/patman/control.py
-+++ b/tools/patman/control.py
-@@ -94,8 +94,8 @@ def check_patches(series, patch_files, run_checkpatch, verbose, use_tree):
-
-
- def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
-- ignore_bad_tags, add_maintainers, limit, dry_run, in_reply_to,
-- thread, smtp_server):
-+ ignore_bad_tags, add_maintainers, get_maintainer_script, limit,
-+ dry_run, in_reply_to, thread, smtp_server):
- """Email patches to the recipients
-
- This emails out the patches and cover letter using 'git send-email'. Each
-@@ -123,6 +123,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
- ignore_bad_tags (bool): True to just print a warning for unknown tags,
- False to halt with an error
- add_maintainers (bool): Run the get_maintainer.pl script for each patch
-+ get_maintainer_script (str): The script used to retrieve which
-+ maintainers to cc
- limit (int): Limit on the number of people that can be cc'd on a single
- patch or the cover letter (None if no limit)
-
This message was truncated. Download the full message here.
V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 3/6] gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-3-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument
for System Control Processor (SCP) firmware.
[native-inputs]: Add SCP firmware.
[phases]: Adjust 'set-environment to also set SCP variable.
(u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate
crust firmware as the SCP firmware.
---
gnu/packages/bootloaders.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index d1633b2b70..afea47b457 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1009,7 +1009,7 @@ (define-public u-boot-am335x-boneblack
(define-public u-boot-am335x-evm
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
-(define*-public (make-u-boot-sunxi64-package board triplet
+(define*-public (make-u-boot-sunxi64-package board triplet scpfirmware
#:key defconfig configs)
(let ((base (make-u-boot-package
board triplet #:defconfig defconfig #:configs configs)))
@@ -1021,22 +1021,24 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
- ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
- (setenv "SCP" "/dev/null")
+ (setenv "SCP" (search-input-file native-inputs "libexec/scp.bin"))
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base)
+ (append scpfirmware)))
(inputs
(modify-inputs (package-inputs base)
(append arm-trusted-firmware-sun50i-a64))))))
(define-public u-boot-pine64-plus
- (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" crust-pine64-plus))
(define-public u-boot-pine64-lts
- (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu" crust-pine64-plus))
(define-public u-boot-pinebook
(make-u-boot-sunxi64-package
- "pinebook" "aarch64-linux-gnu"
+ "pinebook" "aarch64-linux-gnu" crust-pinebook
;; Fix regression with LCD video output introduced in 2020.01
;; https://patchwork.ozlabs.org/patch/1225130/
#:configs '("CONFIG_VIDEO_BPP32=y")))
--
2.39.2
V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 5/6] gnu: patman: Add python-u-boot-pylib to inputs.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-5-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
---
gnu/packages/bootloaders.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 704d607b79..f9abef49d6 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -878,7 +878,7 @@ (define-public patman
(add-after 'unpack 'chdir
(lambda _
(chdir "tools/patman"))))))
- (inputs (list python-pygit2 python-requests))
+ (inputs (list python-pygit2 python-requests python-u-boot-pylib))
(synopsis "Patch automation tool")
(description "Patman is a patch automation script which:
@itemize
--
2.39.2
V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 4/6] gnu: Add python-u-boot-pylib.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-4-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (python-u-boot-pylib): New variable.
* gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 23 +++++++++++++++++-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 0e0087b6aa..151f38c60f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1999,6 +1999,7 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
+ %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index afea47b457..704d607b79 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -655,7 +655,8 @@ (define u-boot
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")
+ (search-patch "u-boot-fix-u-boot-lib-build.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
@@ -840,6 +841,26 @@ (define-public u-boot-tools
" This package provides board-independent tools "
"of U-Boot."))))
+(define-public python-u-boot-pylib
+ (package
+ (inherit u-boot)
+ (name "python-u-boot-pylib")
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "tools/u_boot_pylib")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./u_boot_pylib")))))))
+ (synopsis "U-Boot Python library")
+ (description "This package provides common Python code used by some of the
+commands part of the U-Boot project, such as Patman.")))
+
;;; This is packaged separately, as it can be used in other contexts than for
;;; U-Boot development.
(define-public patman
diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
new file mode 100644
index 0000000000..233c437de6
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
@@ -0,0 +1,24 @@
+Submitted upstream (see:
+https://lists.denx.de/pipermail/u-boot/2023-July/521984.html)
+
+diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml
+index 3f33caf6f8..037c5d629e 100644
+--- a/tools/u_boot_pylib/pyproject.toml
++++ b/tools/u_boot_pylib/pyproject.toml
+@@ -9,7 +9,7 @@ authors = [
+ { name="Simon Glass", email="sjg@chromium.org" },
+ ]
+ description = "U-Boot python library"
+-readme = "README.md"
++readme = "README.rst"
+ requires-python = ">=3.7"
+ classifiers = [
+ "Programming Language :: Python :: 3",
+@@ -20,3 +20,7 @@ classifiers = [
+ [project.urls]
+ "Homepage" = "https://u-boot.readthedocs.io"
+ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
++
++[tool.setuptools.packages.find]
++where = [".."]
++include = ["u_boot_pylib*"]
--
2.39.2
V
V
vagrant wrote on 12 Jul 2023 16:52
[PATCH v3 6/6] (patman)[phases]: Remove 'sanity-check.
(address . 64149@debbugs.gnu.org)
20230712145206.298746-6-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

---
gnu/packages/bootloaders.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index f9abef49d6..3c1402ae58 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -875,6 +875,9 @@ (define-public patman
#:tests? #f
#:phases
#~(modify-phases %standard-phases
+ ;; Patman fails to run during 'sanity-check phase, as it needs to be
+ ;; run within a git directory.
+ (delete 'sanity-check)
(add-after 'unpack 'chdir
(lambda _
(chdir "tools/patman"))))))
--
2.39.2
V
V
Vagrant Cascadian wrote on 13 Jul 2023 15:52
Update u-boot to 2023.07.02
(address . control@debbugs.gnu.org)(address . 64149@debbugs.gnu.org)
874jm75370.fsf@wireframe
retitle 64149 Update u-boot to 2023.07.02
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZLABkwAKCRDcUY/If5cW
qqiOAP9CE4DycXwUbmYLTYJVNajiVWIZblr4J5A2Szhq5T4aCQEAyUeJdCKb6Q+e
eqM/Dx/CkmR1UPrvJj5mJTC4j2HbFgE=
=jliL
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 15 Jul 2023 04:31
Re: [PATCH v3 1/6] gnu: arm-trusted-firmware: Update to 2.9.
(address . vagrant@debian.org)
87edl9x5vr.fsf@gmail.com
Hi,

vagrant@debian.org writes:

Toggle quote (30 lines)
> From: Vagrant Cascadian <vagrant@debian.org>
>
> * gnu/packages/firmware.scm (make-arm-trusted-firmware): Update to 2.9.
> ---
> gnu/packages/firmware.scm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
> index 3dcc882e0c..0492dabeed 100644
> --- a/gnu/packages/firmware.scm
> +++ b/gnu/packages/firmware.scm
> @@ -1025,7 +1025,7 @@ (define* (make-arm-trusted-firmware platform
> (gnu-triplet->nix-system triplet))))))
> (package
> (name (string-append "arm-trusted-firmware-" platform))
> - (version "2.8")
> + (version "2.9")
> (source
> (origin
> (method git-fetch)
> @@ -1036,7 +1036,7 @@ (define* (make-arm-trusted-firmware platform
> (file-name (git-file-name "arm-trusted-firmware" version))
> (sha256
> (base32
> - "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))
> + "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
> (snippet
> #~(begin
> (use-modules (guix build utils))

This one LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 15 Jul 2023 04:42
Re: [PATCH v3 2/6] gnu: u-boot: Update to 2023.07.02.
(address . vagrant@debian.org)
87a5vxx5dc.fsf@gmail.com
Hello,

vagrant@debian.org writes:

Toggle quote (93 lines)
> From: Vagrant Cascadian <vagrant@debian.org>
>
> * gnu/packages/patches/u-boot-infodocs-target.patch: Delete file.
> * gnu/packages/patches/u-boot-patman-guix-integration.patch: Delete file.
> * gnu/local.mk: De-register patches.
> * gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
> * gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
> * gnu/packages/bootloaders.scm (u-boot): Update to 2023.07.02.
> [native-inputs]: Add python-pyelftools.
> [source]: Remove patches.
> (u-boot-tools)[phases]: Update substitution for python3-coverage.
> Adjust 'patch to catch more openssl incompatibilities.
> Split lines in 'patch phase.
> [native-inputs]: Add python-filelock and python-pytest-xdist.
> (make-u-boot-sunxi64-package): Set SCP environment variable.
> (u-boot-sifive-unleashed): Update to use opensbi.
> (u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
> package-inputs instead of native-inputs.
> (u-boot-rockpro64-rk3399)[phases]: Add 'disable-spl-fit-signature.
> ---
> gnu/local.mk | 2 -
> gnu/packages/bootloaders.scm | 57 +-
> .../u-boot-allow-disabling-openssl.patch | 13 +-
> .../patches/u-boot-infodocs-target.patch | 84 --
> .../u-boot-patman-guix-integration.patch | 1244 -----------------
> ...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
> 6 files changed, 56 insertions(+), 1352 deletions(-)
> delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
> delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index c817c9c926..0e0087b6aa 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1999,8 +1999,6 @@ dist_patch_DATA = \
> %D%/packages/patches/twinkle-bcg729.patch \
> %D%/packages/patches/u-boot-allow-disabling-openssl.patch \
> %D%/packages/patches/u-boot-fix-build-python-3.10.patch \
> - %D%/packages/patches/u-boot-infodocs-target.patch \
> - %D%/packages/patches/u-boot-patman-guix-integration.patch \
> %D%/packages/patches/u-boot-nintendo-nes-serial.patch \
> %D%/packages/patches/u-boot-rockchip-inno-usb.patch \
> %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index 01fd1093ff..d1633b2b70 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
> (define u-boot
> (package
> (name "u-boot")
> - (version "2022.10")
> + (version "2023.07.02")
> (source (origin
> (patches
> (list %u-boot-rockchip-inno-usb-patch
> %u-boot-allow-disabling-openssl-patch
> %u-boot-sifive-prevent-relocating-initrd-fdt
> %u-boot-rk3399-enable-emmc-phy-patch
> - (search-patch "u-boot-fix-build-python-3.10.patch")
> - (search-patch "u-boot-infodocs-target.patch")
> - (search-patch "u-boot-patman-guix-integration.patch")))
> + (search-patch "u-boot-fix-build-python-3.10.patch")))
> (method url-fetch)
> (uri (string-append
> "https://ftp.denx.de/pub/u-boot/"
> "u-boot-" version ".tar.bz2"))
> (sha256
> (base32
> - "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
> + "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb"))))
> (build-system gnu-build-system)
> (native-inputs
> (list bison
> @@ -676,6 +674,7 @@ (define u-boot
> perl
> pkg-config ;for 'make menuconfig'
> python
> + python-pyelftools
> swig
> (list util-linux "lib")))
> (home-page "https://www.denx.de/wiki/U-Boot/")
> @@ -726,7 +725,12 @@ (define-public u-boot-tools
> (name "u-boot-tools")
> (native-inputs
> (modify-inputs (package-native-inputs u-boot)
> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
> + (prepend python-coverage
> + python-filelock
> + python-pycryptodomex
> + python-pytest
> + python-pytest-xdist

Maybe worth checking: Is pytest invoked with the '-n' (number->string
(parallel-job-count)); otherwise xdist doesn't provide any benefit.

Toggle quote (28 lines)
> + sdl2)))
> (arguments
> `(#:make-flags '("HOSTCC=gcc")
> #:test-target "tcheck"
> @@ -739,7 +743,7 @@ (define-public u-boot-tools
> (("/bin/false") (which "false")))
> (substitute* "tools/dtoc/fdt_util.py"
> (("'cc'") "'gcc'"))
> - (substitute* "tools/patman/test_util.py"
> + (substitute* "tools/u_boot_pylib/test_util.py"
> ;; python3-coverage is simply called coverage in guix.
> (("python3-coverage") "coverage")
>
> @@ -777,7 +781,15 @@ (define-public u-boot-tools
> ;; See https://bugs.gnu.org/34717 for
> ;; details.
> (("CONFIG_FIT_SIGNATURE=y")
> - "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
> + "CONFIG_FIT_SIGNATURE=n
> +CONFIG_UT_LIB_ASN1=n
> +CONFIG_TOOLS_LIBCRYPTO=n")
> + ;; Catch instances of implied CONFIG_FIG_SIGNATURE with VPL targets
> + (("CONFIG_SANDBOX_VPL=y")
> + "CONFIG_SANDBOX_VPL=y
> +CONFIG_FIT_SIGNATURE=n
> +CONFIG_VPL_FIT_SIGNATURE=n
> +CONFIG_TOOLS_LIBCRYPTO=n")

Thanks, this reads better.

Toggle quote (10 lines)
> ;; This test requires a sound system, which is un-used
> ;; in u-boot-tools.
> (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
> @@ -1009,6 +1021,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
> #~(modify-phases #$phases
> (add-after 'unpack 'set-environment
> (lambda* (#:key native-inputs inputs #:allow-other-keys)
> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
> + (setenv "SCP" "/dev/null")

I think I've seen this gets added in a later commit. Any reason why it
can't be added here?

Toggle quote (56 lines)
> (setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
> (inputs
> (modify-inputs (package-inputs base)
> @@ -1104,7 +1118,7 @@ (define-public u-boot-puma-rk3399
> (delete 'strip)
> (delete 'validate-runpath)))))
> (inputs
> - (modify-inputs (package-native-inputs base)
> + (modify-inputs (package-inputs base)
> (append arm-trusted-firmware-rk3399))))))
>
> (define-public u-boot-qemu-arm
> @@ -1170,7 +1184,20 @@ (define-public u-boot-sandbox
> (append sdl2))))))
>
> (define-public u-boot-sifive-unleashed
> - (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
> + (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
> + (package
> + (inherit base)
> + (arguments
> + (substitute-keyword-arguments (package-arguments base)
> + ((#:phases phases)
> + #~(modify-phases #$phases
> + (add-after 'unpack 'set-environment
> + (lambda* (#:key inputs #:allow-other-keys)
> + (setenv "OPENSBI" (search-input-file inputs
> + "fw_dynamic.bin"))))))))
> + (inputs
> + (modify-inputs (package-inputs base)
> + (append opensbi-generic))))))
>
> (define-public u-boot-sifive-unmatched
> (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
> @@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
> "CONFIG_SATA_SIL=y"
> "CONFIG_SCSI=y"
> "CONFIG_SCSI_AHCI=y"
> - "CONFIG_DM_SCSI=y"))))
> + "CONFIG_DM_SCSI=y"
> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
> (package
> (inherit base)
> (arguments
> @@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
> (add-after 'unpack 'set-environment
> (lambda* (#:key inputs #:allow-other-keys)
> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
> + ;; incompatibilities
> + (add-after 'unpack 'disable-spl-fit-signature
> + (lambda _
> + (substitute* "configs/rockpro64-rk3399_defconfig"
> + (("CONFIG_SPL_FIT_SIGNATURE=y")
> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))

Are you sure this really disables SPL_FIT_SIGNATURE? The #:configs
arguments goes through 'verify-config', which ensures an unset value
doesn't get pulled as a dependency of other options, if I recall
correctly.

The rest LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 15 Jul 2023 04:46
Re: [PATCH v3 3/6] gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts.
(address . vagrant@debian.org)
875y6lx56j.fsf@gmail.com
Hi,

vagrant@debian.org writes:

Toggle quote (9 lines)
> From: Vagrant Cascadian <vagrant@debian.org>
>
> * gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument
> for System Control Processor (SCP) firmware.
> [native-inputs]: Add SCP firmware.
> [phases]: Adjust 'set-environment to also set SCP variable.
> (u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate
> crust firmware as the SCP firmware.

Nitpick: extraneous hanging indent in ChangeLog-style commit message.

Toggle quote (16 lines)
> ---
> gnu/packages/bootloaders.scm | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index d1633b2b70..afea47b457 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -1009,7 +1009,7 @@ (define-public u-boot-am335x-boneblack
> (define-public u-boot-am335x-evm
> (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
>
> -(define*-public (make-u-boot-sunxi64-package board triplet
> +(define*-public (make-u-boot-sunxi64-package board triplet scpfirmware
> #:key defconfig configs)

I'd name the argument 'scp-firmware'.

Toggle quote (33 lines)
> (let ((base (make-u-boot-package
> board triplet #:defconfig defconfig #:configs configs)))
> @@ -1021,22 +1021,24 @@ (define*-public (make-u-boot-sunxi64-package board triplet
> #~(modify-phases #$phases
> (add-after 'unpack 'set-environment
> (lambda* (#:key native-inputs inputs #:allow-other-keys)
> - ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
> - (setenv "SCP" "/dev/null")
> + (setenv "SCP" (search-input-file native-inputs "libexec/scp.bin"))
> (setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
> + (native-inputs
> + (modify-inputs (package-native-inputs base)
> + (append scpfirmware)))
> (inputs
> (modify-inputs (package-inputs base)
> (append arm-trusted-firmware-sun50i-a64))))))
>
> (define-public u-boot-pine64-plus
> - (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
> + (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" crust-pine64-plus))
>
> (define-public u-boot-pine64-lts
> - (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
> + (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu" crust-pine64-plus))
>
> (define-public u-boot-pinebook
> (make-u-boot-sunxi64-package
> - "pinebook" "aarch64-linux-gnu"
> + "pinebook" "aarch64-linux-gnu" crust-pinebook
> ;; Fix regression with LCD video output introduced in 2020.01
> ;; https://patchwork.ozlabs.org/patch/1225130/
> #:configs '("CONFIG_VIDEO_BPP32=y")))

nitpick: Please break lines touched larger than 80 characters. The rest
LGTM!

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 15 Jul 2023 04:51
Re: [PATCH v3 6/6] (patman)[phases]: Remove 'sanity-check.
(address . vagrant@debian.org)
871qh9x4y6.fsf@gmail.com
Hello,

vagrant@debian.org writes:

Toggle quote (21 lines)
> From: Vagrant Cascadian <vagrant@debian.org>
>
> ---
> gnu/packages/bootloaders.scm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index f9abef49d6..3c1402ae58 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -875,6 +875,9 @@ (define-public patman
> #:tests? #f
> #:phases
> #~(modify-phases %standard-phases
> + ;; Patman fails to run during 'sanity-check phase, as it needs to be
> + ;; run within a git directory.
> + (delete 'sanity-check)
> (add-after 'unpack 'chdir
> (lambda _
> (chdir "tools/patman"))))))

LGTM.

--
Thanks,
Maxim
V
V
Vagrant Cascadian wrote on 15 Jul 2023 06:51
Re: [PATCH v3 2/6] gnu: u-boot: Update to 2023.07.02.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87sf9p3hge.fsf@wireframe
On 2023-07-14, Maxim Cournoyer wrote:
Toggle quote (15 lines)
> vagrant@debian.org writes:
>> @@ -726,7 +725,12 @@ (define-public u-boot-tools
>> (name "u-boot-tools")
>> (native-inputs
>> (modify-inputs (package-native-inputs u-boot)
>> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
>> + (prepend python-coverage
>> + python-filelock
>> + python-pycryptodomex
>> + python-pytest
>> + python-pytest-xdist
>
> Maybe worth checking: Is pytest invoked with the '-n' (number->string
> (parallel-job-count)); otherwise xdist doesn't provide any benefit.

Whether it is actually used is or not is one thing... but as
implemented, it fails to build without it... :)


Toggle quote (13 lines)
>> ;; This test requires a sound system, which is un-used
>> ;; in u-boot-tools.
>> (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
>> @@ -1009,6 +1021,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
>> #~(modify-phases #$phases
>> (add-after 'unpack 'set-environment
>> (lambda* (#:key native-inputs inputs #:allow-other-keys)
>> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
>> + (setenv "SCP" "/dev/null")
>
> I think I've seen this gets added in a later commit. Any reason why it
> can't be added here?

Sure, the later commit coud be squashed into this one if desired. The
initial patch was implemented before crust-firmware-* was merged, and so
this initial workaround was necessary...


Toggle quote (27 lines)
>> @@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
>> "CONFIG_SATA_SIL=y"
>> "CONFIG_SCSI=y"
>> "CONFIG_SCSI_AHCI=y"
>> - "CONFIG_DM_SCSI=y"))))
>> + "CONFIG_DM_SCSI=y"
>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>> (package
>> (inherit base)
>> (arguments
>> @@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
>> (add-after 'unpack 'set-environment
>> (lambda* (#:key inputs #:allow-other-keys)
>> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
>> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
>> + ;; incompatibilities
>> + (add-after 'unpack 'disable-spl-fit-signature
>> + (lambda _
>> + (substitute* "configs/rockpro64-rk3399_defconfig"
>> + (("CONFIG_SPL_FIT_SIGNATURE=y")
>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>
> Are you sure this really disables SPL_FIT_SIGNATURE? The #:configs
> arguments goes through 'verify-config', which ensures an unset value
> doesn't get pulled as a dependency of other options, if I recall
> correctly.

Without this, it spits out a nasty error, I think because
CONFIG_SPL_FIT_SIGNATURE is effectively defined multiple times
(e.g. "=y" in the defconfig, and "# ... is not set" in the additional
guix options?) and maybe verify-config fails in that situation? Sorry I
don't have the error handy, but it was easy enough to trigger by
dropping the 'disable-spl-fit-signature phase.


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZLIl4QAKCRDcUY/If5cW
qrvAAP9DALJdH3YxAVHrtUqVTj9vR4ItSDJflV4i/YLZ61Tx3QEAnbpp3RzzrnpB
BjrbgzLf3v2EXqxo+KO+n/3+ZOAtRwc=
=4TDr
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 16 Jul 2023 05:04
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87fs5ov9oj.fsf@gmail.com
Hi,

Vagrant Cascadian <vagrant@debian.org> writes:

Toggle quote (19 lines)
> On 2023-07-14, Maxim Cournoyer wrote:
>> vagrant@debian.org writes:
>>> @@ -726,7 +725,12 @@ (define-public u-boot-tools
>>> (name "u-boot-tools")
>>> (native-inputs
>>> (modify-inputs (package-native-inputs u-boot)
>>> - (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
>>> + (prepend python-coverage
>>> + python-filelock
>>> + python-pycryptodomex
>>> + python-pytest
>>> + python-pytest-xdist
>>
>> Maybe worth checking: Is pytest invoked with the '-n' (number->string
>> (parallel-job-count)); otherwise xdist doesn't provide any benefit.
>
> Whether it is actually used is or not is one thing... but as
> implemented, it fails to build without it... :)

OK :-).

Toggle quote (18 lines)
>
>>> ;; This test requires a sound system, which is un-used
>>> ;; in u-boot-tools.
>>> (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
>>> @@ -1009,6 +1021,8 @@ (define*-public (make-u-boot-sunxi64-package board triplet
>>> #~(modify-phases #$phases
>>> (add-after 'unpack 'set-environment
>>> (lambda* (#:key native-inputs inputs #:allow-other-keys)
>>> + ;; Avoid dependency on crust-firmware https://issues.guix.gnu.org/48371
>>> + (setenv "SCP" "/dev/null")
>>
>> I think I've seen this gets added in a later commit. Any reason why it
>> can't be added here?
>
> Sure, the later commit coud be squashed into this one if desired. The
> initial patch was implemented before crust-firmware-* was merged, and so
> this initial workaround was necessary...

Don't bother; it was a bit weird two things changed in the same series,
but it keeps concerns a bit more separated, so it's fine as is.

Toggle quote (35 lines)
>
>>> @@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
>>> "CONFIG_SATA_SIL=y"
>>> "CONFIG_SCSI=y"
>>> "CONFIG_SCSI_AHCI=y"
>>> - "CONFIG_DM_SCSI=y"))))
>>> + "CONFIG_DM_SCSI=y"
>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>> (package
>>> (inherit base)
>>> (arguments
>>> @@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
>>> (add-after 'unpack 'set-environment
>>> (lambda* (#:key inputs #:allow-other-keys)
>>> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
>>> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
>>> + ;; incompatibilities
>>> + (add-after 'unpack 'disable-spl-fit-signature
>>> + (lambda _
>>> + (substitute* "configs/rockpro64-rk3399_defconfig"
>>> + (("CONFIG_SPL_FIT_SIGNATURE=y")
>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>
>> Are you sure this really disables SPL_FIT_SIGNATURE? The #:configs
>> arguments goes through 'verify-config', which ensures an unset value
>> doesn't get pulled as a dependency of other options, if I recall
>> correctly.
>
> Without this, it spits out a nasty error, I think because
> CONFIG_SPL_FIT_SIGNATURE is effectively defined multiple times
> (e.g. "=y" in the defconfig, and "# ... is not set" in the additional
> guix options?) and maybe verify-config fails in that situation? Sorry I
> don't have the error handy, but it was easy enough to trigger by
> dropping the 'disable-spl-fit-signature phase.

Hm. In my experience this means some other option is pulling in (by
means of kconfig dependency resolution) the CONFIG_SPL_FIT_SIGNATURE
option and would need to also be disabled. When faced with this problem
I usually end up navigating the 'make menuconfig' kconfig interface and
inspecting dependencies for the option at hand.

--
Thanks,
Maxim
V
V
Vagrant Cascadian wrote on 16 Jul 2023 06:04
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87ilak33is.fsf@wireframe
On 2023-07-15, Maxim Cournoyer wrote:
Toggle quote (43 lines)
> Vagrant Cascadian <vagrant@debian.org> writes:
>> On 2023-07-14, Maxim Cournoyer wrote:
>>> vagrant@debian.org writes:
>>>> @@ -1230,7 +1257,8 @@ (define-public u-boot-rockpro64-rk3399
>>>> "CONFIG_SATA_SIL=y"
>>>> "CONFIG_SCSI=y"
>>>> "CONFIG_SCSI_AHCI=y"
>>>> - "CONFIG_DM_SCSI=y"))))
>>>> + "CONFIG_DM_SCSI=y"
>>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>>> (package
>>>> (inherit base)
>>>> (arguments
>>>> @@ -1240,6 +1268,13 @@ (define-public u-boot-rockpro64-rk3399
>>>> (add-after 'unpack 'set-environment
>>>> (lambda* (#:key inputs #:allow-other-keys)
>>>> (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
>>>> + ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
>>>> + ;; incompatibilities
>>>> + (add-after 'unpack 'disable-spl-fit-signature
>>>> + (lambda _
>>>> + (substitute* "configs/rockpro64-rk3399_defconfig"
>>>> + (("CONFIG_SPL_FIT_SIGNATURE=y")
>>>> + "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
>>>
>>> Are you sure this really disables SPL_FIT_SIGNATURE? The #:configs
>>> arguments goes through 'verify-config', which ensures an unset value
>>> doesn't get pulled as a dependency of other options, if I recall
>>> correctly.
>>
>> Without this, it spits out a nasty error, I think because
>> CONFIG_SPL_FIT_SIGNATURE is effectively defined multiple times
>> (e.g. "=y" in the defconfig, and "# ... is not set" in the additional
>> guix options?) and maybe verify-config fails in that situation? Sorry I
>> don't have the error handy, but it was easy enough to trigger by
>> dropping the 'disable-spl-fit-signature phase.
>
> Hm. In my experience this means some other option is pulling in (by
> means of kconfig dependency resolution) the CONFIG_SPL_FIT_SIGNATURE
> option and would need to also be disabled. When faced with this problem
> I usually end up navigating the 'make menuconfig' kconfig interface and
> inspecting dependencies for the option at hand.

Only modifying the config in 'disable-spl-fit-signature works alone, if
I recall correctly, but I left in the the stuff with verify-config to
have an extra safety check. Without adding openssl to one of the inputs,
the build should fail regardless, so maybe only including the
'disable-spl-fit-signature is sufficient.


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZLNsawAKCRDcUY/If5cW
qjXzAQDtaMG8x5wsNiKurebpRddjFaORGDG9ldLDayKIZlivRgD/Rr1KIa9yVvD5
5vldFCR6ij1+6Cf10BzVLNhc1xXt6QU=
=E2zI
-----END PGP SIGNATURE-----

V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 0/5] Update U-boot to 2023.07.02.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-1-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

I *think* I have resolved all mentioned issues so far.

This series keeps arm-trusted-firmware-imx8mq at 2.8, as it no longer builds.

It turns out using the #:config to disable CONFIG_SPL_FIT_SIGNATURE is working
after all, so only used that one.

Maxim Cournoyer (2):
gnu: Add python-u-boot-pylib.
gnu: patman: Add python-u-boot-pylib to inputs.

Vagrant Cascadian (3):
gnu: arm-trusted-firmware: Update to 2.9.
gnu: u-boot: Update to 2023.07.02.
gnu: u-boot: Add crust firmware to pinebook, pine64_plus and
pine64-lts.

gnu/local.mk | 3 +-
gnu/packages/bootloaders.scm | 91 +-
gnu/packages/firmware.scm | 20 +-
.../u-boot-allow-disabling-openssl.patch | 13 +-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +
.../patches/u-boot-infodocs-target.patch | 84 --
.../u-boot-patman-guix-integration.patch | 1244 -----------------
...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
8 files changed, 129 insertions(+), 1358 deletions(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch


base-commit: 283969d0c527aa41e65bb4f5c2a7fa3baf86c49a
--
2.39.2
V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 1/5] gnu: arm-trusted-firmware: Update to 2.9.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-2-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/firmware.scm (make-arm-trusted-firmware): Update to 2.9.
(arm-trusted-firmware-imx8mq): Keep at version 2.8.
---
gnu/packages/firmware.scm | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index d6ce893120..35d3100ac6 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1025,7 +1025,7 @@ (define* (make-arm-trusted-firmware platform
(gnu-triplet->nix-system triplet))))))
(package
(name (string-append "arm-trusted-firmware-" platform))
- (version "2.8")
+ (version "2.9")
(source
(origin
(method git-fetch)
@@ -1036,7 +1036,7 @@ (define* (make-arm-trusted-firmware platform
(file-name (git-file-name "arm-trusted-firmware" version))
(sha256
(base32
- "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))
+ "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
(snippet
#~(begin
(use-modules (guix build utils))
@@ -1104,6 +1104,22 @@ (define-public arm-trusted-firmware-imx8mq
(let ((base (make-arm-trusted-firmware "imx8mq")))
(package
(inherit base)
+ ;; Newer versions do not build and are essentially not supported
+ ;; upstream.
+ ;; XXX: explore using NXP maintained branch
+ ;; https://github.com/nxp-imx/imx-atf
+ (version "2.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; There are only GitHub generated release snapshots.
+ (url "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "arm-trusted-firmware" version))
+ (sha256
+ (base32
+ "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))))
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:make-flags flags ''())
--
2.39.2
V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 2/5] gnu: u-boot: Update to 2023.07.02.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-3-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/patches/u-boot-infodocs-target.patch: Delete file.
* gnu/packages/patches/u-boot-patman-guix-integration.patch: Delete file.
* gnu/local.mk: De-register patches.
* gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
* gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
* gnu/packages/bootloaders.scm (u-boot): Update to 2023.07.02.
[native-inputs]: Add python-pyelftools.
[source]: Remove patches.
(u-boot-tools)[phases]: Update substitution for python3-coverage.
Adjust 'patch to catch more openssl incompatibilities.
Split lines in 'patch phase.
[native-inputs]: Add python-filelock and python-pytest-xdist.
(make-u-boot-sunxi64-package): Set SCP environment variable.
(u-boot-sifive-unleashed): Update to use opensbi.
(u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
package-inputs instead of native-inputs.
(u-boot-rockpro64-rk3399): Disable CONFIG_SPL_FIT_SIGNATURE in config.
---
gnu/local.mk | 2 -
gnu/packages/bootloaders.scm | 55 +-
.../u-boot-allow-disabling-openssl.patch | 13 +-
.../patches/u-boot-infodocs-target.patch | 84 --
.../u-boot-patman-guix-integration.patch | 1244 -----------------
...boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +-
6 files changed, 54 insertions(+), 1352 deletions(-)
delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch

Toggle diff (378 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index f2ef72c10a..cdce2666e5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2005,8 +2005,6 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
- %D%/packages/patches/u-boot-infodocs-target.patch \
- %D%/packages/patches/u-boot-patman-guix-integration.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 01fd1093ff..966f1787f8 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
(define u-boot
(package
(name "u-boot")
- (version "2022.10")
+ (version "2023.07.02")
(source (origin
(patches
(list %u-boot-rockchip-inno-usb-patch
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")
- (search-patch "u-boot-infodocs-target.patch")
- (search-patch "u-boot-patman-guix-integration.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
"u-boot-" version ".tar.bz2"))
(sha256
(base32
- "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
+ "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb"))))
(build-system gnu-build-system)
(native-inputs
(list bison
@@ -676,6 +674,7 @@ (define u-boot
perl
pkg-config ;for 'make menuconfig'
python
+ python-pyelftools
swig
(list util-linux "lib")))
(home-page "https://www.denx.de/wiki/U-Boot/")
@@ -726,7 +725,12 @@ (define-public u-boot-tools
(name "u-boot-tools")
(native-inputs
(modify-inputs (package-native-inputs u-boot)
- (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
+ (prepend python-coverage
+ python-filelock
+ python-pycryptodomex
+ python-pytest
+ python-pytest-xdist
+ sdl2)))
(arguments
`(#:make-flags '("HOSTCC=gcc")
#:test-target "tcheck"
@@ -739,7 +743,7 @@ (define-public u-boot-tools
(("/bin/false") (which "false")))
(substitute* "tools/dtoc/fdt_util.py"
(("'cc'") "'gcc'"))
- (substitute* "tools/patman/test_util.py"
+ (substitute* "tools/u_boot_pylib/test_util.py"
;; python3-coverage is simply called coverage in guix.
(("python3-coverage") "coverage")
@@ -777,7 +781,16 @@ (define-public u-boot-tools
;; See https://bugs.gnu.org/34717 for
;; details.
(("CONFIG_FIT_SIGNATURE=y")
- "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
+ "CONFIG_FIT_SIGNATURE=n
+CONFIG_UT_LIB_ASN1=n
+CONFIG_TOOLS_LIBCRYPTO=n")
+ ;; Catch instances of implied CONFIG_FIG_SIGNATURE
+ ;; with VPL targets
+ (("CONFIG_SANDBOX_VPL=y")
+ "CONFIG_SANDBOX_VPL=y
+CONFIG_FIT_SIGNATURE=n
+CONFIG_VPL_FIT_SIGNATURE=n
+CONFIG_TOOLS_LIBCRYPTO=n")
;; This test requires a sound system, which is un-used
;; in u-boot-tools.
(("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
@@ -1009,6 +1022,9 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
+ ;; Avoid dependency on crust-firmware
+ ;; https://issues.guix.gnu.org/48371
+ (setenv "SCP" "/dev/null")
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
(inputs
(modify-inputs (package-inputs base)
@@ -1104,7 +1120,7 @@ (define-public u-boot-puma-rk3399
(delete 'strip)
(delete 'validate-runpath)))))
(inputs
- (modify-inputs (package-native-inputs base)
+ (modify-inputs (package-inputs base)
(append arm-trusted-firmware-rk3399))))))
(define-public u-boot-qemu-arm
@@ -1170,7 +1186,20 @@ (define-public u-boot-sandbox
(append sdl2))))))
(define-public u-boot-sifive-unleashed
- (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
+ (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "OPENSBI" (search-input-file inputs
+ "fw_dynamic.bin"))))))))
+ (inputs
+ (modify-inputs (package-inputs base)
+ (append opensbi-generic))))))
(define-public u-boot-sifive-unmatched
(let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
@@ -1230,7 +1259,11 @@ (define-public u-boot-rockpro64-rk3399
"CONFIG_SATA_SIL=y"
"CONFIG_SCSI=y"
"CONFIG_SCSI_AHCI=y"
- "CONFIG_DM_SCSI=y"))))
+ "CONFIG_DM_SCSI=y"
+ ;; Disable SPL FIT signatures,
+ ;; due to GPLv2 and Openssl
+ ;; license incompatibilities
+ "# CONFIG_SPL_FIT_SIGNATURE is not set"))))
(package
(inherit base)
(arguments
diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
index 5f2856dbb4..5195a7a6f8 100644
--- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
+++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
@@ -128,29 +128,28 @@ index 94b7685392..eec599b0ee 100644
datai = 0;
for (cfgi = 0; cfgi < cfgn; cfgi++) {
e = &image_cfg[cfgi];
-@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+@@ -1624,10 +1640,12 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params,
&datai, delay);
}
+#if defined(CONFIG_KWB_SECURE)
- if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz,
- headersz, image, secure_hdr))
+ if (secure_hdr && add_secure_header_v1(params, ptr + *dataoff, payloadsz,
+ image, headersz, secure_hdr))
return NULL;
+#endif
- *imagesz = headersz;
+ /* Calculate and set the header checksum */
+ main_hdr->checksum = image_checksum8(main_hdr, headersz);
--- a/tools/image-host.c
+++ b/tools/image-host.c
-@@ -14,10 +14,12 @@
+@@ -14,8 +14,10 @@
#include <image.h>
#include <version.h>
+#ifdef CONFIG_FIT_PRELOAD
#include <openssl/pem.h>
#include <openssl/evp.h>
-
- #define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig"
+#endif
/**
diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch
deleted file mode 100644
index 5b21a99de3..0000000000
--- a/gnu/packages/patches/u-boot-infodocs-target.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333259
-
-diff --git a/Makefile b/Makefile
-index de5746399a..597a8886c3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2372,7 +2372,7 @@ tcheck:
- # Documentation targets
- # ---------------------------------------------------------------------------
- DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
-- linkcheckdocs dochelp refcheckdocs
-+ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
- PHONY += $(DOC_TARGETS)
- $(DOC_TARGETS): scripts_basic FORCE
- $(Q)$(MAKE) $(build)=doc $@
-diff --git a/doc/Makefile b/doc/Makefile
-index f5de65e927..d0904a9f99 100644
---- a/doc/Makefile
-+++ b/doc/Makefile
-@@ -69,6 +69,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
- htmldocs:
- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
-
-+texinfodocs:
-+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
-+
-+# Note: the 'info' Make target is generated by sphinx itself when
-+# running the texinfodocs target defined above.
-+infodocs: texinfodocs
-+ $(MAKE) -C $(BUILDDIR)/texinfo info
-+
- linkcheckdocs:
- @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
-
-@@ -109,6 +117,8 @@ cleandocs:
- dochelp:
- @echo ' U-Boot documentation in different formats from ReST:'
- @echo ' htmldocs - HTML'
-+ @echo ' texinfodocs - Texinfo'
-+ @echo ' infodocs - Info'
- @echo ' latexdocs - LaTeX'
- @echo ' pdfdocs - PDF'
- @echo ' epubdocs - EPUB'
-diff --git a/doc/conf.py b/doc/conf.py
-index 62c8d31270..3db70f80c1 100644
---- a/doc/conf.py
-+++ b/doc/conf.py
-@@ -449,7 +449,7 @@ for fn in os.listdir('.'):
- # One entry per manual page. List of tuples
- # (source start file, name, description, authors, manual section).
- man_pages = [
-- (master_doc, 'dasuboot', 'The U-Boot Documentation',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
- [author], 1)
- ]
-
-@@ -463,8 +463,8 @@ man_pages = [
- # (source start file, target name, title, author,
- # dir menu entry, description, category)
- texinfo_documents = [
-- (master_doc, 'DasUBoot', 'The U-Boot Documentation',
-- author, 'DasUBoot', 'One line description of project.',
-+ (master_doc, 'u-boot', 'The U-Boot Documentation',
-+ author, 'U-Boot', 'Boot loader for embedded systems',
- 'Miscellaneous'),
- ]
-
-diff --git a/doc/media/Makefile b/doc/media/Makefile
-index b9b43a34c3..9b32258696 100644
---- a/doc/media/Makefile
-+++ b/doc/media/Makefile
-@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke
-
- # Media build rules
-
--.PHONY: all html epub xml latex
-+.PHONY: all html texinfo epub xml latex
-
- all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
- html: all
-+texinfo: all
- epub: all
- xml: all
- latex: $(IMGPDF) all
diff --git a/gnu/packages/patches/u-boot-patman-guix-integration.patch b/gnu/packages/patches/u-boot-patman-guix-integration.patch
deleted file mode 100644
index 3472656c99..0000000000
--- a/gnu/packages/patches/u-boot-patman-guix-integration.patch
+++ /dev/null
@@ -1,1244 +0,0 @@
-These changes correspond to commits 9ff7500ace..3154de3dd6 already merged to
-the u-boot-dm custodian repo (at
-https://source.denx.de/u-boot/custodians/u-boot-dm/-/commits/next), scheduled
-to be pulled after the next release.
-
-diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py
-index c9d3e35052..1b98ec7fee 100644
---- a/tools/patman/__init__.py
-+++ b/tools/patman/__init__.py
-@@ -1,6 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0+
-
- __all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess',
-- 'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream',
-+ 'func_test', 'get_maintainer', 'gitutil', '__main__', 'patchstream',
- 'project', 'series', 'setup', 'settings', 'terminal',
- 'test_checkpatch', 'test_util', 'tools', 'tout']
-diff --git a/tools/patman/main.py b/tools/patman/__main__.py
-similarity index 89%
-rename from tools/patman/main.py
-rename to tools/patman/__main__.py
-index 8067a288ab..749e6348b6 100755
---- a/tools/patman/main.py
-+++ b/tools/patman/__main__.py
-@@ -7,6 +7,7 @@
- """See README for more information"""
-
- from argparse import ArgumentParser
-+import importlib.resources
- import os
- import re
- import sys
-@@ -19,6 +20,7 @@ if __name__ == "__main__":
-
- # Our modules
- from patman import control
-+from patman import func_test
- from patman import gitutil
- from patman import project
- from patman import settings
-@@ -53,7 +55,8 @@ parser.add_argument('-H', '--full-help', action='store_true', dest='full_help',
- default=False, help='Display the README file')
-
- subparsers = parser.add_subparsers(dest='cmd')
--send = subparsers.add_parser('send')
-+send = subparsers.add_parser(
-+ 'send', help='Format, check and email patches (default command)')
- send.add_argument('-i', '--ignore-errors', action='store_true',
- dest='ignore_errors', default=False,
- help='Send patches email even if patch errors are found')
-@@ -62,6 +65,12 @@ send.add_argument('-l', '--limit-cc', dest='limit', type=int, default=None,
- send.add_argument('-m', '--no-maintainers', action='store_false',
- dest='add_maintainers', default=True,
- help="Don't cc the file maintainers automatically")
-+send.add_argument(
-+ '--get-maintainer-script', dest='get_maintainer_script', type=str,
-+ action='store',
-+ default=os.path.join(gitutil.get_top_level(), 'scripts',
-+ 'get_maintainer.pl') + ' --norolestats',
-+ help='File name of the get_maintainer.pl (or compatible) script.')
- send.add_argument('-n', '--dry-run', action='store_true', dest='dry_run',
- default=False, help="Do a dry run (create but don't email patches)")
- send.add_argument('-r', '--in-reply-to', type=str, action='store',
-@@ -94,9 +103,11 @@ send.add_argument('--smtp-server', type=str,
-
- send.add_argument('patchfiles', nargs='*')
-
--test_parser = subparsers.add_parser('test', help='Run tests')
--test_parser.add_argument('testname', type=str, default=None, nargs='?',
-- help="Specify the test to run")
-+# Only add the 'test' action if the test data files are available.
-+if os.path.exists(func_test.TEST_DATA_DIR):
-+ test_parser = subparsers.add_parser('test', help='Run tests')
-+ test_parser.add_argument('testname', type=str, default=None, nargs='?',
-+ help="Specify the test to run")
-
- status = subparsers.add_parser('status',
- help='Check status of patches in patchwork')
-@@ -113,7 +124,7 @@ status.add_argument('-f', '--force', action='store_true',
- argv = sys.argv[1:]
- args, rest = parser.parse_known_args(argv)
- if hasattr(args, 'project'):
-- settings.Setup(gitutil, parser, args.project, '')
-+ settings.Setup(parser, args.project)
- args, rest = parser.parse_known_args(argv)
-
- # If we have a command, it is safe to parse all arguments
-@@ -160,11 +171,8 @@ elif args.cmd == 'send':
- fd.close()
-
- elif args.full_help:
-- tools.print_full_help(
-- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
-- 'README.rst')
-- )
--
-+ with importlib.resources.path('patman', 'README.rst') as readme:
-+ tools.print_full_help(str(readme))
- else:
- # If we are not processing tags, no need to warning about bad ones
- if not args.process_tags:
-diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
-index d1b902dd96..012c0d895c 100644
---- a/tools/patman/checkpatch.py
-+++ b/tools/patman/checkpatch.py
-@@ -211,7 +211,7 @@ def check_patch(fname, verbose=False, show_types=False, use_tree=False):
- stdout: Full output of checkpatch
- """
- chk = find_check_patch()
-- args = [chk]
-+ args = [chk, '--u-boot', '--strict']
- if not use_tree:
- args.append('--no-tree')
- if show_types:
-diff --git a/tools/patman/control.py b/tools/patman/control.py
-index bf426cf7bc..38e98dab84 100644
---- a/tools/patman/control.py
-+++ b/tools/patman/control.py
-@@ -94,8 +94,8 @@ def check_patches(series, patch_files, run_checkpatch, verbose, use_tree):
-
-
- def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
-- ignore_bad_tags, add_maintainers, limit, dry_run, in_reply_to,
-- thread, smtp_server):
-+ ignore_bad_tags, add_maintainers, get_maintainer_script, limit,
-+ dry_run, in_reply_to, thread, smtp_server):
- """Email patches to the recipients
-
- This emails out the patches and cover letter using 'git send-email'. Each
-@@ -123,6 +123,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
- ignore_bad_tags (bool): True to just print a warning for unknown tags,
- False to halt with an error
- add_maintainers (bool): Run the get_maintainer.pl script for each patch
-+ get_maintainer_script (str): The script used to retrieve which
-+ maintainers to cc
- limit (int): Limit on the number of people that can be cc'd on a single
- patch or the cover letter (None if no limit)
- dry_run (bool): Don't actually email the patches, just print out what
-@@ -134,7 +136,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
- smtp_server (str): SMTP server to use to send patches (None for default)
- """
- cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags,
-- add_maintainers, limit)
-+ add_maintainers, limit, get_maintainer_script)
-

This message was truncated. Download the full message here.
V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 3/5] gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-4-vagrant@debian.org
From: Vagrant Cascadian <vagrant@debian.org>

* gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument
for System Control Processor (SCP) firmware.
[native-inputs]: Add SCP firmware.
[phases]: Adjust 'set-environment to also set SCP variable.
(u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate
crust firmware as the SCP firmware.
---
gnu/packages/bootloaders.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 966f1787f8..ea69fc890b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1010,7 +1010,7 @@ (define-public u-boot-am335x-boneblack
(define-public u-boot-am335x-evm
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
-(define*-public (make-u-boot-sunxi64-package board triplet
+(define*-public (make-u-boot-sunxi64-package board triplet scp-firmware
#:key defconfig configs)
(let ((base (make-u-boot-package
board triplet #:defconfig defconfig #:configs configs)))
@@ -1022,23 +1022,27 @@ (define*-public (make-u-boot-sunxi64-package board triplet
#~(modify-phases #$phases
(add-after 'unpack 'set-environment
(lambda* (#:key native-inputs inputs #:allow-other-keys)
- ;; Avoid dependency on crust-firmware
- ;; https://issues.guix.gnu.org/48371
- (setenv "SCP" "/dev/null")
+ (setenv "SCP" (search-input-file
+ native-inputs "libexec/scp.bin"))
(setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base)
+ (append scp-firmware)))
(inputs
(modify-inputs (package-inputs base)
(append arm-trusted-firmware-sun50i-a64))))))
(define-public u-boot-pine64-plus
- (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"
+ crust-pine64-plus))
(define-public u-boot-pine64-lts
- (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"
+ crust-pine64-plus))
(define-public u-boot-pinebook
(make-u-boot-sunxi64-package
- "pinebook" "aarch64-linux-gnu"
+ "pinebook" "aarch64-linux-gnu" crust-pinebook
;; Fix regression with LCD video output introduced in 2020.01
;; https://patchwork.ozlabs.org/patch/1225130/
#:configs '("CONFIG_VIDEO_BPP32=y")))
--
2.39.2
V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 5/5] gnu: patman: Add python-u-boot-pylib to inputs.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-6-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (patman) [inputs]: Add python-u-boot-pylib.
[phases]: Remove 'sanity-check.
---
gnu/packages/bootloaders.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 8afb2c3293..30ef673f7d 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -876,10 +876,13 @@ (define-public patman
#:tests? #f
#:phases
#~(modify-phases %standard-phases
+ ;; Patman fails to run during 'sanity-check phase, as it needs to be
+ ;; run within a git directory.
+ (delete 'sanity-check)
(add-after 'unpack 'chdir
(lambda _
(chdir "tools/patman"))))))
- (inputs (list python-pygit2 python-requests))
+ (inputs (list python-pygit2 python-requests python-u-boot-pylib))
(synopsis "Patch automation tool")
(description "Patman is a patch automation script which:
@itemize
--
2.39.2
V
V
vagrant wrote on 20 Jul 2023 03:44
[PATCH v4 4/5] gnu: Add python-u-boot-pylib.
(address . 64149@debbugs.gnu.org)
20230720014459.242139-5-vagrant@debian.org
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* gnu/packages/bootloaders.scm (python-u-boot-pylib): New variable.
* gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 23 +++++++++++++++++-
.../patches/u-boot-fix-u-boot-lib-build.patch | 24 +++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index cdce2666e5..ad31e8d2de 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2005,6 +2005,7 @@ dist_patch_DATA = \
%D%/packages/patches/twinkle-bcg729.patch \
%D%/packages/patches/u-boot-allow-disabling-openssl.patch \
%D%/packages/patches/u-boot-fix-build-python-3.10.patch \
+ %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \
%D%/packages/patches/u-boot-nintendo-nes-serial.patch \
%D%/packages/patches/u-boot-rockchip-inno-usb.patch \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index ea69fc890b..8afb2c3293 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -655,7 +655,8 @@ (define u-boot
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
%u-boot-rk3399-enable-emmc-phy-patch
- (search-patch "u-boot-fix-build-python-3.10.patch")))
+ (search-patch "u-boot-fix-build-python-3.10.patch")
+ (search-patch "u-boot-fix-u-boot-lib-build.patch")))
(method url-fetch)
(uri (string-append
"https://ftp.denx.de/pub/u-boot/"
@@ -841,6 +842,26 @@ (define-public u-boot-tools
" This package provides board-independent tools "
"of U-Boot."))))
+(define-public python-u-boot-pylib
+ (package
+ (inherit u-boot)
+ (name "python-u-boot-pylib")
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "tools/u_boot_pylib")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./u_boot_pylib")))))))
+ (synopsis "U-Boot Python library")
+ (description "This package provides common Python code used by some of the
+commands part of the U-Boot project, such as Patman.")))
+
;;; This is packaged separately, as it can be used in other contexts than for
;;; U-Boot development.
(define-public patman
diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
new file mode 100644
index 0000000000..233c437de6
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch
@@ -0,0 +1,24 @@
+Submitted upstream (see:
+https://lists.denx.de/pipermail/u-boot/2023-July/521984.html)
+
+diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml
+index 3f33caf6f8..037c5d629e 100644
+--- a/tools/u_boot_pylib/pyproject.toml
++++ b/tools/u_boot_pylib/pyproject.toml
+@@ -9,7 +9,7 @@ authors = [
+ { name="Simon Glass", email="sjg@chromium.org" },
+ ]
+ description = "U-Boot python library"
+-readme = "README.md"
++readme = "README.rst"
+ requires-python = ">=3.7"
+ classifiers = [
+ "Programming Language :: Python :: 3",
+@@ -20,3 +20,7 @@ classifiers = [
+ [project.urls]
+ "Homepage" = "https://u-boot.readthedocs.io"
+ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
++
++[tool.setuptools.packages.find]
++where = [".."]
++include = ["u_boot_pylib*"]
--
2.39.2
M
M
Maxim Cournoyer wrote on 20 Jul 2023 05:37
Re: [PATCH v4 0/5] Update U-boot to 2023.07.02.
(address . vagrant@debian.org)
87o7k7mex8.fsf@gmail.com
Hello,

vagrant@debian.org writes:

Toggle quote (9 lines)
> From: Vagrant Cascadian <vagrant@debian.org>
>
> I *think* I have resolved all mentioned issues so far.
>
> This series keeps arm-trusted-firmware-imx8mq at 2.8, as it no longer builds.
>
> It turns out using the #:config to disable CONFIG_SPL_FIT_SIGNATURE is working
> after all, so only used that one.

Great!

I haven't been able to apply this series locally, but I've had a glimpse
and it LGTM. Feel free to push it!

--
Thanks,
Maxim
V
V
Vagrant Cascadian wrote on 20 Jul 2023 08:01
Update U-boot to 2023.07.02, arm-trusted-firmware to 2.9
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87cz0n15r5.fsf@wireframe
On 2023-07-19, Maxim Cournoyer wrote:
Toggle quote (15 lines)
> vagrant@debian.org writes:
>> From: Vagrant Cascadian <vagrant@debian.org>
>>
>> I *think* I have resolved all mentioned issues so far.
>>
>> This series keeps arm-trusted-firmware-imx8mq at 2.8, as it no longer builds.
>>
>> It turns out using the #:config to disable CONFIG_SPL_FIT_SIGNATURE is working
>> after all, so only used that one.
>
> Great!
>
> I haven't been able to apply this series locally, but I've had a glimpse
> and it LGTM. Feel free to push it!

Thanks for the review!

Pushed as:

cf1216d8763adf3c5e9d79d7abd2c5ecc8861d60 gnu: patman: Add python-u-boot-pylib to inputs.
ffbcc113df02293e1676310dbf3bfb23df8cae10 gnu: Add python-u-boot-pylib.
ed5dc3a25d858a394bb7db937a51d866c3cdc6ed gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts.
b0d47d9e18e52ff7935aebe6ab37e702f58101be gnu: u-boot: Update to 2023.07.02.
d6a53849935f8584e1df57faa79c18c23fbb2aa1 gnu: arm-trusted-firmware: Update to 2.9.


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZLjNngAKCRDcUY/If5cW
qg1SAP9weTSy5vSEoB1ymnZcwXElgjL9m68ItfrkubKVx7nviAD/YxOJOsweVTlq
bu2Jq3hBDsuKvexmhw1BVgT/0aj6wwQ=
=ClWQ
-----END PGP SIGNATURE-----

Closed
?