Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Last active August 19, 2023 18:03
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tstellanova/6f7844379e358ee81b89cf6937ea8139 to your computer and use it in GitHub Desktop.
Save tstellanova/6f7844379e358ee81b89cf6937ea8139 to your computer and use it in GitHub Desktop.
Building panfrost natively on armv8 (rockpi4b / RK3399) on Debian "buster"
  • sudo apt install python3-pip
  • Install python3 packages:
pip3 install  setuptools mako
  • Install many, many packages not included with armbian "buster":
sudo apt-get install meson ninja-build
sudo apt-get install pkg-config zlib1g-dev libexpat-dev libdrm-dev libunwind-dev 
sudo apt-get install libwayland-dev wayland-protocols libwayland-egl-backend-dev
sudo apt-get install libx11-dev libxext-dev libxdamage-dev libxcb-glx0-dev libx11-xcb-dev libxcb-dri2-dev libxcb-dri2-0-dev libxcb-dri3-0-dev
  • Grab mesa sources
$ git clone https://gitlab.freedesktop.org/mesa/mesa -b master

Configure, build, and install mesa

cd mesa
mkdir build
meson build/ -Dgallium-drivers=lima,panfrost,kmsro,swrast -Dplatforms=x11,drm,surfaceless -Dvulkan-drivers= -Ddri-drivers= -Dllvm=false

ninja -C build/
sudo ninja -C build/ install
  • Test it out:
sudo apt install mesa-utils
glxinfo |grep render

(Use a framebuffer if necessary: sudo apt install xvfb

Then you can run eg:

Xvfb :1 -screen 1 1600x1200x16&
export DISPLAY=:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment