unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40835] [PATCH] Update to use panfrost for graphics hardware acceleration
@ 2020-04-24 23:58 Brian Woodcox
  2020-04-27 18:15 ` Vagrant Cascadian
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Woodcox @ 2020-04-24 23:58 UTC (permalink / raw)
  To: 40835

[-- Attachment #1: Type: text/plain, Size: 3928 bytes --]

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 #2.1: Type: text/html, Size: 7433 bytes --]

[-- Attachment #2.2: 0001-Update-to-use-panfrost-for-graphics-hardware-acceler.patch --]
[-- Type: application/octet-stream, Size: 23518 bytes --]

From 4de545a13aa01b167c52f1cff19b2e9b3aa7ec12 Mon Sep 17 00:00:00 2001
From: "Brian C. Woodcox" <bw@InSkyData.com>
Date: Fri, 24 Apr 2020 16:35:45 -0600
Subject: [PATCH] Update to use panfrost for graphics hardware acceleration

---
 gnu/packages/gl.scm                           |  27 +--
 gnu/packages/gnome.scm                        |  13 +-
 gnu/packages/linux.scm                        |   4 +-
 .../cogl-1.22.6-add-eglmesaext-header.patch   |  75 +++++++
 .../patches/mesa-skip-disk-cache-test.patch   |   7 +-
 .../mutter-3.32.2-add-eglmesaext-header.patch |  52 +++++
 .../webkitgtk-2.28.0-fix-bug-197192.patch     | 203 ++++++++++++++++++
 gnu/packages/qt.scm                           |   2 +
 gnu/packages/webkit.scm                       |   5 +-
 9 files changed, 364 insertions(+), 24 deletions(-)
 create mode 100644 gnu/packages/patches/cogl-1.22.6-add-eglmesaext-header.patch
 create mode 100644 gnu/packages/patches/mutter-3.32.2-add-eglmesaext-header.patch
 create mode 100644 gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch

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
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -230,21 +231,21 @@ also known as DXTn or DXTC) for Mesa.")
            '(list "--disable-glx" "--disable-egl"))))))))
 
 (define-public mesa
-  (package
+  (let ((commit "69628ababbd79a5865c2c5bd01b4a963eb7800f9")
+        (revision "1"))
+   (package
     (name "mesa")
-    (version "19.3.4")
+    (version "20.1.0_devel.120669.69628ababbd")
     (source
-      (origin
-        (method url-fetch)
-        (uri (list (string-append "https://mesa.freedesktop.org/archive/"
-                                  "mesa-" version ".tar.xz")
-                   (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
-                                  "mesa-" version ".tar.xz")
-                   (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
-                                  version "/mesa-" version ".tar.xz")))
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "git://anongit.freedesktop.org/mesa/mesa")
+               (commit commit)))
+         (file-name (git-file-name "mesa-git" version))
         (sha256
          (base32
-          "1r4giqq7q7zqbn23lbw7v5vswagxx8qj6ij2w8bsb697mvk6g90x"))
+          "1bv39f466k6ig11byw2dmgib62vh9sm2hvi7rqcdplsaynxmbc6l"))
         (patches
          (search-patches "mesa-skip-disk-cache-test.patch"))))
     (build-system meson-build-system)
@@ -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,
@@ -422,7 +423,7 @@ also known as DXTn or DXTC) for Mesa.")
 specifications - systems for rendering interactive 3D graphics.  A variety of
 device drivers allows Mesa to be used in many different environments ranging
 from software emulation to complete hardware acceleration for modern GPUs.")
-    (license license:x11)))
+    (license license:x11))))
 
 (define-public mesa-opencl
   (package
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 088de7dd4c..44d82b2c75 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -50,6 +50,7 @@
 ;;; Copyright © 2020 raingloom <raingloom@riseup.net>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
+;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4425,15 +4426,17 @@ throughout GNOME for API documentation).")
 (define-public cogl
   (package
     (name "cogl")
-    (version "1.22.4")
+    (version "1.22.6")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://gnome/sources/cogl/"
                            (version-major+minor version) "/"
                            "cogl-" version ".tar.xz"))
+       (patches
+         (search-patches "cogl-1.22.6-add-eglmesaext-header.patch"))
        (sha256
-        (base32 "1q0drs82a8f6glg1v29bb6g2nf15fw0rvdx3d0rgcgfarfaby5sj"))))
+        (base32 "0x8v4n61q89qy27v824bqswpz6bmn801403w2q3pa1lcwk9ln4vd"))))
     ;; NOTE: mutter exports a bundled fork of cogl, so when making changes to
     ;; cogl, corresponding changes may be appropriate in mutter as well.
     (build-system gnu-build-system)
@@ -4462,7 +4465,7 @@ throughout GNOME for API documentation).")
      `(#:configure-flags (list "--enable-cogl-gst"
                                "--enable-wayland-egl-platform"
                                "--enable-wayland-egl-server"
-
+                               "--enable-gles2"
                                ;; Arrange to pass an absolute file name to
                                ;; dlopen for libGL.so.
                                (string-append "--with-gl-libname="
@@ -5872,6 +5875,9 @@ configuration program to choose applications starting on login.")
             (substitute* "installed-tests/js/testLocale.js"
               ((".*toBeDefined.*") "")
               ((".*expect\\(datestr\\).*") ""))
+            (substitute* "installed-tests/scripts/testCommandLine.sh"
+              (("gjs -c 'imports.system.exit(0)' && ! stat gjs-*.syscap") "")
+              (("gjs --profile -c 'imports.system.exit(0)' && ! stat gjs-*.syscap") ""))
             (substitute* "installed-tests/scripts/testCommandLine.sh"
               (("Valentín") "")
               (("☭") ""))
@@ -6029,6 +6035,7 @@ to display dialog boxes from the commandline and shell scripts.")
               (uri (string-append "mirror://gnome/sources/" name "/"
                                   (version-major+minor version) "/"
                                   name "-" version ".tar.xz"))
+              (patches (search-patches "mutter-3.32.2-add-eglmesaext-header.patch"))
               (sha256
                (base32
                 "1h577i2ap7dpfy1jg101jvc6nzccc0csgvd55ahydlr8f94frcva"))))
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
@@ -43,6 +43,7 @@
 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -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...~%")
