We're hiring!
*

ROCK Pi and an easy place: Panfrost & Wayland on a Rockchip board

Rohan Garg avatar

Rohan Garg
August 06, 2019

Share this post:

With the release of the 5.2 Linux kernel, you might have noticed that Collabora has done a lot of work with Rockchip's RK3399 platform, more specifically with the ROCK Pi 4 single-board computer.

Our ongoing work on the reverse-engineered Panfrost OpenGL ES driver for Arm Mali GPUs turns the RK3399 SoC into a very attractive platform to try out Wayland on ARM devices, especially since it's such a versatile platform that is both affordable to buy and is available in multiple form factors, including system-on-module (SoM) and single-board computer (SBC).

Upstreaming Work

U-Boot

Collabora has been steadily contributing to enabling RK3399 support (among many others!) in upstream u-boot. Some of the most notable contributions include:

Linux

For the 5.2 release cycle Collaborans focused on optimizing various subsystems such as the Panfrost DRM driver for Arm Mali T6xx/T7xx/T8xx GPUs used in a huge number of platforms, and a V4L2 driver for the Hantro G1 video codec used in RK3288 and RK3399 devices, as well as NXP i.MX8M and Microchip SAMA5D4.

We have also put work into better supporting Rockchip's display controller within its atomic kernel modesetting (KMS) driver.

You can find more information about these contributions here.

We'll also be focusing on the V4L2 contributions in a separate blog post in the future.

Panfrost

A lot of work has been put into shaping up Panfrost leading to GNOME running on the RK3399. Alyssa recently blogged about it over here.

I'm pleased to announce that I also have Plasma running on Panfrost. With two of the biggest Desktop Environments running on Panfrost, Panfrost is maturing to be a great way to run an open source graphics stack on the RK3399 platform very quickly.

Plasma running on Panfrost

Bringing it all together

Over the course of the past couple of months, in order to iterate quickly, we've had to come up with a way to quickly deploy images and builds.

Collabora has developed debos, a very versatile tool which allows you to compose custom builds based on Debian in a composable and reproducible way. Debos allows you to take a Debian base, add particular 'overlay' software packages, combine those with a board-support package, and finally generate images which can be flashed directly to a device. Since we wanted more recent builds of u-boot, Linux, and Mesa than what is yet available in Debian, we've chosen to build those ourselves.

In order build all of these, we've used GitLab's excellent CI infrastructure, as used for Mesa upstream, and you can find all the relevant builds over here.

The kernel and Mesa builds can be reused across boards, so in order to enable more RK3399 boards one would only need to build the relevant u-boot binaries and point to the correct Device Tree file.

We've also written a debos recipe for the ROCK Pi that puts all of these builds together on top of a Debian Testing base here.

You can build images locally like so :

git clone https://gitlab.collabora.com/rockpi/rockpi4
cd rockpi4
docker run --rm --interactive --tty --device /dev/kvm --workdir /recipes --mount "type=bind,source=$(pwd),destination=/recipes" --security-opt label=disable godebos/debos --scratchsize=8G rockpi4.yml

Alternatively, pre-generated images can be downloaded from here.

These images come preloaded with Weston (a minimalist Wayland environment) and Panfrost. On boot you should be logged into a Weston session. You can also customise the images to install KDE Plasma 5 or GNOME as you see fit; both of those will work fine as well. The default username and password for these images is "debian".

A shoutout to Tom Cubie for providing the ROCK Pi 4 boards that made a lot of this possible.

