mesa-git build script for latest panfrost
#1
greetings,

if you are on a "recent" kernel (5.2+) you will benefit from installing mesa from git to take advantage of the VERY latest panfrost graphics driver. 

below is a simple script to build and install mesa-git for debian-based setups. confirmed working on debian buster, bullseye, and sid. you may rerun the script at will to update mesa-git at any time.

folks on non-debian based systems can simply address requirements manually.

ccache is used to speed up rebuilds. feel free to remove if you don't want that.

hint: regarding rebuilding, you can review the git file changes for panfrost to determine if rebuilding is advantageous.

installing to /usr/local does not impact your distro mesa in ANY WAY. to uninstall for any reason,

enjoy your fps!

EDIT: now part of pbp-tools. see other forum thread for details.
https://github.com/xmixahlx/pbp-tools
https://forum.pine64.org/showthread.php?tid=10190
#2
(01-28-2020, 02:21 PM)xmixahlx Wrote: greetings,

if you are on a "recent" kernel (5.2+) you will benefit from installing mesa from git to take advantage of the VERY latest panfrost graphics driver. below is a simple script that i've made for sharing to build and install mesa-git for debian-based setups. (tested on debian sid arm64.) you may also rerun the script at will to update mesa-git at any time.

ccache is used to speed up rebuilds. feel free to remove if you don't want that.

hint: regarding rebuilding, you can review the git file changes for panfrost to determine if rebuilding is advantageous.

installing to /usr/local does not impact your distro mesa in ANY WAY. to uninstall for any reason, simply uncomment the UNINSTALL section, or review the uninstall command and do so manually.

for a slimmer build you can replace the gallium-drivers and tools inclusions, listed at the end.

enjoy your fps.

p.s. if you have a build requisite not listed in the script please lmk and i will add here.
Excellent! Exactly what I was asking for on the thread for Daniel's Debian installer.

Deps not found:
Found CMake: NO
Run-time dependency vdpau found: NO (tried pkgconfig and cmake)
Run-time dependency xvmc found: NO (tried pkgconfig and cmake)
Run-time dependency xv found: NO (tried pkgconfig and cmake)
Run-time dependency libomxil-bellagio found: NO (tried pkgconfig and cmake)
Run-time dependency libtizonia found: NO (tried pkgconfig and cmake)
Run-time dependency libtizplatform found: NO (tried pkgconfig and cmake)
Run-time dependency tizilheaders found: NO (tried pkgconfig and cmake)
Run-time dependency libva found: NO (tried pkgconfig and cmake)

I manually resolved several of these, but many aren't in a quick 'apt search'.
— Jeremiah Cornelius
"Be the first person not to do some­thing, that no one has thought of not doing before’’
— Brian Eno, "Oblique Strategies"
#3
thanks, i already had many of these installed so knew some of these would be an issue. if you can post your apt-get line i'll add into the installer. ...apologies for being lazy regarding this...
#4
(01-28-2020, 03:17 PM)xmixahlx Wrote: thanks, i already had many of these installed so knew some of these would be an issue. if you can post your apt-get line i'll add into the installer. ...apologies for being lazy regarding this...

Success with
apt-get install cmake libva2 libva-drm2 libva-glx2 libxv-dev

Still not found (though some related packages exist):
vdpau
xvmc
libomxil-bellagio
libtizonia
libtizplatform
tizilheaders

The last 3 seem related to a media player on git?

I also edited the DEVDIR variable for my system. I start in $HOME/build for my stuff. DEVDIR confusingly starts with an "absolute" slash, but I figured that out. Also running from sudo wants to substitute /root for the parent shell $HOME. No big deal.
— Jeremiah Cornelius
"Be the first person not to do some­thing, that no one has thought of not doing before’’
— Brian Eno, "Oblique Strategies"
#5
thanks for these, i'll add them and hunt down the rest. (you don't need all of them, the script is checking for all possible inclusions for other systems, too, like BSD, etc. - other additions were unsurprisingly libvdpau-dev and libxvmc-dev)

"DEVDIR=~/Development" i.e. /home/<user>/Development. so you could change to DEVDIR=~/build

...i assume everyone has their own way to organize compilation, hence the variables. i prefer ~/Development/{UPSTREAM,MISC}. UPSTREAM for things from git/svn/etc. MISC for release packages and things from apt-get source. Smile

