Jump to content

Build Armbian with Panfrost (outdated)


Recommended Posts

Panfrost instructions Armbian
 

  • !!!! I made a script that does all this, check a few posts later for the script !!!!!

 

This tutorial explains how to build an Armbian image with panfrost. And what else you need to make it work.

These are early drivers. Many things don't work yet. Only OpenGL 2.1 works now.

 

You need to build an image with kernel 5.2 or later.
For this you need an x86 pc with Ubuntu 18.04 or a virtual Ubuntu 18.04 x86 image.


First install git, then clone the build folder from Armbian, and enter the build directory.

 

apt-get -y -qq install git
git clone --depth 1 https://github.com/armbian/build
cd build

Now run the script with EXPERT=yes so you can choose to build a dev image.

sudo ./compile EXPERT=yes
  • Choose "Full OS image for flashing"
  • Then "Show a kernel configuration menu before compilation"
  • Choose your board. If it's not in the regular list, look in "Show SCS/WIP/EOS/TVB".
  • Choose Development version
  • kernel configuration -> device drivers -> graphic drivers -> panfrost

 

Let it run until it's finished. The image will be in the /build/output/images

Burn it to an SD-card/eMMC/...

 

Now we need to install all the needed software

sudo apt install flex bison python3-mako libwayland-egl-backend-dev libxcb-dri3-dev libxcb-dri2-0-dev libxcb-glx0-dev libx11-xcb-dev libxcb-present-dev libxcb-sync-dev libxxf86vm-dev libxshmfence-dev libxrandr-dev libwayland-dev libxdamage-dev libxext-dev libxfixes-dev x11proto-dri2-dev x11proto-dri3-dev x11proto-present-dev x11proto-gl-dev x11proto-xf86vidmode-dev libexpat1-dev libudev-dev gettext glmark2 glmark2-es2 mesa-utils xutils-dev libpthread-stubs0-dev ninja-build bc python-pip flex bison cmake git valgrind llvm llvm-8-dev python3-pip  pkg-config zlib1g-dev wayland-protocols

Download and install meson

wget http://ftp.de.debian.org/debian/pool/main/m/meson/meson_0.55.3-1_all.deb
sudo dpkg -i meson_0.55.3-1_all.deb

Download and install mesa DRM

git clone git://anongit.freedesktop.org/mesa/drm
cd drm
meson build --prefix=/usr
ninja -C build
sudo -E ninja -C build install
cd ..

Download and install mesa graphics

git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dprefix=/usr build/
ninja -C build/
sudo ninja -C build/ install

REBOOT

 

Optionally, update sdl (recommended)

git clone https://github.com/SDL-mirror/SDL.git
cd SDL
mkdir build
cd build
cmake ../  
make -j6
sudo make install

REBOOT

 

Only thing that works ok with it is supertuxkart, to install it.

sudo apt install supertuxkart

 

Panfrost - Linux games working from repo
SuperTuxKart - Works well
ExtremeTuxRacer - lots of glitches
AssaultCube - lots of glitches

 

Instructions by Salvador Liébana & NicoD

Link to comment
Share on other sites

  • lanefu featured this topic

Armbian & Khadas are rewarding contributors

8 hours ago, soerenderfor said:

Just a quick for you: Do the Panfrost make the RockPi4 faster in desktop use/mode? And in which way. Thanks.

 

Best Regards.

 

panfrost driver is far away from daily use, still under heave develop..

 

if you have mali450/400 device, lima driver is near.

Link to comment
Share on other sites

1 hour ago, ning said:

 

panfrost driver is far away from daily use, still under heave develop..

 

if you have mali450/400 device, lima driver is near.

I had the impression it was the other way around.

Have you had success with lima? or anyone?

 

Anyway, Looking forward to seeing the @NicoD's video about tee panfrost experience.

Link to comment
Share on other sites

It has gotten a lot easier to use Panfrost now.
Download one of @balbes150 5.x Bionic images for your device. 
The panfrost module is already added, all that needs to be done is installing the mesa drivers. For that I made a script. 
Download the file here in attachment and unpack it. 
Go into the folder Panfrost
 

