[PATCH] Update to use panfrost for graphics hardware acceleration

  • Open
  • quality assurance status badge
Details
2 participants
  • Brian Woodcox
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Brian Woodcox
Severity
normal
B
B
Brian Woodcox wrote on 25 Apr 2020 01:58
(address . guix-patches@gnu.org)
54EFA16B-27F2-40F4-8FF0-F59BC65BF8AB@inskydata.com
Hello ARM Pinebook Pro Users,

These patches add the panfrost graphics acceleration for the Pinebook Pro laptop.

These patches must be applied on top of

d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d (wip-pinebook-pro branch)

The following instructions assume this patch has been added to the wip-pinebook-pro branch. So apply the patch if necessary.

Many thanks to janneke and for his blog post —> https://joyofsource.com/guix-system-on-the-pinebook-pro.html https://joyofsource.com/guix-system-on-the-pinebook-pro.html

Some notes for successfully creating the image to boot guix on the Pinebook pro. Most of this is borrowed from janneke. Many thanks.

If you are using the Pinebook Pro to build this image, you need to have guix running on a foreign distro.

janneke showed how to use Debian, I used Arch Linux, but you can probably also use Manjaro.

Since I was booting arch linux from an SD card already, I installed the image on the SD card plugged into an adapter.

So with the SD card (256G in my case) inserted into a USB adapter.

Prepare SD Card:

sudo parted -- /dev/sda mkpart p 0% -1
sudo parted -- /dev/sda set 1 boot on
sudo mkfs.ext4 -F /dev/sda1
sudo mount /dev/sda1 /mnt

Clone guix:

git clone https://git.savannah.gnu.org/git/guix.git https://git.savannah.gnu.org/git/guix.git
cd guix
git checkout wip-pinebook-pro


For the next commands, you need to setup your Pinebook Pro to have enough swap, otherwise webkitgtk will fail to build and it takes about 3 Hours for that alone.

modprobe zram
echo lz4 > /sys/block/zram0/comp_algorithm
echo 12G > /sys/block/zram0/disksize
mkswap --label zram0 /dev/zram0
swapon --priority 100 /dev/zram0

Increase size of tmp file:

mount -o remount,size=6G,noatime /tmp

guix environment guix --ad-hoc git
./bootstrap
./configure --localstatedir=/var GUILE=$(type -p guile) GUILD=$(type -p guild)
make

sudo -E ./pre-inst-env guix system init config.scm /mnt --fallback

Once the image is created and copied along with uboot to the SD card, there is one more thing you need to boot.

You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.

I changed mine from

FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs

to

FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip

Shutdown the laptop and insert the freshly minted SD card into the SD card slot on the Pinebook Pro.

You should now have a guix system running and if you setup your using the sample attached config.scm file, you will have Xorg running on hardware and xfce4 will run nicely.

Some extra notes (not the guix way):

Since I don’t have a usb wifi adapter, I cheated (until I get one) and I commented out the following in the gnu/packages/linux.scm file as follows:

--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -326,8 +326,8 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(with-directory-excursion dir
(setenv "PYTHON" (which "python"))
(format #t "Running deblob script...~%")
- (force-output)
- (invoke "/tmp/bin/deblob"))
+ (force-output))
+;; (invoke "/tmp/bin/deblob"))