@@ -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)
diff --git a/gnu/packages/patches/cogl-1.22.6-add-eglmesaext-header.patch b/gnu/packages/patches/cogl-1.22.6-add-eglmesaext-header.patch
new file mode 100644
index 0000000000..71117dd261
--- /dev/null
+++ b/gnu/packages/patches/cogl-1.22.6-add-eglmesaext-header.patch
@@ -0,0 +1,75 @@
+Add references to eglmesaext.h for build to succeed.
+This patch should not be necessary in the future as these
+have been added to eglext.h.
+See https://github.com/KhronosGroup/EGL-Registry/commit/1343ecc9f55d3e8ded6a42d7ccfd33391a1dd35f
+
+From: Brian Woodcox <bw@InSkyData.com>
+Date: March 18, 2020
+
+--- a/configure
++++ b/configure
+@@ -24156,8 +24156,9 @@
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_EGL_EGLEXT_H 1
+ _ACEOF
+- COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
+-#include <EGL/eglext.h>"
++ COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
++#include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>"
+ fi
+ 
+ done
+@@ -25565,8 +25566,8 @@
+ fi
+ 
+         COGL_EGL_INCLUDES="#include <EGL/egl.h>
+-#include <EGL/eglext.h>"
+-
++#include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>"
+ 
+ fi
+ 
+--- a/configure.ac
++++ b/configure.ac
+@@ -685,10 +685,15 @@
+             AC_SUBST([COGL_EGL_INCLUDES])
+ 
+             AC_CHECK_HEADERS([EGL/eglext.h],
+-                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
++                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
+ #include <EGL/eglext.h>"],
+                              [],
+                              [$COGL_EGL_INCLUDES])
++            AC_CHECK_HEADERS([EGL/eglmesaext.h],
++                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
++#include <EGL/eglmesaext.h>"],
++                             [],
++                             [$COGL_EGL_INCLUDES])
+ 
+             # Check for a GLES 1.x Common Profile library with/without EGL.
+             #
+@@ -1216,6 +1221,13 @@
+               [],
+               [AC_MSG_ERROR([Unable to locate required EGL headers])],
+               [#include <EGL/egl.h>])
++            AC_CHECK_HEADERS(
++              [EGL/eglmesaext.h],
++              [],
++              [AC_MSG_ERROR([Unable to locate required EGL headers])],
++              [#include <EGL/egl.h>
++#include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>])
+ 
+             AC_CHECK_LIB(EGL, [eglInitialize],
+               [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
+@@ -1226,7 +1238,8 @@
+           )
+ 
+         COGL_EGL_INCLUDES="#include <EGL/egl.h>
+-#include <EGL/eglext.h>"
++#include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>"
+         AC_SUBST([COGL_EGL_INCLUDES])
+       ])
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");
  
diff --git a/gnu/packages/patches/mutter-3.32.2-add-eglmesaext-header.patch b/gnu/packages/patches/mutter-3.32.2-add-eglmesaext-header.patch
new file mode 100644
index 0000000000..1d80c4e842
--- /dev/null
+++ b/gnu/packages/patches/mutter-3.32.2-add-eglmesaext-header.patch
@@ -0,0 +1,52 @@
+Add references to eglmesaext.h for build to succeed.
+This patch should not be necessary in the future as these
+have been added to eglext.h.   
+See https://github.com/KhronosGroup/EGL-Registry/commit/1343ecc9f55d3e8ded6a42d7ccfd33391a1dd35f
+
+From: Brian Woodcox <bw@InSkyData.com>
+Date: March 18, 2020
+
+--- a/cogl/cogl/meson.build
++++ b/cogl/cogl/meson.build
+@@ -48,7 +48,7 @@
+ built_headers += [cogl_gl_header_h]
+ 
+ if have_egl
+-  cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>'
++  cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>\n#include <EGL/eglmesaext.h>'
+ else
+   cogl_egl_includes_string = ''
+ endif
+
+--- a/src/backends/meta-egl-ext.h
++++ b/src/backends/meta-egl-ext.h
+@@ -29,6 +29,7 @@
+ 
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>
+ 
+ /*
+  * This is a little different to the tests shipped with EGL implementations,
+
+--- a/src/backends/meta-egl.c
++++ b/src/backends/meta-egl.c
+@@ -26,6 +26,7 @@
+ 
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>
+ #include <gio/gio.h>
+ #include <glib.h>
+ #include <glib-object.h>
+
+--- a/src/backends/meta-egl.h
++++ b/src/backends/meta-egl.h
+@@ -27,6 +27,7 @@
+ 
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>
+ #include <glib-object.h>
+ 
+ #define META_EGL_ERROR meta_egl_error_quark ()
diff --git a/gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch b/gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch
new file mode 100644
index 0000000000..251b2f271c
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-2.28.0-fix-bug-197192.patch
@@ -0,0 +1,203 @@
+There was a bug in older Cortex-A53, however in newer versions of Cortex-A53,
+webkit fails to build.  The code is removed for newer versions of Cortex-A53.   
+See https://bugs.webkit.org/show_bug.cgi?id=197192
+
+From: Brian Woodcox <bw@InSkyData.com>
+Date: March 18, 2020
+
+--- a/Source/JavaScriptCore/assembler/ARM64Assembler.h
++++ a/Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -740,7 +740,6 @@
+     {
+         ASSERT(!(offset & 0xfff));
+         insn(pcRelative(true, offset >> 12, rd));
+-        nopCortexA53Fix843419();
+     }
+ 
+     template<int datasize, SetFlags setFlags = DontSetFlags>
+@@ -1390,7 +1389,6 @@
+     ALWAYS_INLINE void madd(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+         CHECK_DATASIZE();
+-        nopCortexA53Fix835769<datasize>();
+         insn(dataProcessing3Source(DATASIZE, DataOp_MADD, rm, ra, rn, rd));
+     }
+ 
+@@ -1443,7 +1441,6 @@
+     ALWAYS_INLINE void msub(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+         CHECK_DATASIZE();
+-        nopCortexA53Fix835769<datasize>();
+         insn(dataProcessing3Source(DATASIZE, DataOp_MSUB, rm, ra, rn, rd));
+     }
+ 
+@@ -1691,7 +1688,6 @@
+ 
+     ALWAYS_INLINE void smaddl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+-        nopCortexA53Fix835769<64>();
+         insn(dataProcessing3Source(Datasize_64, DataOp_SMADDL, rm, ra, rn, rd));
+     }
+ 
+@@ -1702,7 +1698,6 @@
+ 
+     ALWAYS_INLINE void smsubl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+-        nopCortexA53Fix835769<64>();
+         insn(dataProcessing3Source(Datasize_64, DataOp_SMSUBL, rm, ra, rn, rd));
+     }
+ 
+@@ -1960,7 +1955,6 @@
+ 
+     ALWAYS_INLINE void umaddl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+-        nopCortexA53Fix835769<64>();
+         insn(dataProcessing3Source(Datasize_64, DataOp_UMADDL, rm, ra, rn, rd));
+     }
+ 
+@@ -1971,7 +1965,6 @@
+ 
+     ALWAYS_INLINE void umsubl(RegisterID rd, RegisterID rn, RegisterID rm, RegisterID ra)
+     {
+-        nopCortexA53Fix835769<64>();
+         insn(dataProcessing3Source(Datasize_64, DataOp_UMSUBL, rm, ra, rn, rd));
+     }
+ 
+@@ -3691,37 +3684,6 @@
+         return 0x1e7e0000 | (dn << 5) | rd;
+     }
+ 
+-    // Workaround for Cortex-A53 erratum (835769). Emit an extra nop if the
+-    // last instruction in the buffer is a load, store or prefetch. Needed
+-    // before 64-bit multiply-accumulate instructions.
+-    template<int datasize>
+-    ALWAYS_INLINE void nopCortexA53Fix835769()
+-    {
+-#if CPU(ARM64_CORTEXA53)
+-        CHECK_DATASIZE();
+-        if (datasize == 64) {
+-            if (LIKELY(m_buffer.codeSize() >= sizeof(int32_t))) {
+-                // From ARMv8 Reference Manual, Section C4.1: the encoding of the
+-                // instructions in the Loads and stores instruction group is:
+-                // ---- 1-0- ---- ---- ---- ---- ---- ----
+-                if (UNLIKELY((*reinterpret_cast_ptr<int32_t*>(reinterpret_cast_ptr<char*>(m_buffer.data()) + m_buffer.codeSize() - sizeof(int32_t)) & 0x0a000000) == 0x08000000))
+-                    nop();
+-            }
+-        }
+-#endif
+-    }
+-
+-    // Workaround for Cortex-A53 erratum (843419). Emit extra nops to avoid
+-    // wrong address access after ADRP instruction.
+-    ALWAYS_INLINE void nopCortexA53Fix843419()
+-    {
+-#if CPU(ARM64_CORTEXA53)
+-        nop();
+-        nop();
+-        nop();
+-#endif
+-    }
+-
+     Vector<LinkRecord, 0, UnsafeVectorOverflow> m_jumpsToLink;
+     int m_indexOfLastWatchpoint;
+     int m_indexOfTailOfLastWatchpoint;
+--- a/Source/JavaScriptCore/offlineasm/arm64.rb
++++ a/Source/JavaScriptCore/offlineasm/arm64.rb
+@@ -351,33 +351,6 @@
+     newList
+ end
+ 
+-# Workaround for Cortex-A53 erratum (835769)
+-def arm64CortexA53Fix835769(list)
+-    newList = []
+-    lastOpcodeUnsafe = false
+-
+-    list.each {
+-        | node |
+-        if node.is_a? Instruction
+-            case node.opcode
+-            when /^store/, /^load/
+-                # List all macro instructions that can be lowered to a load, store or prefetch ARM64 assembly instruction
+-                lastOpcodeUnsafe = true
+-            when  "muli", "mulp", "mulq", "smulli"
+-                # List all macro instructions that can be lowered to a 64-bit multiply-accumulate ARM64 assembly instruction
+-                # (defined as one of MADD, MSUB, SMADDL, SMSUBL, UMADDL or UMSUBL).
+-                if lastOpcodeUnsafe
+-                    newList << Instruction.new(node.codeOrigin, "nopCortexA53Fix835769", [])
+-                end
+-                lastOpcodeUnsafe = false
+-            else
+-                lastOpcodeUnsafe = false
+-            end
+-        end
+-        newList << node
+-    }
+-    newList
+-end
+ 
+ class Sequence
+     def getModifiedListARM64(result = @list)
+@@ -470,7 +443,6 @@
+         result = arm64FixSpecialRegisterArithmeticMode(result)
+         result = assignRegistersToTemporaries(result, :gpr, ARM64_EXTRA_GPRS)
+         result = assignRegistersToTemporaries(result, :fpr, ARM64_EXTRA_FPRS)
+-        result = arm64CortexA53Fix835769(result)
+         return result
+     end
+ end
+@@ -1115,10 +1087,6 @@
+             $asm.puts "bfi #{operands[3].arm64Operand(:quad)}, #{operands[0].arm64Operand(:quad)}, #{operands[1].value}, #{operands[2].value}"
+         when "pcrtoaddr"
+             $asm.puts "adr #{operands[1].arm64Operand(:quad)}, #{operands[0].value}"
+-        when "nopCortexA53Fix835769"
+-            $asm.putStr("#if CPU(ARM64_CORTEXA53)")
+-            $asm.puts "nop"
+-            $asm.putStr("#endif")
+         when "globaladdr"
+             uid = $asm.newUID
+ 
+--- a/Source/JavaScriptCore/offlineasm/instructions.rb
++++ a/Source/JavaScriptCore/offlineasm/instructions.rb
+@@ -354,7 +354,6 @@
+     [
+      "bfiq", # Bit field insert <source reg> <last bit written> <width immediate> <dest reg>
+      "pcrtoaddr",   # Address from PC relative offset - adr instruction
+-     "nopFixCortexA53Err835769", # nop on Cortex-A53 (nothing otherwise)
+      "globaladdr",
+      "divi",
+      "divis",
+--- a/Source/cmake/OptionsCommon.cmake
++++ a/Source/cmake/OptionsCommon.cmake
+@@ -19,32 +19,6 @@
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ define_property(TARGET PROPERTY FOLDER INHERITED BRIEF_DOCS "folder" FULL_DOCS "IDE folder name")
+ 
+-# Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
+-# Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
+-# (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
+-set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
+-if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
+-    execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT)
+-    math(EXPR PROC_MAX ${PROC_COUNT}-1)
+-    foreach (PROC_ID RANGE ${PROC_MAX})
+-        execute_process(COMMAND taskset -c ${PROC_ID} grep "^CPU part" /proc/cpuinfo OUTPUT_VARIABLE PROC_PART)
+-        if (PROC_PART MATCHES "0xd03")
+-            set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE ON)
+-            break ()
+-        endif ()
+-    endforeach ()
+-endif ()
+-option(WTF_CPU_ARM64_CORTEXA53 "Enable Cortex-A53-specific code paths" ${WTF_CPU_ARM64_CORTEXA53_INITIALVALUE})
+-
+-if (WTF_CPU_ARM64_CORTEXA53)
+-    if (NOT WTF_CPU_ARM64)
+-        message(FATAL_ERROR "WTF_CPU_ARM64_CORTEXA53 set without WTF_CPU_ARM64")
+-    endif ()
+-    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-mfix-cortex-a53-835769)
+-endif ()
+-
+-EXPOSE_VARIABLE_TO_BUILD(WTF_CPU_ARM64_CORTEXA53)
+-
+ set(ARM_TRADITIONAL_DETECTED FALSE)
+ if (WTF_CPU_ARM)
+     set(ARM_THUMB2_TEST_SOURCE
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"
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 2c8697223c..8e9d5d7d05 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Brian C. Woodcox <bw@InSkyData.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -128,7 +129,9 @@ engine that uses Wayland for graphics output.")
                                   "webkitgtk-" version ".tar.xz"))
               (sha256
                (base32
-                "12qfs9w93c5kiyi14ynm4rf4ad3c213dvzmdrc9c3ab2iwbks7rn"))))
+                "12qfs9w93c5kiyi14ynm4rf4ad3c213dvzmdrc9c3ab2iwbks7rn"))
+              (patches
+               (search-patches "webkitgtk-2.28.0-fix-bug-197192.patch"))))
     (build-system cmake-build-system)
     (outputs '("out" "doc"))
     (arguments
-- 
2.25.1


[-- Attachment #2.3: Type: text/html, Size: 219 bytes --]

[-- Attachment #2.4: config.scm --]
[-- Type: application/octet-stream, Size: 2534 bytes --]

;; This is an operating system configuration template
;; for a "bare bones" pinebook pro

;; The default image's kernel 4.4.190 has
;;    microSD: /dev/mmcblk0
;;    eMMC: /dev/mmcblk1
;;
;; Note that after booting the Guix System with linux-libre
;; 5.5-pinebook-pro this changes to
;;    microSD: /dev/mmcblk1
;;    eMMC: /dev/mmcblk2

;; Assuming https://gitlab.com/janneke/guix.git wip-pinebook-pro
;; has been built in .
;; cp gnu/system/examples/pinebook-pro.tmpl arm-baar.scm
;; sudo -E ./pre-inst-env guix system init arm-baar.scm /mnt --fallback

(use-modules (gnu) (gnu bootloader u-boot))
(use-service-modules avahi desktop networking ssh databases)
(use-package-modules admin bootloaders certs linux ssh)

(operating-system
  (host-name "armbook")
  (timezone "America/Edmonton")
  (locale "en_GB.utf8")

  ;; Assuming not using a typewriter that needs qwerty slowdown
  ;;(keyboard-layout (keyboard-layout "us" "qwerty"
  ;;                                  #:options '("ctrl:nocaps" "compose:menu")))

  ;; Assuming /dev/mmcblk0 is the microSD...
  (bootloader (bootloader-configuration
               (target "/dev/mmcblk0")
               (bootloader u-boot-pinebook-pro-rk3399-bootloader)))
  ;; ...and after booting, /dev/mmcblk1p1 is the root file system
  (file-systems (cons* (file-system (device "/dev/mmcblk1p1")
                                    (mount-point "/")
                                    (type "ext4"))
                       %base-file-systems))

  (kernel linux-libre-pinebook-pro)
  (kernel-arguments '("ethaddr=${ethaddr}" "eth1addr=${eth1addr}" "serial=${serial#}"
                      "video=HDMI-A-1:1920x1080@60" "video=eDP-1:1920x1080@60"
                      "vga=current"))
  (initrd-modules '())

  (users (cons* (user-account (name "me")
                              (comment "My GuixOS")
                              (group "users")
                              (supplementary-groups '("wheel" "netdev"
                                                      "audio" "video"))
                              (home-directory "/home/me"))
                %base-user-accounts))

  (name-service-switch %mdns-host-lookup-nss)
  (packages (cons* nss-certs openssh wpa-supplicant-minimal %base-packages))
  (services (cons* (service xfce-desktop-service-type)
		   (service openssh-service-type
                            (openssh-configuration
                             (port-number 4849)))
                   (service mongodb-service-type)
                   %desktop-services)))

[-- Attachment #2.5: Type: text/html, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-02 20:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 23:58 [bug#40835] [PATCH] Update to use panfrost for graphics hardware acceleration Brian Woodcox
2020-04-27 18:15 ` Vagrant Cascadian
2020-04-27 21:17   ` Brian Woodcox
2020-04-27 21:54     ` Vagrant Cascadian
2020-04-27 22:36       ` Brian Woodcox
2020-04-27 22:48         ` Vagrant Cascadian
2020-04-27 22:51           ` Brian Woodcox
2020-04-28  6:54             ` Vagrant Cascadian
2020-05-02 20:37               ` Brian Woodcox

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).