i would be curious of your success/performance and what os/release/arch you are on. (i.e. debian sid arm64)
#6
(01-28-2020, 03:55 PM)xmixahlx Wrote: thanks for these, i'll add them and hunt down the rest. (you don't need all of them, the script is checking for all possible inclusions for other systems, too, like BSD, etc.)

"DEVDIR=~/Development" i.e. /home/<user>/Development. so you could change to DEVDIR=~/build

...i assume everyone has their own way to organize compilation, hence the variables. i prefer ~/Development/{UPSTREAM,MISC}. UPSTREAM for things from git/svn/etc. MISC for release packages and things from apt-get source. Smile

i would be curious of your success/performance and what os/release/arch you are on. (i.e. debian sid arm64)
Yeah, some of these deps look like they relate to nVidia, but I'm going to wait until you can validate which are extraneous.

I'm on Debian Bullseye/testing with Daniel's kernel, enabling arch armhf. I have sid pinned at low priority for ecryptfs and related utils, which aren't yet in testing. After your help with git panfrost, I'm going to get a 5.5 kernel build with latest panfrost support, using a deb package build - so it's in the dpkg database.
— Jeremiah Cornelius
"Be the first person not to do some­thing, that no one has thought of not doing before’’
— Brian Eno, "Oblique Strategies"
#7
honestly, i am not entirely sure what tools, if any, will be useful so i erred on caution to build all, but please feel free to edit/change the installer at will! with ccache and adding ~10% to the build i chose to not yet optimize the script...

i updated the script with this info. folks that either know what they are doing, or want a minimal build should make the changes referenced on the bottom.
#8
Thank you. It works very well. I was much less lucky building debian packages from mesa git repository.
#9
(01-28-2020, 03:32 PM)Jeremiah Cornelius Wrote:
(01-28-2020, 03:17 PM)xmixahlx Wrote: thanks, i already had many of these installed so knew some of these would be an issue. if you can post your apt-get line i'll add into the installer. ...apologies for being lazy regarding this...

Success with
apt-get install cmake libva2 libva-drm2 libva-glx2 libxv-dev

Still not found (though some related packages exist):
vdpau
xvmc
libomxil-bellagio
libtizonia
libtizplatform
tizilheaders

The last 3 seem related to a media player on git?

I also edited the DEVDIR variable for my system. I start in $HOME/build for my stuff. DEVDIR confusingly starts with an "absolute" slash, but I figured that out. Also running from sudo wants to substitute /root for the parent shell $HOME. No big deal.

so to be real clear on your $HOME variable, i specifically don't use this and prefer ~/ and DEVDIR=~/Development does NOT start with a leading slash.

none of the sudo commands use ~/ (or $HOME), so this variable is not an issue.
#10
(01-28-2020, 04:28 PM)xmixahlx Wrote:
(01-28-2020, 03:32 PM)Jeremiah Cornelius Wrote:
(01-28-2020, 03:17 PM)xmixahlx Wrote: thanks, i already had many of these installed so knew some of these would be an issue. if you can post your apt-get line i'll add into the installer. ...apologies for being lazy regarding this...
< SNIP >

I also edited the DEVDIR variable for my system. I start in $HOME/build for my stuff. DEVDIR confusingly starts with an "absolute" slash, but I figured that out. Also running from sudo wants to substitute /root for the parent shell $HOME. No big deal.

so to be real clear on your $HOME variable, i specifically don't use this and prefer ~/ and DEVDIR=~/Development does NOT start with a leading slash.

none of the sudo commands use ~/ (or $HOME), so this variable is not an issue.
Thanks much. I worked out - obvs - the $DEVDIR for my dependency runs. The / may have been my fat-fingering a change to the script in vi. That's never happened before! ;-)
— Jeremiah Cornelius
"Be the first person not to do some­thing, that no one has thought of not doing before’’
— Brian Eno, "Oblique Strategies"


Possibly Related Threads…
Thread Author Replies Views Last Post
  kernel build script for latest mainline manjaro kernel xmixahlx 42 64,588 07-11-2020, 09:01 PM
Last Post: xmixahlx
  sway-git build script for latest wayland wm xmixahlx 2 6,018 03-27-2020, 02:46 PM
Last Post: xmixahlx
  openarena build script xmixahlx 4 7,382 03-20-2020, 10:25 PM
Last Post: xmixahlx
  i3blocks Manjaro battery status script Gerhard 0 3,150 01-05-2020, 02:35 PM
Last Post: Gerhard

Forum Jump:


Users browsing this thread: 1 Guest(s)