(format #t "~%Packing new Linux-libre tarball...~%")
(force-output)

Also if you do this, you need to create the following folders on the SD card:

/lib/firmware/brcm
/lib/firmware/rockchip

Inside the brcm folder you need to place all the brcmfmac43456-sdio.* files

Inside the rockchip folder you need to place pptx.bin

I will leave it up to the reader to find and install these files, since this is not the preferred way.

Good luck!!

Brian C. Woodcox
Attachment: file
Attachment: file
Attachment: config.scm
Attachment: file
V
V
Vagrant Cascadian wrote on 27 Apr 2020 20:15
87lfmgvlqx.fsf@ponder
On 2020-04-24, Brian Woodcox wrote:
Toggle quote (3 lines)
> These patches add the panfrost graphics acceleration for the Pinebook
> Pro laptop.

Thanks! Been working with the pinebook pro for some months now running
guix, and it's great to see others making progress on it. :)


Toggle quote (10 lines)
> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>
> I changed mine from
>
> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>
> to
>
> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip

The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
the one from wip-pinebook-pro (should be the same).

This seems like your u-boot does not contain the correct value for
"fdtfile". It should be rockchip/rk3399-pinebook-pro.dtb. Are you
actually running an older u-boot? Did you at any point run saveenv from
u-boot, which saves the old u-boot configuration with an inappropriate
fdtfile variable?


It would be better to split up your patches into a separate patch
series, it is hard to review as one single large patch changing many
things.

A few targeted comments below...

Toggle quote (14 lines)
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index 01241cd88e..65fe389927 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -293,7 +294,7 @@ also known as DXTn or DXTC) for Mesa.")
> '(,@(match (%current-system)
> ((or "armhf-linux" "aarch64-linux")
> ;; TODO: Fix svga driver for aarch64 and armhf.
> - '("-Dgallium-drivers=etnaviv,freedreno,nouveau,r300,r600,swrast,tegra,v3d,vc4,virgl"))
> + '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
> (_
> '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
> ;; Enable various optional features. TODO: opencl requires libclc,

This last part of your mesa patch is already on core-updates. Looking
forward to when the rest is properly supported upstream!


Toggle quote (14 lines)
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index dd088ea24f..d4a36533ab 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -326,7 +327,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
> (with-directory-excursion dir
> (setenv "PYTHON" (which "python"))
> (format #t "Running deblob script...~%")
> - (force-output)
> + (force-output))
> (invoke "/tmp/bin/deblob"))
>
> (format #t "~%Packing new Linux-libre tarball...~%")

This looks like leftovers from your hack breaking linux-libre :P


Toggle quote (9 lines)
> @@ -604,6 +605,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
> ("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
> ;; All kernels should have NAMESPACES options enabled
> ("CONFIG_NAMESPACES" . #t)
> + ("CONFIG_DRM_PANFROST" . #t)
> ("CONFIG_UTS_NS" . #t)
> ("CONFIG_IPC_NS" . #t)
> ("CONFIG_USER_NS" . #t)

This obviously can't be enabled on all architectures. In the
linux-libre-arm64-generic and linux-libre-pinebook-pro kernels it's
already enabled as a module.

It obviously makes debugging easier to be available earlier, but it also
bloats platforms that do not use this driver.


Toggle quote (16 lines)
> diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
> index 190f6b6ee1..585bf4f648 100644
> --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch
> +++ b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
> @@ -1,11 +1,6 @@
> -disk_cache_create() here looks up the users home directory from <pwd.h>
> -which resolves to "/" in the build environment. I could not find an easy
> -way to set the home directory to something else, so we disable this test
> -for now.
> -
> --- a/src/compiler/glsl/tests/cache_test.c
> +++ b/src/compiler/glsl/tests/cache_test.c
> -@@ -170,11 +170,6 @@
> +@@ -219,11 +219,6 @@
> unsetenv("MESA_GLSL_CACHE_DIR");
> unsetenv("XDG_CACHE_HOME");
This removes a comment from the refreshed patch; I presume the comment
is still appropriate, though?


Toggle quote (21 lines)
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 8696dc4bb6..a1e7684964 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -15,6 +15,7 @@
> ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
> ;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
> +;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -485,6 +486,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
> "-no-compile-examples"
> ;; Most "-system-..." are automatic, but some use
> ;; the bundled copy by default.
> + "-opengl" "es2"
> "-system-sqlite"
> "-system-harfbuzz"
> "-system-pcre"

This might break some things where a different opengl is the default,
some architectures or platforms may require a different opengl
implementation.

I seem to recall some conversations in Debian about the complexities
around which opengl to enable per-architecture or per-platform or ... a
complicated matrix of concerns.


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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXqchKAAKCRDcUY/If5cW
qh2RAP0XldpeAu99ODtXvGqBfOOYFrM2LDvjwTbPAUyNwYNt7AD/UYsT4o6s75xF
0+KmvjyQ5x+anxSdqXsLlvKYkQHwxAI=
=Lf4B
-----END PGP SIGNATURE-----

B
B
Brian Woodcox wrote on 27 Apr 2020 23:17
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 40835@debbugs.gnu.org)
65E1BABE-56D0-4F84-92A3-7C4238722FC3@inskydata.com
Hi Vagrant,

Sorry, this should have been applied to commit d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d on the tip-pinebook-pro branch.

The rest of my answers below.

Toggle quote (35 lines)
> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>
> On 2020-04-24, Brian Woodcox wrote:
>> These patches add the panfrost graphics acceleration for the Pinebook
>> Pro laptop.
>
> Thanks! Been working with the pinebook pro for some months now running
> guix, and it's great to see others making progress on it. :)
>
>
>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>
>> I changed mine from
>>
>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>
>> to
>>
>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>
> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
> the one from wip-pinebook-pro (should be the same).
>
> This seems like your u-boot does not contain the correct value for
> "fdtfile". It should be rockchip/rk3399-pinebook-pro.dtb. Are you
> actually running an older u-boot? Did you at any point run saveenv from
> u-boot, which saves the old u-boot configuration with an inappropriate
> fdtfile variable?
>
>
> It would be better to split up your patches into a separate patch
> series, it is hard to review as one single large patch changing many
> things.
>

I’m not sure what this problem is exactly. For some reason the rockchip folder is not being added
to the end of the patch for the FDTFILE, also, you do not need to actually specify the file as u-boot will
find it as long as it’s on the directory.


Toggle quote (19 lines)
> A few targeted comments below...
>
>> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
>> index 01241cd88e..65fe389927 100644
>> --- a/gnu/packages/gl.scm
>> +++ b/gnu/packages/gl.scm
>> @@ -293,7 +294,7 @@ also known as DXTn or DXTC) for Mesa.")
>> '(,@(match (%current-system)
>> ((or "armhf-linux" "aarch64-linux")
>> ;; TODO: Fix svga driver for aarch64 and armhf.
>> - '("-Dgallium-drivers=etnaviv,freedreno,nouveau,r300,r600,swrast,tegra,v3d,vc4,virgl"))
>> + '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
>> (_
>> '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
>> ;; Enable various optional features. TODO: opencl requires libclc,
>
> This last part of your mesa patch is already on core-updates. Looking
> forward to when the rest is properly supported upstream!

Okay, thanks.

Toggle quote (18 lines)
>
>
>> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
>> index dd088ea24f..d4a36533ab 100644
>> --- a/gnu/packages/linux.scm
>> +++ b/gnu/packages/linux.scm
>> @@ -326,7 +327,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
>> (with-directory-excursion dir
>> (setenv "PYTHON" (which "python"))
>> (format #t "Running deblob script...~%")
>> - (force-output)
>> + (force-output))
>> (invoke "/tmp/bin/deblob"))
>>
>> (format #t "~%Packing new Linux-libre tarball...~%")
>
> This looks like leftovers from your hack breaking linux-libre :P

Doh, you are correct, my mistake. This should of course be left as the original code.

Toggle quote (18 lines)
>
>
>> @@ -604,6 +605,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
>> ("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
>> ;; All kernels should have NAMESPACES options enabled
>> ("CONFIG_NAMESPACES" . #t)
>> + ("CONFIG_DRM_PANFROST" . #t)
>> ("CONFIG_UTS_NS" . #t)
>> ("CONFIG_IPC_NS" . #t)
>> ("CONFIG_USER_NS" . #t)
>
> This obviously can't be enabled on all architectures. In the
> linux-libre-arm64-generic and linux-libre-pinebook-pro kernels it's
> already enabled as a module.
>
> It obviously makes debugging easier to be available earlier, but it also
> bloats platforms that do not use this driver.

Okay.

Toggle quote (22 lines)
>
>
>> diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>> index 190f6b6ee1..585bf4f648 100644
>> --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>> +++ b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>> @@ -1,11 +1,6 @@
>> -disk_cache_create() here looks up the users home directory from <pwd.h>
>> -which resolves to "/" in the build environment. I could not find an easy
>> -way to set the home directory to something else, so we disable this test
>> -for now.
>> -
>> --- a/src/compiler/glsl/tests/cache_test.c
>> +++ b/src/compiler/glsl/tests/cache_test.c
>> -@@ -170,11 +170,6 @@
>> +@@ -219,11 +219,6 @@
>> unsetenv("MESA_GLSL_CACHE_DIR");
>> unsetenv("XDG_CACHE_HOME");
>
> This removes a comment from the refreshed patch; I presume the comment
> is still appropriate, though?

Yes, Patch should have been applied to d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d as stated above.

Toggle quote (31 lines)
>
>
>> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
>> index 8696dc4bb6..a1e7684964 100644
>> --- a/gnu/packages/qt.scm
>> +++ b/gnu/packages/qt.scm
>> @@ -15,6 +15,7 @@
>> ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
>> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
>> ;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
>> +;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -485,6 +486,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>> "-no-compile-examples"
>> ;; Most "-system-..." are automatic, but some use
>> ;; the bundled copy by default.
>> + "-opengl" "es2"
>> "-system-sqlite"
>> "-system-harfbuzz"
>> "-system-pcre"
>
> This might break some things where a different opengl is the default,
> some architectures or platforms may require a different opengl
> implementation.
>
> I seem to recall some conversations in Debian about the complexities
> around which opengl to enable per-architecture or per-platform or ... a
> complicated matrix of concerns.

Open to suggestions.

Toggle quote (6 lines)
>
>
> live well,
> vagrant


Thanks for the feedback.

Brian.
Attachment: file
V
V
Vagrant Cascadian wrote on 27 Apr 2020 23:54
(name . Brian Woodcox)(address . bw@inskydata.com)(address . 40835@debbugs.gnu.org)
87ftcovbkn.fsf@ponder
On 2020-04-27, Brian Woodcox wrote:
Toggle quote (4 lines)
> Sorry, this should have been applied to commit
> d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d on the tip-pinebook-pro
> branch.

Yeah, I got that!


Toggle quote (15 lines)
>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>> On 2020-04-24, Brian Woodcox wrote:
>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>
>>> I changed mine from
>>>
>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>
>>> to
>>>
>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>
>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>> the one from wip-pinebook-pro (should be the same).

Oops, my bad. I've been merging master and core-updates locally and
forgot the status of wip-pinebook-pro... I think I was waiting for the
core-updates merge, but it's probably worth merging master just to get
the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
u-boot!


Toggle quote (5 lines)
> I’m not sure what this problem is exactly. For some reason the
> rockchip folder is not being added to the end of the patch for the
> FDTFILE, also, you do not need to actually specify the file as u-boot
> will find it as long as it’s on the directory.

It's probably a bug in the u-boot fork that's still in wip-pinebook-pro.


Toggle quote (22 lines)
>>> diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>> index 190f6b6ee1..585bf4f648 100644
>>> --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>> +++ b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>> @@ -1,11 +1,6 @@
>>> -disk_cache_create() here looks up the users home directory from <pwd.h>
>>> -which resolves to "/" in the build environment. I could not find an easy
>>> -way to set the home directory to something else, so we disable this test
>>> -for now.
>>> -
>>> --- a/src/compiler/glsl/tests/cache_test.c
>>> +++ b/src/compiler/glsl/tests/cache_test.c
>>> -@@ -170,11 +170,6 @@
>>> +@@ -219,11 +219,6 @@
>>> unsetenv("MESA_GLSL_CACHE_DIR");
>>> unsetenv("XDG_CACHE_HOME");
>>
>> This removes a comment from the refreshed patch; I presume the comment
>> is still appropriate, though?
>
> Yes, Patch should have been applied to d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d as stated above.

Regardless of which branch it applies to, the comment in this patch
should probably be kept, unless it's no longer relevent.


Toggle quote (31 lines)
>>> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
>>> index 8696dc4bb6..a1e7684964 100644
>>> --- a/gnu/packages/qt.scm
>>> +++ b/gnu/packages/qt.scm
>>> @@ -15,6 +15,7 @@
>>> ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
>>> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
>>> ;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
>>> +;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
>>> ;;;
>>> ;;; This file is part of GNU Guix.
>>> ;;;
>>> @@ -485,6 +486,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>>> "-no-compile-examples"
>>> ;; Most "-system-..." are automatic, but some use
>>> ;; the bundled copy by default.
>>> + "-opengl" "es2"
>>> "-system-sqlite"
>>> "-system-harfbuzz"
>>> "-system-pcre"
>>
>> This might break some things where a different opengl is the default,
>> some architectures or platforms may require a different opengl
>> implementation.
>>
>> I seem to recall some conversations in Debian about the complexities
>> around which opengl to enable per-architecture or per-platform or ... a
>> complicated matrix of concerns.
>
> Open to suggestions.

From what I remember there were no *good* options; to fix things for one
platforms, you break things for another. In guix it might be slightly
better off in that you can have variant pacakges more easily, though for
libraries this would mean variants for everything that uses it,
too... :/


Thanks for joining the guix on pinebook pro adventures!


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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXqdUqAAKCRDcUY/If5cW
qpTsAP9DO30K0WcncEV/0RHA1BV0QrMmKgvnTFDG63p/mRONCgD/csHputJPxRzF
hP17vbzER8vtO9agzfcuKyXf1RE3rgE=
=PtR4
-----END PGP SIGNATURE-----

B
B
Brian Woodcox wrote on 28 Apr 2020 00:36
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 40835@debbugs.gnu.org)
A9E9BDCE-576E-4760-97DE-3F9E00B05169@inskydata.com
Toggle quote (25 lines)
> On Apr 27, 2020, at 3:54 PM, Vagrant Cascadian <vagrant@debian.org> wrote:

>
>
>>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>> On 2020-04-24, Brian Woodcox wrote:
>>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>>
>>>> I changed mine from
>>>>
>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>>
>>>> to
>>>>
>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>>
>>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>>> the one from wip-pinebook-pro (should be the same).
>
> Oops, my bad. I've been merging master and core-updates locally and
> forgot the status of wip-pinebook-pro... I think I was waiting for the
> core-updates merge, but it's probably worth merging master just to get
> the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
> u-boot!

I would be happy to test that out when done!

Toggle quote (36 lines)
>
>
>> I’m not sure what this problem is exactly. For some reason the
>> rockchip folder is not being added to the end of the patch for the
>> FDTFILE, also, you do not need to actually specify the file as u-boot
>> will find it as long as it’s on the directory.
>
> It's probably a bug in the u-boot fork that's still in wip-pinebook-pro.
>
>
>>>> diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>>> index 190f6b6ee1..585bf4f648 100644
>>>> --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>>> +++ b/gnu/packages/patches/mesa-skip-disk-cache-test.patch
>>>> @@ -1,11 +1,6 @@
>>>> -disk_cache_create() here looks up the users home directory from <pwd.h>
>>>> -which resolves to "/" in the build environment. I could not find an easy
>>>> -way to set the home directory to something else, so we disable this test
>>>> -for now.
>>>> -
>>>> --- a/src/compiler/glsl/tests/cache_test.c
>>>> +++ b/src/compiler/glsl/tests/cache_test.c
>>>> -@@ -170,11 +170,6 @@
>>>> +@@ -219,11 +219,6 @@
>>>> unsetenv("MESA_GLSL_CACHE_DIR");
>>>> unsetenv("XDG_CACHE_HOME");
>>>
>>> This removes a comment from the refreshed patch; I presume the comment
>>> is still appropriate, though?
>>
>> Yes, Patch should have been applied to d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d as stated above.
>
> Regardless of which branch it applies to, the comment in this patch
> should probably be kept, unless it's no longer relevent.


Okay, I have to admit I was confused by this. Turns out when I was debugging, I accidentally
removed the comment (or at least my fingers did). I didn’t realize that and now I know why it
appeared in the patch set. Thus my comment about being applied to the correct commit.
That’s what happens when you don’t think things through enough.

Toggle quote (39 lines)
>
>
>>>> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
>>>> index 8696dc4bb6..a1e7684964 100644
>>>> --- a/gnu/packages/qt.scm
>>>> +++ b/gnu/packages/qt.scm
>>>> @@ -15,6 +15,7 @@
>>>> ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
>>>> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
>>>> ;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
>>>> +;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
>>>> ;;;
>>>> ;;; This file is part of GNU Guix.
>>>> ;;;
>>>> @@ -485,6 +486,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>>>> "-no-compile-examples"
>>>> ;; Most "-system-..." are automatic, but some use
>>>> ;; the bundled copy by default.
>>>> + "-opengl" "es2"
>>>> "-system-sqlite"
>>>> "-system-harfbuzz"
>>>> "-system-pcre"
>>>
>>> This might break some things where a different opengl is the default,
>>> some architectures or platforms may require a different opengl
>>> implementation.
>>>
>>> I seem to recall some conversations in Debian about the complexities
>>> around which opengl to enable per-architecture or per-platform or ... a
>>> complicated matrix of concerns.
>>
>> Open to suggestions.
>
> From what I remember there were no *good* options; to fix things for one
> platforms, you break things for another. In guix it might be slightly
> better off in that you can have variant pacakges more easily, though for
> libraries this would mean variants for everything that uses it,
> too... :/

From the different configuration files I’ve look at from other people,
it appears the patch could be done when the system is configured.
Does that sound like a better place to put it?

I don’t know how else to keep things from getting messy.
Toggle quote (7 lines)
>
>
> Thanks for joining the guix on pinebook pro adventures!
>
>
> live well,
> vagrant
V
V
Vagrant Cascadian wrote on 28 Apr 2020 00:48
(name . Brian Woodcox)(address . bw@inskydata.com)(address . 40835@debbugs.gnu.org)
87d07sv936.fsf@ponder
On 2020-04-27, Brian Woodcox wrote:
Toggle quote (24 lines)
>> On Apr 27, 2020, at 3:54 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>> On 2020-04-24, Brian Woodcox wrote:
>>>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>>>
>>>>> I changed mine from
>>>>>
>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>>>
>>>>> to
>>>>>
>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>>>
>>>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>>>> the one from wip-pinebook-pro (should be the same).
>>
>> Oops, my bad. I've been merging master and core-updates locally and
>> forgot the status of wip-pinebook-pro... I think I was waiting for the
>> core-updates merge, but it's probably worth merging master just to get
>> the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
>> u-boot!
>
> I would be happy to test that out when done!

Will keep you posted. Once I've merged that, maybe you can rebase your
patch into a patch series?


Toggle quote (43 lines)
>>>>> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
>>>>> index 8696dc4bb6..a1e7684964 100644
>>>>> --- a/gnu/packages/qt.scm
>>>>> +++ b/gnu/packages/qt.scm
>>>>> @@ -15,6 +15,7 @@
>>>>> ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
>>>>> ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
>>>>> ;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
>>>>> +;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
>>>>> ;;;
>>>>> ;;; This file is part of GNU Guix.
>>>>> ;;;
>>>>> @@ -485,6 +486,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>>>>> "-no-compile-examples"
>>>>> ;; Most "-system-..." are automatic, but some use
>>>>> ;; the bundled copy by default.
>>>>> + "-opengl" "es2"
>>>>> "-system-sqlite"
>>>>> "-system-harfbuzz"
>>>>> "-system-pcre"
>>>>
>>>> This might break some things where a different opengl is the default,
>>>> some architectures or platforms may require a different opengl
>>>> implementation.
>>>>
>>>> I seem to recall some conversations in Debian about the complexities
>>>> around which opengl to enable per-architecture or per-platform or ... a
>>>> complicated matrix of concerns.
>>>
>>> Open to suggestions.
>>
>> From what I remember there were no *good* options; to fix things for one
>> platforms, you break things for another. In guix it might be slightly
>> better off in that you can have variant pacakges more easily, though for
>> libraries this would mean variants for everything that uses it,
>> too... :/
>
> From the different configuration files I’ve look at from other people,
> it appears the patch could be done when the system is configured.
> Does that sound like a better place to put it?
>
> I don’t know how else to keep things from getting messy.

Yeah, runtime detection is definitely the best option, if it's possible!
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXqdhPwAKCRDcUY/If5cW
qobdAQCKrQhA82m+xCKeZXnT0zbBQYP+sxgXhy8eZFjfwDUcKQEAizd/oVcf//En
27pzYxI3uuJx4cmVBzoUz3RgnsIbHgo=
=FTNg
-----END PGP SIGNATURE-----

B
B
Brian Woodcox wrote on 28 Apr 2020 00:51
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 40835@debbugs.gnu.org)
9E35E769-6C29-4FB3-8AA7-E975F819ABE0@inskydata.com
Toggle quote (31 lines)
> On Apr 27, 2020, at 4:48 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>
> On 2020-04-27, Brian Woodcox wrote:
>>> On Apr 27, 2020, at 3:54 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>> On 2020-04-24, Brian Woodcox wrote:
>>>>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>>>>
>>>>>> I changed mine from
>>>>>>
>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>>>>
>>>>>> to
>>>>>>
>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>>>>
>>>>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>>>>> the one from wip-pinebook-pro (should be the same).
>>>
>>> Oops, my bad. I've been merging master and core-updates locally and
>>> forgot the status of wip-pinebook-pro... I think I was waiting for the
>>> core-updates merge, but it's probably worth merging master just to get
>>> the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
>>> u-boot!
>>
>> I would be happy to test that out when done!
>
> Will keep you posted. Once I've merged that, maybe you can rebase your
> patch into a patch series?
>

Sounds good. I will do that.
Attachment: file
V
V
Vagrant Cascadian wrote on 28 Apr 2020 08:54
(name . Brian Woodcox)(address . bw@inskydata.com)(address . 40835@debbugs.gnu.org)
87y2qgt80x.fsf@ponder
On 2020-04-27, Brian Woodcox wrote:
Toggle quote (33 lines)
>> On Apr 27, 2020, at 4:48 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>
>> On 2020-04-27, Brian Woodcox wrote:
>>>> On Apr 27, 2020, at 3:54 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>>> On 2020-04-24, Brian Woodcox wrote:
>>>>>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>>>>>
>>>>>>> I changed mine from
>>>>>>>
>>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>>>>>
>>>>>>> to
>>>>>>>
>>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>>>>>
>>>>>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>>>>>> the one from wip-pinebook-pro (should be the same).
>>>>
>>>> Oops, my bad. I've been merging master and core-updates locally and
>>>> forgot the status of wip-pinebook-pro... I think I was waiting for the
>>>> core-updates merge, but it's probably worth merging master just to get
>>>> the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
>>>> u-boot!
>>>
>>> I would be happy to test that out when done!
>>
>> Will keep you posted. Once I've merged that, maybe you can rebase your
>> patch into a patch series?
>>
>
> Sounds good. I will do that.

Pushed!

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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXqfTIAAKCRDcUY/If5cW
qnWMAP0Y700wlII4pwHAbegyX9wh6Y8DnRR3LSgmSY4wssI/9wD/SR5u+lDC5U6v
NW6vPAQAbPd8RBCZAqgaffnEFrundw0=
=Xeju
-----END PGP SIGNATURE-----

B
B
Brian Woodcox wrote on 2 May 2020 22:37
(name . Brian Woodcox)(address . bw@InSkyData.com)(address . 40835@debbugs.gnu.org)
68B8EE48-5C9A-4D1B-9EE6-88CFD30510CF@inskydata.com
Success!!

I applied my newly revised patches to 76ac1d3918f91b9234cfb26c6519da0cf5f86302 on the wip-pinebook-pro branch.

u-boot correctly finds the rk3399-pinebook-pro.dtb file.

The extlinux.conf file no longer needs to be altered. It is as follows:

# This file was generated from your Guix configuration. Any changes
# will be lost upon reconfiguration.
UI menu.c32
MENU TITLE GNU Guix Boot Options
PROMPT 1
TIMEOUT 50
LABEL GNU with Linux-Libre-Pinebook-Pro 5.6.0
MENU LABEL GNU with Linux-Libre-Pinebook-Pro 5.6.0
KERNEL /gnu/store/qs1292ckhvkprsgdyxq665qj167l5c07-linux-libre-pinebook-pro-5.6.0/Image
FDTDIR /gnu/store/qs1292ckhvkprsgdyxq665qj167l5c07-linux-libre-pinebook-pro-5.6.0/lib/dtbs
INITRD /gnu/store/2d01lxl21i74jflji5smi9fhwsgyqanf-raw-initrd/initrd.cpio.gz
APPEND --root=/dev/mmcblk1p1 --system=/gnu/store/453h9sqcqvnpj72k0gwia3zsfavhar4p-system --load=/gnu/store/453h9sqcqvnpj72k0gwia3zsfavhar4p-system/boot ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 vga=current


The FDTDIR /gnu/store/qs1292ckhvkprsgdyxq665qj167l5c07-linux-libre-pinebook-pro-5.6.0/lib/dtbs still has a rockchip sub-folder that contains the rk3399-pinebook-pro.dtb file.

I decided to go back to my older SD card and remove the rockchip from the FDTDIR path, and it also booted.

I know previously that janneke and I had problems with this, but obviously along the way something was fixed.

At any rate, it’s nice to see the image boot and no longer having to edit the extlinux.conf file.

I will have to put together a patch set in the near future.

Cheers!

Brian C. Woodcox

Toggle quote (40 lines)
> On Apr 28, 2020, at 12:54 AM, Vagrant Cascadian <vagrant@debian.org> wrote:
>
> On 2020-04-27, Brian Woodcox wrote:
>>> On Apr 27, 2020, at 4:48 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>
>>> On 2020-04-27, Brian Woodcox wrote:
>>>>> On Apr 27, 2020, at 3:54 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>>>> On Apr 27, 2020, at 12:15 PM, Vagrant Cascadian <vagrant@debian.org> wrote:
>>>>>>> On 2020-04-24, Brian Woodcox wrote:
>>>>>>>> You need to edit the /boot/extlinux/extlinux.conf file on the SD card and alter the FDTDIR line.
>>>>>>>>
>>>>>>>> I changed mine from
>>>>>>>>
>>>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs
>>>>>>>>
>>>>>>>> to
>>>>>>>>
>>>>>>>> FDTDIR /gnu/store/ls1byzmapi911cylh4s6044x0cmc61c8-linux-libre-pinebook-pro-5.6.0/lib/dtbs/rockchip
>>>>>>>
>>>>>>> The u-boot-pinebook-pro-rk3399 on guix master works correctly as well as
>>>>>>> the one from wip-pinebook-pro (should be the same).
>>>>>
>>>>> Oops, my bad. I've been merging master and core-updates locally and
>>>>> forgot the status of wip-pinebook-pro... I think I was waiting for the
>>>>> core-updates merge, but it's probably worth merging master just to get
>>>>> the updated u-boot-pinebook-pro-rk3399 based more closely on upstream
>>>>> u-boot!
>>>>
>>>> I would be happy to test that out when done!
>>>
>>> Will keep you posted. Once I've merged that, maybe you can rebase your
>>> patch into a patch series?
>>>
>>
>> Sounds good. I will do that.
>
> Pushed!
>
> live well,
> vagrant
Attachment: file
?