cd Panfrost
sudo ./installPanfrost.sh

Install all for best results.

Panfrost has improved a lot on 5.4. Many games now work normally, some still have some smaller problems. It has become usable.
Greetings, NicoD

Edit : Script update. You now can upgrade the mesa and drm drivers after installation

Update 2 : Also Lima support now. 

 

 

 

 

 

installPanfrost.sh

Edited by NicoD
Update Script/Newer version Meson/Allwinner H6 fix
Link to comment
Share on other sites

On 12/13/2019 at 6:29 AM, NicoD said:

 


cd Panfrost
sudo ./installPanfrost.sh

 

Panfrost.7z 275.06 kB · 9 downloads

Magicsee N6 Max rk3399

Armbian_19.11.4_Arm-64_bionic_dev_5.5.0-rc2_desktop_20191228 with rk3399-rock-pi-4.dtb tweaked to cpuspeed 1.70 & 2.01 GHz

Boots to desktop :), usable with some artifacts - will test again upon kernel update

 

Thanks balbes & NicoD

Link to comment
Share on other sites

On 12/30/2019 at 5:55 AM, amirul said:

Magicsee N6 Max rk3399

Armbian_19.11.4_Arm-64_bionic_dev_5.5.0-rc2_desktop_20191228 with rk3399-rock-pi-4.dtb tweaked to cpuspeed 1.70 & 2.01 GHz

Boots to desktop :), usable with some artifacts - will test again upon kernel update

 

Thanks balbes & NicoD

libgl1-mesa-dri 19.2.1-1ubuntu1~18.04.1 enables panfrost 

Still clunky with some artifacts but could only get better with further updates

Link to comment
Share on other sites

Strangely, when you build mesa-20, everything goes correctly, but after installing mesa, the old mesa-19 remains. Something changed in the rules, how do I install the new version ? Previously, the instruction worked correctly and mesa started using Panfrost. By the way, installation from repositories of the latest mesa-20 also does not use Panfrost.

Link to comment
Share on other sites

On 3/29/2020 at 1:38 PM, balbes150 said:

Strangely, when you build mesa-20, everything goes correctly, but after installing mesa, the old mesa-19 remains. Something changed in the rules, how do I install the new version ? Previously, the instruction worked correctly and mesa started using Panfrost. By the way, installation from repositories of the latest mesa-20 also does not use Panfrost.

 

IIRC the default build settings for mesa install it in /usr/local when the version from packages goes into /usr. This can leave you in a pretty weird state in my experience. Setting the install path to /usr helps.

Link to comment
Share on other sites

6 minutes ago, jcaron said:

IIRC the default build settings for mesa install it in /usr/local when the version from packages goes into /usr. This can leave you in a pretty weird state in my experience. Setting the install path to /usr helps.

Does the prefix that is specified during configuration not specify where the installation will be performed ?

 

meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dprefix=/usr build/

Link to comment
Share on other sites

On 12/12/2019 at 6:29 PM, NicoD said:

It has gotten a lot easier to use Panfrost now.
Download one of @balbes150 5.x Bionic images for your device. 
The panfrost module is already added, all that needs to be done is installing the mesa drivers. For that I made a script. 
Download the file here in attachment and unpack it. 
Go into the folder Panfrost
 


cd Panfrost
sudo ./installPanfrost.sh

Install all for best results.

Panfrost has improved a lot on 5.4. Many games now work normally, some still have some smaller problems. It has become usable.
Greetings, NicoD

Edit : Script update. You now can upgrade the mesa and drm drivers after installation

Update 2 : Also Lima support now. 

 

 

 

 

 

installPanfrost.sh 2.27 kB · 22 downloads

check this script, can't download mesa deb file, ninja command are not found, etc. thanks

Link to comment
Share on other sites

7 hours ago, domven said:

check this script, can't download mesa deb file, ninja command are not found, etc. thanks

This doesn't need to be done anymore. Panfrost is activated automatically. Just install Focal mainline and you've got Panfrost enabled. 
Check with "glxinfo -B" to see if it's on.

Link to comment
Share on other sites

  • NicoD changed the title to Build Armbian with Panfrost (outdated)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines