LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-23-2018, 02:15 PM   #1
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Rep: Reputation: Disabled
Mesa Driver and Raspberry PI 3


Hi, i'm new to the forums.

I have some experience with linux, but not Slackware what i want to change to.

Well i have a Raspberry Pi 3 with a ARM cpu.
I have read various docs about setting up this machine with Slackware.

It currently boots up, but in a PDF the person says that the MESA driver is not compatible with OpenGL and i have to REBUILD MESA wotj VC4 DRI Driver.

He gives an script to do it.

Im a little confused, where do i get MESA for Slackware.

Quote:
$ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
CXXFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-egl-platforms=x11,drm \
--with-gallium-drivers=vc4
$ make -j4
$ make install DESTDIR=/where/you/want/to/install
should i put it in a make file?

Sorry for being to noob, i just want to learn.
Thanks
 
Old 01-23-2018, 02:34 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Hi ateneo,

I've moved this thread over to the Slackware ARM forum to gain it some exposure with LQ members who have the most relevant experience with getting Slackware and programs for it running on a Pi.
 
Old 01-23-2018, 02:37 PM   #3
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks man. Sorry for the inconvinence
 
Old 01-23-2018, 02:42 PM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Not at all. I've found that Slackware persons are highly knowledgeable about the distribution and they seem to be very active on the LQ forums. Meanwhile we don't seem to see much discussion in the Newbie section, even though you are new to this situation.

I should add that based on the clip you posted, you'll need to download the source and then run that script, or series of commands to build and then install the built result. There may be better/other options for Slackware, but that's beyond my knowledge, I'm not a Slackware user.
 
Old 01-23-2018, 03:34 PM   #5
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
@ateneo

The mesa package hat comes with Slackware ARM is generic, compiled to work for all ARM platforms, it'll work fine with the Raspberry too, but AFAIK it is not built with the vc4 driver. Depending on your specific needs, you can either recompile mesa on your own or use the already available (Raspberry provided) mesa package in /opt/vc.

As you haven't specified what Slackware ARM version you are using (14.2 or current), the compilation switches might vary and you should use and amend accordingly the following mesa.SlackBuild:
https://mirror.slackbuilds.org/slack...source/x/mesa/
https://mirror.slackbuilds.org/slack...source/x/mesa/
This thread might give you additional details:
https://www.linuxquestions.org/quest...i3-4175590590/

If you are able to use the already available OpenGL powered mesa libs (point your application to use them) in /opt/vc, then you won't need to recompile anything and can live with both mesa libs on the same host, the one provided by Slackware ARM in /usr/lib and the other provided by Raspberry in /opt/vc
Should you want to recompile and tune for Raspberry Pi3 the mesa libs that are provided by Raspberry (/opt/vc), then you can follow the section related to VC-USERLAND from this thread:
https://www.linuxquestions.org/quest...on-4175612537/

Here is what the Raspberry provided mesa lib is capable of:
https://elinux.org/Raspberry_Pi_VideoCore_APIs
 
Old 01-23-2018, 03:49 PM   #6
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks very much man!!
 
