[PATCH] gnu: u-boot: Update to 2021.07.

  • Done
  • quality assurance status badge
Details
3 participants
  • Mathieu Othacehe
  • Pierre Langlois
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Pierre Langlois
Severity
normal
P
P
Pierre Langlois wrote on 13 Jul 2021 21:56
(name . Guix-patches)(address . guix-patches@gnu.org)
87mtqqkmwo.fsf@gmx.com
Hi Guix!

Here's a patch to update u-boot to 2021.07. I've tested this by booting
a barebone image on the pinebook pro. I've also tested it on the
rockpro64 however that still requires another fix, see bug#49550 [0]
which is an existing issue.

Thanks,
Pierre

-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmDt8AcYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U3JAIALS0ASRIUdENNGgyC/ITsUtn
uEMOENGSCAsBq2MOGeQ2MxJF+WQZ3nTKtRh53fjPlhwBieXspjHViHgj1k1th6ii
UTdeRQpVVTEWdHFPEQrLIXeTjMLrKhGq6Xfq6q6ivQ+N9wHhjukwYWmjU2VooMsL
KmqaKdM//CWFH2rq5biAtqIq5mpKd/2s/cSMaccsa1xYG5XRzYs1gBcXfbY6ENcG
t6/gCSt8ZB/5InuV92pF8dfS5qzWoUoopR7YsC33eG0oYxRGieQRGw8E2cMPHIzV
c33c1wSivmzhJ3ZPEuHwX2PE5MwM/a1iAUHRtdlLH2cKuqIDjyNCvTpAlQ1mJn4=
=hye7
-----END PGP SIGNATURE-----

From 82c2422ea06013ca8914c2628cdd2569ffb43973 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 10 Jul 2021 14:12:02 +0100
Subject: [PATCH] gnu: u-boot: Update to 2021.07.

* gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
[native-inputs]: Add python-pycryptodomex.
(u-boot-2021.07): Delete variable.
(u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
(u-boot-sifive-unmatched): Use default u-boot package.
(u-boot-pinebook-pro-rk3328): Use default u-boot package.
---
gnu/packages/bootloaders.scm | 38 +++++++++++-------------------------
1 file changed, 11 insertions(+), 27 deletions(-)

Toggle diff (99 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 75705a27c1..448853a7da 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -56,6 +56,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module (gnu packages sdl)
@@ -496,7 +497,7 @@ tree binary files. These are board description files used by Linux and BSD.")
(define u-boot
(package
(name "u-boot")
- (version "2021.04")
+ (version "2021.07")
(source (origin
(patches
(list %u-boot-rockchip-inno-usb-patch))
@@ -506,7 +507,7 @@ tree binary files. These are board description files used by Linux and BSD.")
"u-boot-" version ".tar.bz2"))
(sha256
(base32
- "06p1vymf0dl6jc2xy5w7p42mpgppa46lmpm2ishmgsycnldqnhqd"))))
+ "0zm7igkdnz0w4ir8rfl2dislfrl0ip104grs5hvd30a5wkm7wari"))))
(native-inputs
`(("bc" ,bc)
("bison" ,bison)
@@ -516,6 +517,7 @@ tree binary files. These are board description files used by Linux and BSD.")
("perl" ,perl)
("python" ,python)
("python-coverage" ,python-coverage)
+ ("python-pycryptodomex" ,python-pycryptodomex)
("python-pytest" ,python-pytest)
("swig" ,swig)))
(build-system gnu-build-system)
@@ -525,21 +527,6 @@ tree binary files. These are board description files used by Linux and BSD.")
also initializes the boards (RAM etc).")
(license license:gpl2+)))

-(define-public u-boot-2021.07
- (package
- (inherit u-boot)
- (version "2021.07-rc4")
- (source (origin
- (patches
- (list %u-boot-rockchip-inno-usb-patch))
- (method url-fetch)
- (uri (string-append
- "https://ftp.denx.de/pub/u-boot/"
- "u-boot-" version ".tar.bz2"))
- (sha256
- (base32
- "0bnsywgy2b0jxim5h9dc807lqk5kq8hvgf4lcsmffnc0hf4isv8p"))))))
-
(define-public u-boot-tools
(package
(inherit u-boot)
@@ -568,9 +555,12 @@ also initializes the boards (RAM etc).")
;; This test would require git.
(("\\./tools/patman/patman") (which "true"))
;; FIXME: test fails, needs further investiation
- (("run_test \"binman\"") ": run_test \"binman\"")
+ (("run_test \"binman\"") "# run_test \"binman\"")
+ ;; FIXME: test_spl fails, needs further investiation
+ (("test_ofplatdata or test_handoff or test_spl")
+ "test_ofplatdata or test_handoff")
;; FIXME: code coverage not working
- (("run_test \"binman code coverage\"") ": run_test \"binman code coverage\"")
+ (("run_test \"binman code coverage\"") "# run_test \"binman code coverage\"")
;; This test would require internet access.
(("\\./tools/buildman/buildman") (which "true")))
(substitute* "test/py/tests/test_sandbox_exit.py"
@@ -879,11 +869,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(make-u-boot-package "sifive_fu540" "riscv64-linux-gnu"))

(define-public u-boot-sifive-unmatched
- (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
- (package
- (inherit base)
- (version (package-version u-boot-2021.07))
- (source (package-source u-boot-2021.07)))))
+ (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))

(define-public u-boot-rock64-rk3328
(let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu")))
@@ -951,9 +937,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(define-public u-boot-pinebook-pro-rk3399
(let ((base (make-u-boot-package "pinebook-pro-rk3399" "aarch64-linux-gnu")))
(package
- (inherit base)
- (version (package-version u-boot-2021.07))
- (source (package-source u-boot-2021.07))
+ (inherit base)
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
--
2.32.0
M
M
Mathieu Othacehe wrote on 25 Jul 2021 17:55
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
875ywyqtfj.fsf@gnu.org
Hello Pierre,

Toggle quote (7 lines)
> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
> [native-inputs]: Add python-pycryptodomex.
> (u-boot-2021.07): Delete variable.
> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
> (u-boot-sifive-unmatched): Use default u-boot package.
> (u-boot-pinebook-pro-rk3328): Use default u-boot package.

This seems fine to me, Vagrant any objections here?

Thanks,

Mathieu
V
V
Vagrant Cascadian wrote on 25 Jul 2021 19:06
(address . 49552@debbugs.gnu.org)
87lf5ugw71.fsf@yucca
On 2021-07-25, Mathieu Othacehe wrote:
Toggle quote (9 lines)
>> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
>> [native-inputs]: Add python-pycryptodomex.
>> (u-boot-2021.07): Delete variable.
>> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
>> (u-boot-sifive-unmatched): Use default u-boot package.
>> (u-boot-pinebook-pro-rk3328): Use default u-boot package.
>
> This seems fine to me, Vagrant any objections here?

Heh. Just uploaded 2021.07 to Debian last night! Been meaning to look at
updating in guix, but apparently someone beat me to it :)

Overall, sounds fine to me, with one relatively minor change...

u-boot-sifive-unmatched will need a pretty trivial patch in order to
update to 2021.07:


At least, it did when building on Debian (and apparently Ubuntu)...


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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYP2aAgAKCRDcUY/If5cW
qoI+AQCH6wzUY0GUSDkBT1hHeao/iU1Zim2x5gDyqpjyFcd9TgD9G08iCyfNGMN3
OkggqghzZSQHjilA5kDWWRo6cp1Ebwk=
=xRYN
-----END PGP SIGNATURE-----

P
P
Pierre Langlois wrote on 26 Jul 2021 12:54
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87mtq9s5ui.fsf@gmx.com
Hi!

Vagrant Cascadian writes:

Toggle quote (23 lines)
> On 2021-07-25, Mathieu Othacehe wrote:
>>> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
>>> [native-inputs]: Add python-pycryptodomex.
>>> (u-boot-2021.07): Delete variable.
>>> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
>>> (u-boot-sifive-unmatched): Use default u-boot package.
>>> (u-boot-pinebook-pro-rk3328): Use default u-boot package.
>>
>> This seems fine to me, Vagrant any objections here?
>
> Heh. Just uploaded 2021.07 to Debian last night! Been meaning to look at
> updating in guix, but apparently someone beat me to it :)
>
> Overall, sounds fine to me, with one relatively minor change...
>
> u-boot-sifive-unmatched will need a pretty trivial patch in order to
> update to 2021.07:
>
> https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
> https://salsa.debian.org/debian/u-boot/-/blob/debian/latest/debian/patches/riscv64/unmatched-prevent-relocating-initrd-and-fdt.patch
>
> At least, it did when building on Debian (and apparently Ubuntu)...

Sure, I've added the patch! I don't have any HW to test sifive unmatched
support though, I did test the update on a pinebookpro and rockpro64
when originally posting this, the new patch shouldn't affect them.

That being said, while it works on pinebookpro, I still need an extra
patch on the rockpro64 in order to boot, both on master with u-boot
2021.07 :-/ (see #49550).

Were you able to confirm the issue? I see it looks like we have the same
configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
"inno-usb" patch applied, mmmm

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmD+lGUYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UoOQIAMrpMHGaKlgoW8O8lXXKWLlk
48fcA8PEmtJ72mp+GGCHbqrgNsUu2JSoHuYckLIFv9WNVQWYx9Dk5YhYRS2KC+nq
5gMiwAPy/VqrX/gH4mVkCtlkAJHzi+qjfrVjQbxtUvB9fUh3WIDLMXBcDYE10Sbf
rfgpA6u2q2G6+LM2Zef/uIed5UUUN8Qg1oGmF5juKm+TIwLZvpeKUfflsLql9wCw
i02KwHQ3Pse19g/BqdujGtPvN1u3tAYVAv/lKwrWqmjjhO4ZPHgBP1P52apSZZE5
8WiKGkDjjIS6lufwuwdWW5wD9EnwSrxyxv+g5xXCSmD4iPRbsmbpbJDiSpeKni8=
=M9md
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 1 Aug 2021 23:03
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
87lf5k6fo4.fsf@yucca
On 2021-07-26, Pierre Langlois wrote:
Toggle quote (29 lines)
> Vagrant Cascadian writes:
>
>> On 2021-07-25, Mathieu Othacehe wrote:
>>>> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
>>>> [native-inputs]: Add python-pycryptodomex.
>>>> (u-boot-2021.07): Delete variable.
>>>> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
>>>> (u-boot-sifive-unmatched): Use default u-boot package.
>>>> (u-boot-pinebook-pro-rk3328): Use default u-boot package.
>>>
>>> This seems fine to me, Vagrant any objections here?
>>
>> Heh. Just uploaded 2021.07 to Debian last night! Been meaning to look at
>> updating in guix, but apparently someone beat me to it :)
>>
>> Overall, sounds fine to me, with one relatively minor change...
>>
>> u-boot-sifive-unmatched will need a pretty trivial patch in order to
>> update to 2021.07:
>>
>> https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
>> https://salsa.debian.org/debian/u-boot/-/blob/debian/latest/debian/patches/riscv64/unmatched-prevent-relocating-initrd-and-fdt.patch
>>
>> At least, it did when building on Debian (and apparently Ubuntu)...
>
> Sure, I've added the patch! I don't have any HW to test sifive unmatched
> support though, I did test the update on a pinebookpro and rockpro64
> when originally posting this, the new patch shouldn't affect them.

I have pretty high confidence it's needed, has low risk for breaking
other u-boot platforms, and riscv64 support in guix is pretty
experimental at this point so I would say safe to go with it untested at
this point... though at some point I can test it on actual hardware if
it really is needed.


Toggle quote (8 lines)
> That being said, while it works on pinebookpro, I still need an extra
> patch on the rockpro64 in order to boot, both on master with u-boot
> 2021.07 :-/ (see #49550).
>
> Were you able to confirm the issue? I see it looks like we have the same
> configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
> "inno-usb" patch applied, mmmm

Seems like you fixed the core of that problem in another commit!

Patch looks good to me, thanks for working on it!

live well,
vagrant


Toggle quote (176 lines)
> From 8a7b8f0b85a69fff085bd07da6777c1ebca31f74 Mon Sep 17 00:00:00 2001
> From: Pierre Langlois <pierre.langlois@gmx.com>
> Date: Sat, 10 Jul 2021 14:12:02 +0100
> Subject: [PATCH] gnu: u-boot: Update to 2021.07.
>
> * gnu/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
> [native-inputs]: Add python-pycryptodomex.
> (u-boot-2021.07): Delete variable.
> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
> (u-boot-sifive-unmatched): Use default u-boot package.
> (u-boot-pinebook-pro-rk3328): Use default u-boot package.
> ---
> gnu/local.mk | 1 +
> gnu/packages/bootloaders.scm | 48 ++++++++-----------
> ...sifive-prevent-relocating-initrd-fdt.patch | 16 +++++++
> 3 files changed, 36 insertions(+), 29 deletions(-)
> create mode 100644 gnu/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index b944c671af..495a94a988 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1772,6 +1772,7 @@ dist_patch_DATA = \
> %D%/packages/patches/tuxpaint-stamps-path.patch \
> %D%/packages/patches/twinkle-bcg729.patch \
> %D%/packages/patches/u-boot-rockchip-inno-usb.patch \
> + %D%/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch \
> %D%/packages/patches/u-boot-riscv64-fix-extlinux.patch \
> %D%/packages/patches/ucx-tcp-iface-ioctl.patch \
> %D%/packages/patches/udiskie-no-appindicator.patch \
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index 742992a119..09125b1582 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -12,7 +12,7 @@
> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
> ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
> ;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian <vagrant@debian.org>
> -;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
> +;;; Copyright © 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
> ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
> ;;;
> @@ -56,6 +56,7 @@
> #:use-module (gnu packages perl)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages python)
> + #:use-module (gnu packages python-crypto)
> #:use-module (gnu packages texinfo)
> #:use-module (gnu packages tls)
> #:use-module (gnu packages sdl)
> @@ -493,20 +494,26 @@ tree binary files. These are board description files used by Linux and BSD.")
> ;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io
> (search-patch "u-boot-rockchip-inno-usb.patch"))
>
> +(define %u-boot-sifive-prevent-relocating-initrd-fdt
> + ;; Fix boot in 2021.07 on Hifive unmatched, see
> + ;; https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
> + (search-patch "u-boot-sifive-prevent-relocating-initrd-fdt.patch"))
> +
> (define u-boot
> (package
> (name "u-boot")
> - (version "2021.04")
> + (version "2021.07")
> (source (origin
> (patches
> - (list %u-boot-rockchip-inno-usb-patch))
> + (list %u-boot-rockchip-inno-usb-patch
> + %u-boot-sifive-prevent-relocating-initrd-fdt))
> (method url-fetch)
> (uri (string-append
> "https://ftp.denx.de/pub/u-boot/"
> "u-boot-" version ".tar.bz2"))
> (sha256
> (base32
> - "06p1vymf0dl6jc2xy5w7p42mpgppa46lmpm2ishmgsycnldqnhqd"))))
> + "0zm7igkdnz0w4ir8rfl2dislfrl0ip104grs5hvd30a5wkm7wari"))))
> (native-inputs
> `(("bc" ,bc)
> ("bison" ,bison)
> @@ -516,6 +523,7 @@ tree binary files. These are board description files used by Linux and BSD.")
> ("perl" ,perl)
> ("python" ,python)
> ("python-coverage" ,python-coverage)
> + ("python-pycryptodomex" ,python-pycryptodomex)
> ("python-pytest" ,python-pytest)
> ("swig" ,swig)))
> (build-system gnu-build-system)
> @@ -525,21 +533,6 @@ tree binary files. These are board description files used by Linux and BSD.")
> also initializes the boards (RAM etc).")
> (license license:gpl2+)))
>
> -(define-public u-boot-2021.07
> - (package
> - (inherit u-boot)
> - (version "2021.07-rc4")
> - (source (origin
> - (patches
> - (list %u-boot-rockchip-inno-usb-patch))
> - (method url-fetch)
> - (uri (string-append
> - "https://ftp.denx.de/pub/u-boot/"
> - "u-boot-" version ".tar.bz2"))
> - (sha256
> - (base32
> - "0bnsywgy2b0jxim5h9dc807lqk5kq8hvgf4lcsmffnc0hf4isv8p"))))))
> -
> (define-public u-boot-tools
> (package
> (inherit u-boot)
> @@ -568,9 +561,12 @@ also initializes the boards (RAM etc).")
> ;; This test would require git.
> (("\\./tools/patman/patman") (which "true"))
> ;; FIXME: test fails, needs further investiation
> - (("run_test \"binman\"") ": run_test \"binman\"")
> + (("run_test \"binman\"") "# run_test \"binman\"")
> + ;; FIXME: test_spl fails, needs further investiation
> + (("test_ofplatdata or test_handoff or test_spl")
> + "test_ofplatdata or test_handoff")
> ;; FIXME: code coverage not working
> - (("run_test \"binman code coverage\"") ": run_test \"binman code coverage\"")
> + (("run_test \"binman code coverage\"") "# run_test \"binman code coverage\"")
> ;; This test would require internet access.
> (("\\./tools/buildman/buildman") (which "true")))
> (substitute* "test/py/tests/test_sandbox_exit.py"
> @@ -879,11 +875,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
> (make-u-boot-package "sifive_fu540" "riscv64-linux-gnu"))
>
> (define-public u-boot-sifive-unmatched
> - (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
> - (package
> - (inherit base)
> - (version (package-version u-boot-2021.07))
> - (source (package-source u-boot-2021.07)))))
> + (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))
>
> (define-public u-boot-rock64-rk3328
> (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu")))
> @@ -946,9 +938,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
> (define-public u-boot-pinebook-pro-rk3399
> (let ((base (make-u-boot-package "pinebook-pro-rk3399" "aarch64-linux-gnu")))
> (package
> - (inherit base)
> - (version (package-version u-boot-2021.07))
> - (source (package-source u-boot-2021.07))
> + (inherit base)
> (arguments
> (substitute-keyword-arguments (package-arguments base)
> ((#:phases phases)
> diff --git a/gnu/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch b/gnu/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch
> new file mode 100644
> index 0000000000..a5b92e3e8f
> --- /dev/null
> +++ b/gnu/packages/patches/u-boot-sifive-prevent-relocating-initrd-fdt.patch
> @@ -0,0 +1,16 @@
> +Description: prevent relocating initrd & fdt, that results in failure to boot
> +Author: Heinrich Schuchardt (xypron)
> +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
> +Index: u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h
> +===================================================================
> +--- u-boot-2021.07~rc4+dfsg.orig/include/configs/sifive-unmatched.h
> ++++ u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h
> +@@ -62,6 +62,8 @@
> + "name=system,size=-,bootable,type=${type_guid_gpt_system};"
> +
> + #define CONFIG_EXTRA_ENV_SETTINGS \
> ++ "fdt_high=0xffffffffffffffff\0" \
> ++ "initrd_high=0xffffffffffffffff\0" \
> + "kernel_addr_r=0x84000000\0" \
> + "fdt_addr_r=0x88000000\0" \
> + "scriptaddr=0x88100000\0" \
> --
> 2.32.0
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYQcMKwAKCRDcUY/If5cW
qu9jAQD4z8BsoIDa7xskzaQTtXDClgmECvv7g38LKhloHPaM6QD+OziCRoFBFXB7
/+Bsys9H15453mX033+VQTLyv8ea4QA=
=nJta
-----END PGP SIGNATURE-----

P
P
Pierre Langlois wrote on 2 Aug 2021 14:31
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87lf5k81qm.fsf@gmx.com
Hi!

Vagrant Cascadian <vagrant@debian.org> writes:

Toggle quote (37 lines)
> [[PGP Signed Part:Undecided]]
> On 2021-07-26, Pierre Langlois wrote:
>> Vagrant Cascadian writes:
>>
>>> On 2021-07-25, Mathieu Othacehe wrote:
>>>>> * gnu/packages/bootloaders.scm (u-boot): Update to 2021.07.
>>>>> [native-inputs]: Add python-pycryptodomex.
>>>>> (u-boot-2021.07): Delete variable.
>>>>> (u-boot-tools)[arguments]: Adapt 'patch phase, disable failing test_spl test.
>>>>> (u-boot-sifive-unmatched): Use default u-boot package.
>>>>> (u-boot-pinebook-pro-rk3328): Use default u-boot package.
>>>>
>>>> This seems fine to me, Vagrant any objections here?
>>>
>>> Heh. Just uploaded 2021.07 to Debian last night! Been meaning to look at
>>> updating in guix, but apparently someone beat me to it :)
>>>
>>> Overall, sounds fine to me, with one relatively minor change...
>>>
>>> u-boot-sifive-unmatched will need a pretty trivial patch in order to
>>> update to 2021.07:
>>>
>>> https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
>>> https://salsa.debian.org/debian/u-boot/-/blob/debian/latest/debian/patches/riscv64/unmatched-prevent-relocating-initrd-and-fdt.patch
>>>
>>> At least, it did when building on Debian (and apparently Ubuntu)...
>>
>> Sure, I've added the patch! I don't have any HW to test sifive unmatched
>> support though, I did test the update on a pinebookpro and rockpro64
>> when originally posting this, the new patch shouldn't affect them.
>
> I have pretty high confidence it's needed, has low risk for breaking
> other u-boot platforms, and riscv64 support in guix is pretty
> experimental at this point so I would say safe to go with it untested at
> this point... though at some point I can test it on actual hardware if
> it really is needed.

Sounds good to me!

Toggle quote (14 lines)
>
>
>> That being said, while it works on pinebookpro, I still need an extra
>> patch on the rockpro64 in order to boot, both on master with u-boot
>> 2021.07 :-/ (see #49550).
>>
>> Were you able to confirm the issue? I see it looks like we have the same
>> configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
>> "inno-usb" patch applied, mmmm
>
> Seems like you fixed the core of that problem in another commit!
>
> Patch looks good to me, thanks for working on it!

Thanks for the review! I've just pushed it as
eb46c6c5c81695af475f7e1e416d05e51157fe60, with a couple of tweaks to
make `guix lint' happy (the patch filename was a little too long, as
well as a line was over the column limit).

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmEH5jEYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U5EYH/0lkvpkAJgX/42ho8aIIvtf1
EBY12H9H0W7B/tzocKnJ8hGMli8/CX0L3dnq7sgW9xvHS/RpaJ2cUu7cMNVi3iN3
VTIyf7U0kzDfH7O8IhhtqRVFtLFBBKlf9sUmLGFyfOLIUmTjPJ3iJH6WcKbO02xe
Wlwk/9aG6paTXCkZWW151vOlZOIKsniVpVR+tyMMrAk9KQ5JlQzXvQ5ZxHL+2UyX
DqKNMEgoMbwIrTtuuYprG7JXABoszDTB4WfMsyDjUz7J4rmLLZiy0e/9fdXOiJVd
PF3IXXmLv0+w0F0XipW0OCwc3aJUCkaGnuPO5hcXQjVgot/xZn/29hoRR8Eufs8=
=/XU1
-----END PGP SIGNATURE-----

Closed
P
P
Pierre Langlois wrote on 2 Aug 2021 18:02
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87im0n966g.fsf@gmx.com
Hello,

Pierre Langlois <pierre.langlois@gmx.com> writes:

(snip)

Toggle quote (17 lines)
>>> That being said, while it works on pinebookpro, I still need an extra
>>> patch on the rockpro64 in order to boot, both on master with u-boot
>>> 2021.07 :-/ (see #49550).
>>>
>>> Were you able to confirm the issue? I see it looks like we have the same
>>> configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
>>> "inno-usb" patch applied, mmmm
>>
>> Seems like you fixed the core of that problem in another commit!
>>
>> Patch looks good to me, thanks for working on it!
>
> Thanks for the review! I've just pushed it as
> eb46c6c5c81695af475f7e1e416d05e51157fe60, with a couple of tweaks to
> make `guix lint' happy (the patch filename was a little too long, as
> well as a line was over the column limit).

It turns out I broke a few u-boot packages :-/ https://ci.guix.gnu.org/eval/70864?status=failed

u-boot-tools failing to build on aarch64 appears to be unrelated, it's
due to libical which builds just fine for me on my rockpro64. However
u-boot-vexpress, u-boot-sifive-fu540 and u-boot-qemu-riscv64-smode are
real issues. Here are a couple of patches for them, they're pretty
trivial so I'll push them soon unless anybody objects:
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmEIGXcYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U2RYH/2AVX5iKOenm4buRB3Qqg+1b
43WZTrOgZJ91tew1sdsv7cree9cgHK0mJxS2IglCs5jIWOSXCO8/xKm1Ck0AyJCn
Is0R6p74hs2/G9BqjM4pa3m+/d4H709fEWtpMDoXUeR/zbGEqYd0mq1VtLtpmwJX
9i1HLEPJoO5SeypgkKOr/jXu0GKQqWEffdP+6ufsxWsbXYf1nUmAoxpEin3hEWHY
eOwAVax+wvh3QYJCZctI2jagVqXPdZ/thuvcGbO+VpNBZP4O0y3li30a/HzoiDvY
NBhS9pqyaKu8eVMMXfcK5uikwJGzBVr7ETTPAxV/DebyT+N7Tsa/cTwMWL7BYt8=
=W12+
-----END PGP SIGNATURE-----

From bb4f2831531b29194d5de499a52f6bf8aaaf93ad Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Mon, 2 Aug 2021 15:05:49 +0100
Subject: [PATCH 1/2] gnu: u-boot-vexpress: Downgrade to 2021.04.

* gnu/packages/bootloaders.scm (u-boot-2021.04): New variable.
(u-boot-vexpress): Downgrade to 2021.04.
---
gnu/packages/bootloaders.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 504b89f122..c64f5a09d5 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -533,6 +533,20 @@ tree binary files. These are board description files used by Linux and BSD.")
also initializes the boards (RAM etc).")
(license license:gpl2+)))

+(define u-boot-2021.04
+ (package
+ (inherit u-boot)
+ (version "2021.04")
+ (source (origin
+ (patches (list %u-boot-rockchip-inno-usb-patch))
+ (method url-fetch)
+ (uri (string-append
+ "https://ftp.denx.de/pub/u-boot/"
+ "u-boot-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "06p1vymf0dl6jc2xy5w7p42mpgppa46lmpm2ishmgsycnldqnhqd"))))))
+
(define-public u-boot-tools
(package
(inherit u-boot)
@@ -714,7 +728,12 @@ board-independent tools.")))
#t)))))))))

(define-public u-boot-vexpress
- (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
+ ;; vexpress_ca9x4 support was removed with version 2021.07,
+ ;; see https://lists.denx.de/pipermail/u-boot/2021-February/440803.html.
+ (package
+ (inherit (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
+ (version (package-version u-boot-2021.04))
+ (source (package-source u-boot-2021.04))))

(define-public u-boot-malta
(make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
--
2.32.0
From 26957dac52584457d43d6139e2edc49074c7ca44 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Mon, 2 Aug 2021 15:13:11 +0100
Subject: [PATCH 2/2] gnu: Rename u-boot-sifive-fu540 to sifive-unleashed.

* gnu/packages/bootloaders.scm (u-boot-sifive-fu540): Rename to ...
(u-boot-sifive-unleashed): ... this. Change board name from sifive_fu540 to
sifive_unleashed.
* gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: Rename sifive_fu540
to sifive_unleashed.
---
gnu/packages/bootloaders.scm | 4 ++--
gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c64f5a09d5..9b1bcf9da6 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -891,8 +891,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(patches
(search-patches "u-boot-riscv64-fix-extlinux.patch")))))))

-(define-public u-boot-sifive-fu540
- (make-u-boot-package "sifive_fu540" "riscv64-linux-gnu"))
+(define-public u-boot-sifive-unleashed
+ (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))

(define-public u-boot-sifive-unmatched
(make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))
diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
index d6c1987718..468024ab00 100644
--- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
+++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
@@ -30,8 +30,8 @@ Index: u-boot/configs/qemu-riscv64_smode_defconfig
+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
Index: u-boot/configs/sifive_fu540_defconfig
===================================================================
---- u-boot.orig/configs/sifive_fu540_defconfig
-+++ u-boot/configs/sifive_fu540_defconfig
+--- u-boot.orig/configs/sifive_unleashed_defconfig
++++ u-boot/configs/sifive_unleashed_defconfig
@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SPL_CLK=y
CONFIG_DM_MTD=y
--
2.32.0
Thanks,
Pierre
Closed
V
V
Vagrant Cascadian wrote on 2 Aug 2021 21:32
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
87im0nve01.fsf@ponder
On 2021-08-02, Pierre Langlois wrote:
Toggle quote (18 lines)
> Pierre Langlois <pierre.langlois@gmx.com> writes:
>>>> That being said, while it works on pinebookpro, I still need an extra
>>>> patch on the rockpro64 in order to boot, both on master with u-boot
>>>> 2021.07 :-/ (see #49550).
>>>>
>>>> Were you able to confirm the issue? I see it looks like we have the same
>>>> configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
>>>> "inno-usb" patch applied, mmmm
>>>
>>> Seems like you fixed the core of that problem in another commit!
>>>
>>> Patch looks good to me, thanks for working on it!
>>
>> Thanks for the review! I've just pushed it as
>> eb46c6c5c81695af475f7e1e416d05e51157fe60, with a couple of tweaks to
>> make `guix lint' happy (the patch filename was a little too long, as
>> well as a line was over the column limit).

Great!

Toggle quote (2 lines)
> It turns out I broke a few u-boot packages :-/ https://ci.guix.gnu.org/eval/70864?status=failed

Oh well...

Toggle quote (3 lines)
> u-boot-tools failing to build on aarch64 appears to be unrelated, it's
> due to libical which builds just fine for me on my rockpro64.

hrm... yeah, it has been a while since libical succeeded on aarch64:


Might be another case where the package doesn't build on some of the
virtualized machines but builds fine on real hardware...


Appears to have built fine on bordeaux:

$ guix weather libical
computing 1 package derivations for aarch64-linux...
looking for 1 store items on https://ci.guix.gnu.org...
0.0% substitutes available (0 out of 1)
unknown substitute sizes
0.0 MiB on disk (uncompressed)
0.723 seconds per request (0.7 seconds in total)
1.4 requests per second

0.0% (0 out of 1) of the missing items are queued
1 queued builds
aarch64-linux: 1 (100.0%)
build rate: .00 builds per hour
x86_64-linux: 39.79 builds per hour
i686-linux: 0.00 builds per hour
aarch64-linux: 0.00 builds per hour
looking for 1 store items on https://bordeaux.guix.gnu.org...
100.0% substitutes available (1 out of 1)
0.5 MiB of nars (compressed)
7.4 MiB on disk (uncompressed)
0.872 seconds per request (0.9 seconds in total)
1.1 requests per second
(continuous integration information unavailable)


Toggle quote (2 lines)
> However u-boot-vexpress

I suspect u-boot-vexpress should just be dropped. The hardware was
always unobtanium (e.g. you can't get it even with absurd sums of
money); the only use-case was it was a platform supported in qemu early
on, but there are better virtualization platform options these days
(e.g. virt)...


Toggle quote (15 lines)
> u-boot-sifive-fu540 and u-boot-qemu-riscv64-smode are
> real issues. Here are a couple of patches for them, they're pretty
> trivial so I'll push them soon unless anybody objects:

> From 26957dac52584457d43d6139e2edc49074c7ca44 Mon Sep 17 00:00:00 2001
> From: Pierre Langlois <pierre.langlois@gmx.com>
> Date: Mon, 2 Aug 2021 15:13:11 +0100
> Subject: [PATCH 2/2] gnu: Rename u-boot-sifive-fu540 to sifive-unleashed.

> * gnu/packages/bootloaders.scm (u-boot-sifive-fu540): Rename to ...
> (u-boot-sifive-unleashed): ... this. Change board name from sifive_fu540 to
> sifive_unleashed.
> * gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: Rename sifive_fu540
> to sifive_unleashed.

Ah, sorry, I should have caught this, as I had to do this in the Debian
packages too (but an earlier upload, so not as fresh in my
memory)...

Patch looks good to me, for what it's worth. :)

It might normally be good to make a deprecated package for the name
change, but again, since riscv64 is so experimental in guix it is
probably not worth cluttering up with niche deprecated packages like
this...


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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYQhIZgAKCRDcUY/If5cW
qtUhAQCWVStDPtSqBvuWMKcW0Ck1xpFwVIk/DwWg3e8GlrIUNAEAngN78MTI+eLZ
JrAj9uHz2g2WGh/haipAWGFayQntUA0=
=WADA
-----END PGP SIGNATURE-----

P
P
Pierre Langlois wrote on 5 Aug 2021 14:37
(name . Vagrant Cascadian)(address . vagrant@debian.org)
87eeb8t667.fsf@gmx.com
Hi!

Vagrant Cascadian <vagrant@debian.org> writes:

Toggle quote (74 lines)
> [[PGP Signed Part:Undecided]]
> On 2021-08-02, Pierre Langlois wrote:
>> Pierre Langlois <pierre.langlois@gmx.com> writes:
>>>>> That being said, while it works on pinebookpro, I still need an extra
>>>>> patch on the rockpro64 in order to boot, both on master with u-boot
>>>>> 2021.07 :-/ (see #49550).
>>>>>
>>>>> Were you able to confirm the issue? I see it looks like we have the same
>>>>> configuration in debian and guix, CONFIG_USE_PREBOOT=y and the
>>>>> "inno-usb" patch applied, mmmm
>>>>
>>>> Seems like you fixed the core of that problem in another commit!
>>>>
>>>> Patch looks good to me, thanks for working on it!
>>>
>>> Thanks for the review! I've just pushed it as
>>> eb46c6c5c81695af475f7e1e416d05e51157fe60, with a couple of tweaks to
>>> make `guix lint' happy (the patch filename was a little too long, as
>>> well as a line was over the column limit).
>
> Great!
>
>> It turns out I broke a few u-boot packages :-/ https://ci.guix.gnu.org/eval/70864?status=failed
>
> Oh well...
>
>> u-boot-tools failing to build on aarch64 appears to be unrelated, it's
>> due to libical which builds just fine for me on my rockpro64.
>
> hrm... yeah, it has been a while since libical succeeded on aarch64:
>
> https://ci.guix.gnu.org/search?query=libical+system%3Aaarch64-linux
>
> Might be another case where the package doesn't build on some of the
> virtualized machines but builds fine on real hardware...
>
>
> Appears to have built fine on bordeaux:
>
> $ guix weather libical
> computing 1 package derivations for aarch64-linux...
> looking for 1 store items on https://ci.guix.gnu.org...
> https://ci.guix.gnu.org
> 0.0% substitutes available (0 out of 1)
> unknown substitute sizes
> 0.0 MiB on disk (uncompressed)
> 0.723 seconds per request (0.7 seconds in total)
> 1.4 requests per second
>
> 0.0% (0 out of 1) of the missing items are queued
> 1 queued builds
> aarch64-linux: 1 (100.0%)
> build rate: .00 builds per hour
> x86_64-linux: 39.79 builds per hour
> i686-linux: 0.00 builds per hour
> aarch64-linux: 0.00 builds per hour
> looking for 1 store items on https://bordeaux.guix.gnu.org...
> https://bordeaux.guix.gnu.org
> 100.0% substitutes available (1 out of 1)
> 0.5 MiB of nars (compressed)
> 7.4 MiB on disk (uncompressed)
> 0.872 seconds per request (0.9 seconds in total)
> 1.1 requests per second
> (continuous integration information unavailable)
>
>
>> However u-boot-vexpress
>
> I suspect u-boot-vexpress should just be dropped. The hardware was
> always unobtanium (e.g. you can't get it even with absurd sums of
> money); the only use-case was it was a platform supported in qemu early
> on, but there are better virtualization platform options these days
> (e.g. virt)...

Oh I see, I was curious why it had been added, assuming somebody had
access to this board and probably still cared. If not, I agree let's
remove it!

Toggle quote (21 lines)
>
>
>> u-boot-sifive-fu540 and u-boot-qemu-riscv64-smode are
>> real issues. Here are a couple of patches for them, they're pretty
>> trivial so I'll push them soon unless anybody objects:
>
>> From 26957dac52584457d43d6139e2edc49074c7ca44 Mon Sep 17 00:00:00 2001
>> From: Pierre Langlois <pierre.langlois@gmx.com>
>> Date: Mon, 2 Aug 2021 15:13:11 +0100
>> Subject: [PATCH 2/2] gnu: Rename u-boot-sifive-fu540 to sifive-unleashed.
>
>> * gnu/packages/bootloaders.scm (u-boot-sifive-fu540): Rename to ...
>> (u-boot-sifive-unleashed): ... this. Change board name from sifive_fu540 to
>> sifive_unleashed.
>> * gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch: Rename sifive_fu540
>> to sifive_unleashed.
>
> Ah, sorry, I should have caught this, as I had to do this in the Debian
> packages too (but an earlier upload, so not as fresh in my
> memory)...

No worries! I should have made sure to build all dependents.

Toggle quote (8 lines)
>
> Patch looks good to me, for what it's worth. :)
>
> It might normally be good to make a deprecated package for the name
> change, but again, since riscv64 is so experimental in guix it is
> probably not worth cluttering up with niche deprecated packages like
> this...

SGTM!

I'll push a patch to remove the vexpress board support and the renaming
patch shortly.

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmEL3IAYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UOGMH/38IuyGWwEvY67AxrVyicM5M
kG7K0BcnxJr+JMucjAdWC4jB2rSdN4LyBFSg85JI4QybuF+ekBZhgQIcWGgwgt4j
eywXX9Bko8Y7fKe9sBuy3knn04+glOW5LlvHzunyO4sudx1+ovRUB775mBwYIhJK
GDGrKH4Al60x4wUA4m2lb5vQ8s51/ZB57ymGMkPDWGP7H1ynGSGw33xug6Cfkt72
ONlPmleiXkBYC3RUX4n9hZdf7Z6JR7CACYq+lN8TtmxhW8Bhy0P6XQ32tnIGNoDg
KD6iQlSt6+i5dbzCdAP9LTQhtfIkXLFSjQjagI2Fr6tmbf0lTQCysnX0p7vzKC4=
=SV7d
-----END PGP SIGNATURE-----

?