[Debian R3 and R4] Installing Mali Binary Drivers

Started by tlhingan, September 23, 2013, 09:41:48 pm

Previous topic - Next topic

tlhingan

September 23, 2013, 09:41:48 pm Last Edit: October 01, 2013, 05:39:43 pm by tlhingan
These instructions are a bit wonky to follow for a n00b, so here's what is hopefully a simpler and more complete rewrite of those instructions.

edit /etc/modules to add
ump
mali
mali_drm


create a file in /etc/udev/rules.d/ called "50-mali.rules" containing
KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"


reboot
after loging in, type "lsmod" and make sure "mali" and "ump" are listed
then
apt-get install build-essential xorg-dev xutils-dev libdrm-dev x11proto-dri2-dev libltdl-dev libtool automake
git clone https://github.com/linux-sunxi/sunxi-mali.git
cd sunxi-mali
git clone https://github.com/robclark/libdri2
cd libdri2
./autogen.sh --prefix=/usr
make
make install
cd ..
git submodule init
git submodule update
make install
cd ..
git clone https://github.com/ssvb/xf86-video-sunxifb.git
cd xf86-video-sunxifb
autoreconf -vi
./configure --prefix=/usr
make
make install
cp xorg.conf /usr/share/X11/xorg.conf.d/99-sunxifb.conf

tlhingan

I guess one could copy/paste the last block into a script file.
I'll try that next time I need to setup another image.

exotic

After doing all this, startx say : no screens found!

Any help please.

jeanyves

Quote from: tlhingan on September 23, 2013, 09:41:48 pm
These instructions are a bit wonky to follow for a n00b, so here's what is hopefully a simpler and more complete rewrite of those instructions.

apt-get install build-essential xorg-dev xutils-dev libdrm-dev x11proto-dri2-dev libltdl-dev libtool automake
git clone https://github.com/linux-sunxi/sunxi-mali.git
cd sunxi-mali
git clone https://github.com/robclark/libdri2
cd libdri2
./autogen.sh
make
make install
cd ..
git submodule init
git submodule update
make install
cd ..
git clone https://github.com/ssvb/xf86-video-sunxifb.git
cd xf86-video-sunxifb.git
autoreconf -vi
./configure --prefix=/usr
make
make install
cp xorg.conf /usr/share/X11/xorg.conf.d/99-sunxifb.conf



You sould probably replace

cd xf86-video-sunxifb.git

with cd xf86-video-sunxifb




exotic

Yes this is a mistake in the script, but is not the problem

tlhingan

Quote from: jeanyves on September 25, 2013, 02:32:04 pm
You sould probably replace

cd xf86-video-sunxifb.git

with cd xf86-video-sunxifb

Yes!
Thanks for catching that!
Top post edited to reflect changes.
:)

tlhingan

Quote from: exotic on September 25, 2013, 12:19:31 pm
After doing all this, startx say : no screens found!
Any help please.

Yes, there's a mistake in the provided configuration file.
Change the driver specified in 99-sunxifb.conf from "fbturbo" to "fbdev".
Top post edited to reflect changes.

exotic

With modification in conf file startx is now OK.
I was thinking that installing mali driver will improve mplayer performance with HD video but in fact no.
Is this normal?

progmetalbg

Quote
I was thinking that installing mali driver will improve mplayer performance with HD video but in fact no.
Is this normal?


Mali is the GPU driver.
AllWinner's multimedia (video & image) acceleration co-processor is called CedarX and its open source support in Linux is in alpha state at the moment (although I think it is well supported in Android via some binary blob).
http://linux-sunxi.org/CedarX
You can try changing mplayer renderer to gl or gl2 (OpenGL).

tlhingan

Edited top post to include /usr prefix for the libdri2 autogen
Also added mali_drm as a module to load.
And this does work quite nicely as a script.

neslekkim

Does this mean that these drivers are not installed on the image one can download on this site, or is this for those who create their own?

Lurch

They are not on the downloadable image - not everyone needs them.
You can use this procedure to download and install them on the image you downloaded.

neslekkim

*need* ? :)
It will give faster graphics i guess?, if I manage to get everything up,I want to use the a20 for mediastreaming, but heaps of debian stuff to learn first.

tlhingan

October 01, 2013, 05:40:26 pm #13 Last Edit: October 01, 2013, 05:44:04 pm by tlhingan
Edited top post to remove the editing step of xorg.conf.
fbturbo now loads with this config.

To make a scrip file out of the code:

  • create a new text file, call it whatever you want

  • type "#!/bin/bash" on the first line (without the quotation marks)

  • paste the code into it

  • save

  • change the permissions to make it executable (try "chmod u+x <name of file here>" without quotation marks)

  • from the command prompt, type the name of your file and press enter

  • this will take a while, so you may as well go do something else


woodward

December 04, 2013, 01:46:36 am #14 Last Edit: December 04, 2013, 01:50:51 am by woodward
Thank you so much for these instructions. They executed without error, but I don't see a difference in performance. I am testing with glxgears "apt-get install mesa-utils" (I know not the best benchmark, but it is easy to get). I ran glxgears with and without the mali module from a terminal in lightdm and from ssh with "Xorg" then "glxgears -display :0". The frames per second were around 40.

I am testing with the debian-release5 image from olimex. Also, my display is the 10" lcd from olimex if that matters.

Are you guys seeing a speed up with the binary drivers? I certainly may have messed something up during my install. Thank you