guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Brian Woodcox
Subject: [bug#40835] [PATCH] Update to use panfrost for graphics hardware acceleration
Date: Fri, 24 Apr 2020 17:58:41 -0600

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

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
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: 0001-Update-to-use-panfrost-for-graphics-hardware-acceler.patch
Description: Binary data

Attachment: config.scm
Description: Binary data



reply via email to

[Prev in Thread] Current Thread [Next in Thread]