Old 01-23-2018, 03:56 PM   #7
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
The links for the mesa.SlackBuild from my previous post were pointing at the Slackware core X86 distribution - they are useful for grabbing the source code and patches. For using and adapting the mesa-Slackbuilds for ARM, use the scripts found here (depending on the Slackware version you're running):
ftp://ftp.arm.slackware.com/slackwar...source/x/mesa/
ftp://ftp.arm.slackware.com/slackwar...source/x/mesa/
 
Old 01-24-2018, 09:47 AM   #8
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Sorry, i'm just learning linux. Maybe putting slackware into ARM isn't the best approach to learn. I come from a FreeBSD background.

Well i have the x86 source and i have the ARM Mesa source.

How do i do to make it work? Thxs.
 
Old 01-24-2018, 12:06 PM   #9
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by ateneo View Post
Sorry, i'm just learning linux. Maybe putting slackware into ARM isn't the best approach to learn. I come from a FreeBSD background.

Well i have the x86 source and i have the ARM Mesa source.

How do i do to make it work? Thxs.
From my experience (an old BSD-er myself), Slackware is the closest thing you can get to BSD and due to its simplicity (Linux purity) and lack of automation, it might be the best approach to learn about Linux. Not the easiest I must admit.

There is no x86 / ARM sources, Slackware ARM is juts a port branched out from the core Slackware distribution, as all the other ARM Linux distros usually are, the Linux source code is platform independent. As advised before, grab the source code and the patches from the core Slackware repository (x86) and only take the mesa.SalckBuild from the ARM repository (it contains ARM specific directives), modify it according to your needs (add the vc4 driver and Pi3 specific compiler flags) and run it - start the build. You might want to comment out the lines from the mesa.SalckBuild that are installing mesa into the system and only look for creating the package. Once you get the package, remove the existing mesa that came with Slackware ARM and install your own generated one.
Code:
removepkg /var/log/packages/mesa*
installpkg /path-to-your-mesa/mesa*.tgz
- substitute * with the actual name/version

Detailing your Slackware setup - exact version and what you're planning to do with the new mesa might help (as stated before, you might not even need to recompile it, but use the Raspberry provided one).
 
Old 01-24-2018, 12:41 PM   #10
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
I switched to slack since it's the most "unix-like" linux.

Ok. It was a very stupid noob question.
Thanks for your reply.
 
Old 01-24-2018, 12:49 PM   #11
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Detailing your Slackware setup - exact version and what you're planning to do with the new mesa might help (as stated before, you might not even need to recompile it, but use the Raspberry provided one).
The thing is that i got a Reaspberry PI 3. I have a 64GB microSD card Class 10, keyboard, mouse, HDMI LED Flatron E2350 monitor and network access through network tx 100 cable.

I want to set up a linux box with it.

I have installed HARD ARM KDE-current successfully in my box (I'm writing this post in it) using Xfce.

When i look at xorg.conf file it's using the VESA driver.
So i need to compile an specific driver for the Rasp 3.
 
Old 01-24-2018, 01:47 PM   #12
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by rtmistler View Post
I'm not a Slackware user.
* Exaga takes rtmistler off his Christmas card list.

Quote:
Originally Posted by ateneo View Post
Sorry for being to noob, i just want to learn.
We were all noobs once. Don't worry and don't apologise for it. You're in a great place to get help!

Quote:
Originally Posted by ateneo View Post
Sorry, i'm just learning linux. Maybe putting slackware into ARM isn't the best approach to learn. I come from a FreeBSD background.
Slackware offers the most comprehensive learning curve of any Linux distribution. Of that there is no doubt. If you want to learn Linux then you made the best choice with Slackware.

Slackware ARM is virtually identical to Slackware x86. Apart from specific x86 and ARM required packages, they both work, look, and feel the same. If you're familiar with Slackware x86 then the ARM port will be just as familiar.

Best of luck with your endeavours. Just out of interest, why are you needing the MESA drivers?

Last edited by Exaga; 01-24-2018 at 01:58 PM. Reason: i felt like it
 
Old 01-24-2018, 02:03 PM   #13
ateneo
LQ Newbie
 
Registered: Jan 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
I need those MESA Drivers right away!!!
Please!!! :-)
 
Old 01-24-2018, 03:56 PM   #14
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by ateneo View Post
The thing is that i got a Reaspberry PI 3. I have a 64GB microSD card Class 10, keyboard, mouse, HDMI LED Flatron E2350 monitor and network access through network tx 100 cable.

I want to set up a linux box with it.

I have installed HARD ARM KDE-current successfully in my box (I'm writing this post in it) using Xfce.

When i look at xorg.conf file it's using the VESA driver.
So i need to compile an specific driver for the Rasp 3.
It looks that you're running Slackware ARM current HardFloat. I was about to suggest to use it, because it's faster by making use of the HardFloat VFP.
I've been looking at the mesa.SlackBuild, the one you apparently don't have time inspecting , and it looks like the vc4 driver is newly defined and used for the build. That means, you won't need to recompile the mesa again. - drmozes, after finishing his social sciences studies, might correct me if wrong.
ftp://ftp.arm.slackware.com/slackwar...esa.SlackBuild
Code:
# Determine the configuration options for the known architectures:
case $ARCH in
   arm)     #export GALLIUM_DRIVERS=" nouveau r600 r300 svga swrast vc4 "
            export VULKAN=" " ## not for ARM: --with-vulkan-drivers=intel,radeon "
            export GALLIUM_DRIVERS="radeonsi,swrast,r600,freedreno,vc4,virgl,r300,nouveau"
            #export SLKARCHCONFARGS="--enable-openvg --enable-gallium-egl"
            export SLKCFLAGS="$SLKCFLAGS -fexceptions"
            ;;
esac
- make sure your Slackware system is updated (look for mesa and update it), do not update any kernel & kernel related packages! - uncheck all the lines related, run:
Code:
slackpkg update
slackpkg install-new
slackpkg upgrade-all
- you need to enable the vc4 driver at boot time on your Rpi3. Depending on where you took your kernel, first check if you have the file: /boot/overlays/vc4-kms-v3d.dtbo
- in case you need it, an updated, clean and complete kernel you can get by following the guide here (manual installation method - raspbian_boot_stuff.tgz file):
https://docs.slackware.com/howtos:ha...rm:raspberrypi
- then, add this line to your /boot/config.txt:
Code:
dtoverlay=vc4-kms-v3d
- make sure you've allocated at least 128MB RAM to your GPU (again, in /boot/config.txt)
- reboot your system and start X
- inspect your X Server log file - /var/log/Xorg.0.log
- while under X - check what driver are you using by issuing:
Code:
glxinfo | grep -i opengl
P.S. You might want to also check the new driver:
https://www.raspberrypi.org/forums/v...c.php?t=159853
https://github.com/raspberrypi/firmware/issues/909

Last edited by abga; 01-24-2018 at 07:49 PM. Reason: fkms addendum + slackpkg - avoid kernel update + typo
 
1 members found this post helpful.
Old 01-25-2018, 11:22 AM   #15
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by ateneo View Post
I need those MESA Drivers right away!!!
Yes, I gathered that. I am asking why you need the MESA drivers. For what purpose, etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Vivante Mesa Driver Is Still Brewing LXer Syndicated Linux News 0 12-25-2013 09:01 PM
Question regarding graphics driver with OpenGL/MESA nitin.garg Fedora 0 11-28-2011 07:11 AM
[SOLVED] Reverting to old or adding testing Mesa driver Vegan Linux - Newbie 3 01-24-2011 03:21 AM
What is a Mesa driver jacatone Linux - Newbie 2 07-25-2007 02:43 AM
Mesa after installing current ATI-Driver MaxistXXL Linux - Hardware 4 06-03-2007 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration