diff mbox series

[bug#40835] Update to use panfrost for graphics hardware acceleration

Message ID 54EFA16B-27F2-40F4-8FF0-F59BC65BF8AB@inskydata.com
State Under Review
Headers show
Series [bug#40835] Update to use panfrost for graphics hardware acceleration | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brian Woodcox April 24, 2020, 11:58 p.m. UTC
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:


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

Comments

Vagrant Cascadian April 27, 2020, 6:15 p.m. UTC | #1
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.

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!


> 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


> @@ -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.


> 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?


> 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
Brian Woodcox April 27, 2020, 9:17 p.m. UTC | #2
Hi Vagrant,

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

The rest of my answers below.

> 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.


> 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.

> 
> 
>> 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.

> 
> 
>> @@ -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.

> 
> 
>> 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.

> 
> 
>> 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.

> 
> 
> live well,
>  vagrant


Thanks for the feedback.

Brian.
Vagrant Cascadian April 27, 2020, 9:54 p.m. UTC | #3
On 2020-04-27, Brian Woodcox wrote:
> Sorry, this should have been applied to commit
> d4c6e06f369024efc63e11de1a5bacd3fe9f7e8d on the tip-pinebook-pro
> branch.

Yeah, I got that!


>> 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’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.


>>> 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
Brian Woodcox April 27, 2020, 10:36 p.m. UTC | #4
> 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!

> 
> 
>> 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.

> 
> 
>>>> 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.
> 
> 
> Thanks for joining the guix on pinebook pro adventures!
> 
> 
> live well,
>  vagrant
Vagrant Cascadian April 27, 2020, 10:48 p.m. UTC | #5
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?


>>>>> 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!
Brian Woodcox April 27, 2020, 10:51 p.m. UTC | #6
> 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.
Vagrant Cascadian April 28, 2020, 6:54 a.m. UTC | #7
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
Brian Woodcox May 2, 2020, 8:37 p.m. UTC | #8
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

> 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
diff mbox series

Patch

--- 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)