Patch series to support pinebook

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Vagrant Cascadian
Severity
normal

Debbugs page

Vagrant Cascadian wrote 6 years ago
(address . guix-patches@gnu.org)
878t1nv3wd.fsf@aikidev.net
The attached patch series adds support for the pine64.org Pinebook
laptop (similar to the Pine64+ already in Guix).

Summary of changes:
- Update arm-trusted-firmware-pine64-plus to use upstream git repository
and newer commit.
- Rename arm-trusted-firmware-pine64-plus to.
arm-trusted-firmware-sun50i-a64 to be consistant with upstream.
- Add a make-u-boot-package-sunxi64 wrapper function based on the
u-boot-pine64-plus target.
- Add support for u-boot-pinebook, with patches from the u-boot sunxi
maintainer tree backported to 2018.11.

I wasn't sure weather some of these patches should be squashed together
or not (especially 1 and 2, maybe 3 and 4).

I used patches on top of the u-boot 2018.11 release rather than a git
repository with the patches included, as it took a much longer time to
download the git respository and more disk space, though I can take
another look at using the git repository if that is preferred.


live well,
vagrant
From f227d7a113818029104ee78d8ebad54582de48e3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Mon, 5 Nov 2018 21:58:02 +0000
Subject: [PATCH 1/4] gnu: arm-trusted-firmware-pine64-plus: Update to
2.0-1.cabe0a3.