Comments (17)

  1. Ikbel BOULABIAR:
    Aug 06, 2019 at 11:11 PM

    Excellent post !
    I asked another "open source" company on what to do to get wayland working on these boards or on cheap Android boxes (X96, arm mali 450 or similar, ...) but got a very rejectful mail after my 3rd mail I've sent and waiting for over a month.

    If you want some of these Android boxes please sent me a mail containing an address and I'll be pleased to send one or more.

    Thanks again for all this work making linux available on arm which opens the way for more usage, specially in low income countries.

    Reply to this comment

    Reply to this comment

    1. Rohan Garg:
      Aug 07, 2019 at 02:24 PM

      Thank you for the feedback & offer, however that Android box runs on Lima, and we're focused on Panfrost right now, so we wouldn't be able to spend any time on it!

      Reply to this comment

      Reply to this comment

  2. Rafał:
    Aug 13, 2019 at 06:27 AM

    Can you share a status of video decoding hardware support, please? Is it supported and/or what formats work?

    Reply to this comment

    Reply to this comment

    1. Rohan Garg:
      Aug 13, 2019 at 05:25 PM

      We'll post news on that very soon, stay tuned!

      Reply to this comment

      Reply to this comment

    2. Eze Garcia:
      Aug 13, 2019 at 10:07 PM

      Hi Rafał,
      MPEG-2 and VP8 decoding is supported on RK3399. We will soon post H264 and VP9. Keep in mind, that this is a stateless codec, which needs a modified Ffmpeg version. Hopefully, we will also be able to merge Ffmpeg, and Gstreamer support for this. However, for the time being, it won't work out of the box.

      Reply to this comment

      Reply to this comment

  3. Michael Sartain:
    Aug 13, 2019 at 10:12 PM

    Does your patches help with this Pine64 laptop by any chance?

    https://hothardware.com/news/raspberry-pi-rival-pine64-unleashes-200-pinebook-pro-linux-laptop

    I'm guess it does, but just wanted to check. Might get one if so. Awesome work, btw. Thank you!

    Reply to this comment

    Reply to this comment

    1. Ezequiel Alfredo Garcia:
      Aug 15, 2019 at 01:52 AM

      Sure, RK3399 is supported by our patches. And yes, you should consider buying a Pinebook Pro!

      Reply to this comment

      Reply to this comment

  4. Karen Gates:
    Aug 15, 2019 at 01:49 AM

    First of all, thank you for all the hard work you put into improving the support of rockchip SOCs.
    However, I tried your prebuilt images for rockpi4 and there was no HDMI output and with radxa's official images it does work. Do you guys know how to fix it?

    Reply to this comment

    Reply to this comment

    1. Eze Garcia:
      Aug 22, 2019 at 01:01 PM

      Hi Karen,

      Thanks for reaching out. Please note that there's an issue with this image and it seems it can take a while to boot, so you need to wait 2-3 minutes (at most) for something to come up on the display. That said, we've had reports of HDMI not working with the upstream kernel. In my case, and with the boot time caveat, the image boots out of the box.

      Reply to this comment

      Reply to this comment

  5. piter75:
    Aug 19, 2019 at 08:33 PM

    First, thanks for a hard work mainlining a lot of stuff around RK3399 and Rock Pi 4.

    I have tried the latest image (https://gitlab.collabora.com/rockpi/rockpi4/commit/c8c0069cd766ce321ce895a75f1e60edc927e848) and it doesn't seem to boot on my Rock Pi 4 model B rev 1.4 (4GiB).
    Is it successfully booting for you? What are the specs of your test devices?

    For me it resets just after trying to boot kernel:

    Starting kernel ...

    "Synchronous Abort" handler, esr 0x02000000
    elr: ffffffff0b47d000 lr : 0000000000202318 (reloc)
    elr: 00000000031c0000 lr : 00000000f7f45318
    ...

    Resetting CPU ...

    resetting ...

    Reply to this comment

    Reply to this comment

    1. piter75:
      Aug 25, 2019 at 04:57 PM

      I have done some more tests and it seems that I only cannot boot it from SD card.
      If I write the image to eMMC then it boots fine.

      Does it boot with SD for you or are you using eMMC to test it?

      Reply to this comment

      Reply to this comment

  6. Julius Schwartzenberg:
    Aug 20, 2019 at 07:29 PM

    Would it be hard to use the image creation tool for RK3288 boards? I have an ASUS Tinkerboard myself I'd like to see working with this.

    Reply to this comment

    Reply to this comment

    1. Eze Garcia:
      Aug 22, 2019 at 01:12 PM

      Of course, this gitlab-ci setup can be extended to support RK3288! Please feel free to fork the https://gitlab.collabora.com/rockpi repos and add support for it. Shouldn't be too hard, provided you are familiar with embedded linux systems.

      Reply to this comment

      Reply to this comment

      1. Julius Schwartzenberg:
        Aug 23, 2019 at 09:07 PM

        I am just a user of such systems, so I suppose I'm not very familiar with them in the sense you mean. I do know that uboot is used for booting and I understand that the Tinker Board is supported with vanilla Linux nowadays. That's how far my knowledge goes.
        What would you recommend?

        Reply to this comment

        Reply to this comment

  7. Chris Davies:
    Aug 21, 2019 at 11:37 PM

    I don't know how interested you are in more boards with similar hardware, but the Mediatek Helio X20 developer board might be an interesting one to try. It has a Mali T880 GPU and if you could get Weston on that running, it'd be a great help to Linux on the Planet Computers Gemini, which is a Helio X27 device (same hardware, different clock frequencies.) Most of the other peripherals including the display controller already have open source drivers.

    Reply to this comment

    Reply to this comment

    1. Stuart Naylor:
      Aug 28, 2019 at 12:36 AM

      Panfrost is an opensource driver for midgard Mali Gpu's Collaboro contribute to the kernel but the majority is a collective via https://gitlab.freedesktop.org/mesa/mesa.
      Alyssa Rosenzweig @ collaboro and others have done an amazing huge amount of work for midgard/bifrost gpus.

      Reply to this comment

      Reply to this comment

  8. ari:
    Sep 10, 2019 at 09:51 AM

    I tried this build on a chromebook kevin. Weston runs nicely, but gnome and plasma are running at about 1fps

    I think they all use swrast - both didn't start complaining about missing swrast_dri.so and kms_swrast_dri.so, so I symlinked the debian-provided ones into place.
    Do you have a hint on how to run them on panfrost?
    Sorry that this is a support request. Otherwise: Thank you for you great work!

    Reply to this comment

    Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Building GStreamer on Windows

26/11/2019

With the advent of meson and gst-build, it is now possible to set up a GStreamer Windows development environment that rivals the finest…

Zink: Fall Update

24/10/2019

I recently went to XDC 2019, where I gave yet another talk about Zink. I kinda forgot to write a blog-post about it, so here’s me trying…

Adding stateless support to vicodec

09/10/2019

Prior to joining Collabora, I took part in Round 17 of the Outreachy internships, to work on the virtual drivers in the media subsystem…

Why HDCP support in Weston is a good thing

03/10/2019

What HDCP is, and why supporting HDCP in Weston is justified in both an economical and technical context.

Virglrenderer and the state of virtualized virtual worlds

28/08/2019

With the release of virglrenderer 0.8.0, getting accelerated OpenGL within a virtual machine (VM) made a big leap forward. Since virglrenderer-0.7.0,…

ROCK Pi and an easy place: Panfrost & Wayland on a Rockchip board

06/08/2019

Ongoing work on the reverse-engineered Panfrost OpenGL ES driver for Arm Mali GPUs has turned the RK3399 SoC into a very attractive platform…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2019. All rights reserved. Website sitemap.