* gnu/packages/firmware.scm (arm-trusted-firmware-pine64-plus)
[version]: Update to 2.0-1.cabe0a3,
[source](uri): Use upstream git repository.
Use platform name from upstream (sun50i_a64).
---
gnu/packages/firmware.scm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 0b5a82e9e..90797e013 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -447,24 +447,25 @@ such as:
license:bsd-2)))) ; libfdt
(define-public arm-trusted-firmware-pine64-plus
- (let ((base (make-arm-trusted-firmware "sun50iw1p1"))
- ;; Vendor's arm trusted firmware branch hasn't been upstreamed yet.
- (commit "ae78724247a01560164d607ed66db111c74d8df0")
+ (let ((base (make-arm-trusted-firmware "sun50i_a64"))
+ ;; Use unreleased version which enables additional features needed for
+ ;; LCD support
+ (commit "cabe0a31801e99e7abb84d2114ded6bb56f3c71e")
(revision "1"))
(package
(inherit base)
(name "arm-trusted-firmware-pine64-plus")
- (version (string-append "1.2-" revision "." (string-take commit 7)))
+ (version (git-version "2.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/apritzel/arm-trusted-firmware.git")
+ (url "https://github.com/ARM-software/arm-trusted-firmware.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
- "0r4xnlq7v9khjfcg6gqp7nmrmnw4z1r8bipwdr07png1dcbb8214")))))))
+ "0srw2zj3vn5d2fwzjpwa5h70d5bwvb79jnpdvmd395npv0gxshdz")))))))
(define-public arm-trusted-firmware-puma-rk3399
(let ((base (make-arm-trusted-firmware "rk3399"))
--
2.11.0
From daf0962814ee61032ae29958daac3fa0997292c5 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 14 Nov 2018 16:53:14 +0000
Subject: [PATCH 2/4] gnu: arm-trusted-firmware-pine64-plus: Rename variable to
arm-trusted-firmware-sun50i-a64.

* gnu/packages/firmware (arm-trusted-firmware-pine64-plus): Rename variable to
arm-trusted-firmware-sun50i-a64.
* gnu/packages/bootloaders (u-boot-pine64-plus) [native-inputs]: Replace with
arm-trusted-firmware-sun50i-a64.
---
gnu/packages/bootloaders.scm | 2 +-
gnu/packages/firmware.scm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 2fa50a89b..3e4c8bb0b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -573,7 +573,7 @@ board-independent tools.")))
)
#t))))))
(native-inputs
- `(("firmware" ,arm-trusted-firmware-pine64-plus)
+ `(("firmware" ,arm-trusted-firmware-sun50i-a64)
,@(package-native-inputs base))))))
(define-public u-boot-bananapi-m2-ultra
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 90797e013..c396cd644 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -446,7 +446,7 @@ such as:
(license (list license:bsd-3
license:bsd-2)))) ; libfdt
-(define-public arm-trusted-firmware-pine64-plus
+(define-public arm-trusted-firmware-sun50i-a64
(let ((base (make-arm-trusted-firmware "sun50i_a64"))
;; Use unreleased version which enables additional features needed for
;; LCD support
@@ -454,7 +454,7 @@ such as:
(revision "1"))
(package
(inherit base)
- (name "arm-trusted-firmware-pine64-plus")
+ (name "arm-trusted-firmware-sun50i-a64")
(version (git-version "2.0" revision commit))
(source
(origin
--
2.11.0
From bd253c8cf018ecd8c8f34ecfba19636b37057960 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Mon, 19 Nov 2018 21:04:48 -0800
Subject: [PATCH 3/4] gnu: make-u-boot-package-sunxi64: New variable.

* gnu/packages/bootloaders.scm (make-u-boot-package-sunxi64): New varaible.
(u-boot-pine64-plus): Switch to using make-u-boot-package-sunxi64.
---
gnu/packages/bootloaders.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 3e4c8bb0b..21de88443 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -554,8 +554,8 @@ board-independent tools.")))
(define-public u-boot-beagle-bone-black
(make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
-(define-public u-boot-pine64-plus
- (let ((base (make-u-boot-package "pine64_plus" "aarch64-linux-gnu")))
+(define-public (make-u-boot-package-sunxi64 board triplet)
+ (let ((base (make-u-boot-package board triplet)))
(package
(inherit base)
(arguments
@@ -576,6 +576,9 @@ board-independent tools.")))
`(("firmware" ,arm-trusted-firmware-sun50i-a64)
,@(package-native-inputs base))))))
+(define-public u-boot-pine64-plus
+ (make-u-boot-package-sunxi64 "pine64_plus" "aarch64-linux-gnu"))
+
(define-public u-boot-bananapi-m2-ultra
(make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf"))
--
2.11.0
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCW/R7ggAKCRDcUY/If5cW
qjxYAP9nJ2o1/reEk8gVVFyihxw6d3CzQ5qR752HEZu5b8MYKwEAnfv/DjDwojpi
ANF4zh2kNu6BADmO7l03sYv5h96soAk=
=nm0c
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 33447@debbugs.gnu.org)
20181120235250.65eff9ac@scratchpost.org
Hi Vagrant,

On Tue, 20 Nov 2018 13:24:18 -0800
Vagrant Cascadian <vagrant@debian.org> wrote:

Toggle quote (4 lines)
> Summary of changes:
> - Update arm-trusted-firmware-pine64-plus to use upstream git repository
> and newer commit.

Hmm, okay for now - would be nice to eventually use a stable release.

Toggle quote (3 lines)
> - Rename arm-trusted-firmware-pine64-plus to
> arm-trusted-firmware-sun50i-a64 to be consistant with upstream.

OK!

Toggle quote (3 lines)
> - Add a make-u-boot-package-sunxi64 wrapper function based on the
> u-boot-pine64-plus target.

OK except for the name :)

Toggle quote (3 lines)
> - Add support for u-boot-pinebook, with patches from the u-boot sunxi
> maintainer tree backported to 2018.11.

OK!

Toggle quote (3 lines)
> I wasn't sure weather some of these patches should be squashed together
> or not (especially 1 and 2, maybe 3 and 4).

I'm always trying to keep user-visible changes apart as much as possible
(in extra commits).

The reason is that if we decide to only partially apply, it's much easier
to do it (also to be able to revert only part and keep the functionality
intact).

For example the renaming of a public variable is something that's visible
to the user but not essential to the functioning of the thing.
If it turns out to cause trouble, we could back just that one out.

Toggle quote (5 lines)
> I used patches on top of the u-boot 2018.11 release rather than a git
> repository with the patches included, as it took a much longer time to
> download the git respository and more disk space, though I can take
> another look at using the git repository if that is preferred.

I prefer patches on top of a release to using a different git repository -
the latter can be a real drain on us since we want to verify the integrity of
the external repository - if there are too many of those in Guix.

That said, there are exceptions, but in this specific case I'd definitely
keep it as release & patches because it makes it obvious how invasive we
are in patching our package (Note: I agree that we should do patch it in
this case - some of the patches are to undo upstream breaking backward
compatibility, others are to add new platforms, others are to increase
resilience; also, they come from u-boot-sunxi anyway).

In the end, your patchset failed to apply cleanly. Nevertheless, I've
cleaned up the first three patches (changed the commit message to our
conventions; also took the liberty to rename "make-u-boot-package-sunxi64"
to "make-u-boot-sunxi64-package") and pushed those to guix master since
they are self-contained.

Could you send a variant of patch 4/4 that applies cleanly? (this one
fails because of conflicting changes in gnu/local.mk)

Also, could you use small letters in the name of the files of the patches
in gnu/packages/patches ?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlv0kEIACgkQ5xo1VCww
uqV+eAf/VQHkz8XbpEF8NL9yB5Tust0djy5gIfTO/D0F66NrGrruJNnyldTvFEZ2
tDEa18cKGxZrpGXhKZI3QsvrtF7c4I8CgfZNVKlOVqk83tqdAI6i/GcrVomoLQAI
BzSajfTj7ed6LmoqaiYiWF+IttaE5tbnb2J6IfVvMKAblmrQ95K+GhfGnjUCmn9i
Rt1Yr5TTiaA6YrcOq9ZGdU75UqopxN9kAeTd4Iy7hc1i2ZreoYUGVMk4jtgR1myu
qqYV0paLh/g4bk0Q+KFz+vuQ5U5sOZ59ODcaBtzwPslRVFr2fbLv+nSopGUc8E1S
CBMr03A9Y8zmK7tfqzJX/SKzKlUOCA==
=GzKN
-----END PGP SIGNATURE-----


Vagrant Cascadian wrote 6 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 33447@debbugs.gnu.org)
875zwruv73.fsf@aikidev.net
On 2018-11-20, Danny Milosavljevic wrote:
Toggle quote (8 lines)
> On Tue, 20 Nov 2018 13:24:18 -0800
> Vagrant Cascadian <vagrant@debian.org> wrote:
>> Summary of changes:
>> - Update arm-trusted-firmware-pine64-plus to use upstream git repository
>> and newer commit.
>
> Hmm, okay for now - would be nice to eventually use a stable release.

Well, it will presumably be in the next release finally!

I did have a minor patch update to update arm-trusted-firmware to v2.0,
but there aren't yet any targets that can make use of that without
loosing functionality.


Toggle quote (10 lines)
>> - Rename arm-trusted-firmware-pine64-plus to
>> arm-trusted-firmware-sun50i-a64 to be consistant with upstream.
>
> OK!
>
>> - Add a make-u-boot-package-sunxi64 wrapper function based on the
>> u-boot-pine64-plus target.
>
> OK except for the name :)

Works for me.

I did notice the os-with-u-boot and various other functions which
directly call make-u-boot-package will break with this. Though for
targets that need additions on top of make-u-boot-package anyways
(pine64, pinebook, puma-rk3399) those still break anyways.


Toggle quote (19 lines)
>> - Add support for u-boot-pinebook, with patches from the u-boot sunxi
>> maintainer tree backported to 2018.11.
>
> OK!
>
>> I wasn't sure weather some of these patches should be squashed together
>> or not (especially 1 and 2, maybe 3 and 4).
>
> I'm always trying to keep user-visible changes apart as much as possible
> (in extra commits).
>
> The reason is that if we decide to only partially apply, it's much easier
> to do it (also to be able to revert only part and keep the functionality
> intact).
>
> For example the renaming of a public variable is something that's visible
> to the user but not essential to the functioning of the thing.
> If it turns out to cause trouble, we could back just that one out.

Makes sense to me, thanks for the explanation.


Toggle quote (9 lines)
>> I used patches on top of the u-boot 2018.11 release rather than a git
>> repository with the patches included, as it took a much longer time to
>> download the git respository and more disk space, though I can take
>> another look at using the git repository if that is preferred.
>
> I prefer patches on top of a release to using a different git repository -
> the latter can be a real drain on us since we want to verify the integrity of
> the external repository - if there are too many of those in Guix.

Ok.

Toggle quote (7 lines)
> That said, there are exceptions, but in this specific case I'd definitely
> keep it as release & patches because it makes it obvious how invasive we
> are in patching our package (Note: I agree that we should do patch it in
> this case - some of the patches are to undo upstream breaking backward
> compatibility, others are to add new platforms, others are to increase
> resilience; also, they come from u-boot-sunxi anyway).

Works for me. FWIW these patches landed in mainline u-boot git since I
started working on it, so only need to be maintained ~2 months more. :)


Toggle quote (6 lines)
> In the end, your patchset failed to apply cleanly. Nevertheless, I've
> cleaned up the first three patches (changed the commit message to our
> conventions; also took the liberty to rename "make-u-boot-package-sunxi64"
> to "make-u-boot-sunxi64-package") and pushed those to guix master since
> they are self-contained.

Great!


Toggle quote (6 lines)
> Could you send a variant of patch 4/4 that applies cleanly? (this one
> fails because of conflicting changes in gnu/local.mk)
>
> Also, could you use small letters in the name of the files of the patches
> in gnu/packages/patches ?

Updated patch, with lower case and some slight renaming of the patches, and
updated make-u-boot-sunxi64-package call.

Thanks!


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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCW/SnkAAKCRDcUY/If5cW
qpJaAP9ZFViYJmn+iVF8A6ZEJxxoc1lggJQWxDbsbZLzlCf0qAEAhQ0kbTEkVSeg
ewQZ6N2RE6oUTV2ZMImFodCKm2jpiAg=
=QAPr
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 33447-done@debbugs.gnu.org)
20181122221117.49914167@scratchpost.org
Hi Vagrant,

On Tue, 20 Nov 2018 16:32:16 -0800
Vagrant Cascadian <vagrant@debian.org> wrote:

Toggle quote (5 lines)
> I did notice the os-with-u-boot and various other functions which
> directly call make-u-boot-package will break with this. Though for
> targets that need additions on top of make-u-boot-package anyways
> (pine64, pinebook, puma-rk3399) those still break anyways.

Yeah, os-with-u-boot is not really useful right now - it would be nice to have
something like it but as long as upstream u-boot doesn't include the respective
installer themselves we can't be generic enough - or we'd have to depend on
buildroot and genimage.

So don't worry about it for now.

I've applied this patch as commit 74e35e8c94193a03cb1db61934340540ce0884a3 to
guix master.

Thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlv3G3UACgkQ5xo1VCww
uqXuqwf9EqLHRhUed4xlE5oU3ZVcjkgyXCn4rsjLi6Jp16zSHVsyR5M5jv4jj2aq
MrHRnVVLT2TzTnZ09GHxIVbSBBXSX74tyjpS5LWCppdsDBCDfU3r+HouVBBonuHG
XyuO3OlFa8FSKW36AsObYL0QNOJzrTrreTpNc0xeohwP1YUBv3okDzd24qaSwWUO
yhpR5xfjOg511f22+ldLI7PRoidOCekqw2tsC6NHktpZmR7EnonlPE0TIsC68H0o
GYNtXbtlpyIpKII3BvALonlix2/dGM75v1xIIdGb5pm73HTUvaVL7cOi0IhLyi6L
84FcwNcp4fuPKGaNEBQLC0JFBjwMWw==
=qcKR
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 33447
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help