Difference between revisions of "X Display Manager for odroidu2"

From odroid US
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
'''This topic is for Odroid-U2 and Odroid-X2 devices'''.
  
'''This topic is for odroidu2 devices'''.  The information may be dated. Some users have not been able to use this...
+
The U2 information may be dated. At the end, more recent summary for Odroid-X2 is given.
  
 
The x-server and userspace drivers provided by [http://dn.odroid.com/MALI400_R3P2/] are either X version 1.11 or 1.13, whereas the default in debian is 1.12. The X-protocols seem to be incompatible.
 
The x-server and userspace drivers provided by [http://dn.odroid.com/MALI400_R3P2/] are either X version 1.11 or 1.13, whereas the default in debian is 1.12. The X-protocols seem to be incompatible.
  
So after installing [http://dn.odroid.com/MALI400_R3P2/20130429-for-xorg-1.13.3/mali_packages.tar.gz], the X-server
+
So after installing the [http://dn.odroid.com/MALI400_R3P2/20130429-for-xorg-1.13.3/mali_packages.tar.gz official drivers], the X-server
should be replaced by something else.
+
mali driver should be replaced by something else.
  
 
Newer versions of the user-space code might require libump:
 
Newer versions of the user-space code might require libump:
Line 12: Line 13:
 
cd libump
 
cd libump
 
aclocal; automake --add-missing; autoconf
 
aclocal; automake --add-missing; autoconf
./configure
+
./configure --prefix=/usr
 
make
 
make
 
checkinstall --pkgname=libump --pkgversion=1 make install
 
checkinstall --pkgname=libump --pkgversion=1 make install
Line 23: Line 24:
 
cd libdri2
 
cd libdri2
 
./autogen.sh
 
./autogen.sh
 +
./configure --prefix=/usr
 
make
 
make
 
checkinstall --pkgname=libdri2 --pkgversion=1 make install
 
checkinstall --pkgname=libdri2 --pkgversion=1 make install
Line 30: Line 32:
 
Just press enter on all checkinstall questions should be fine.
 
Just press enter on all checkinstall questions should be fine.
  
Next up are the user-space mali [http://linux-sunxi.org/Binary_drivers drivers]. The configuration script checks the
+
== User space binary blob ==
X-server, so we need to install that first:
+
 
 +
Next up are the user-space mali drivers. They are part of the mali400_2.1-13_armhf.deb package inside the
 +
[http://dn.odroid.com/MALI400_R3P2/20130429-for-xorg-1.13.3/mali_packages.tar.gz hardkernel packages].
 +
Debian jessie has different installation paths, so make it's best to use for example midnight commander to
 +
extract libMali.so and libUMP.so from the .deb and make sure your system ends up looking like:
 +
 
 
<pre>
 
<pre>
apt-get install xserver-xorg-core xserver-xorg-dev
+
cd /usr/lib/arm-linux-gnueabihf
git clone https://github.com/linux-sunxi/sunxi-mali.git
+
ls -l *EGL* *GLES* *UMP* *Mali*
cd sunxi-mali
+
lrwxrwxrwx 1 root root    11 May 11 14:18 libEGL.so -> libEGL.so.1
git submodule init; git submodule update
+
lrwxrwxrwx 1 root root    13 May 11 14:18 libEGL.so.1 -> libEGL.so.1.4
checkinstall --pkgname=sunxi-mali --pkgversion=1 make install VERSION=r3p1
+
lrwxrwxrwx 1 root root    10 May 11 14:32 libEGL.so.1.4 -> libMali.so
 +
lrwxrwxrwx 1 root root    17 May 11 11:36 libGLESv1_CM.so -> libGLESv1_CM.so.1
 +
lrwxrwxrwx 1 root root    19 May 11 11:36 libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1
 +
lrwxrwxrwx 1 root root    10 May 11 14:32 libGLESv1_CM.so.1.1 -> libMali.so
 +
lrwxrwxrwx 1 root root    14 May 11 14:30 libGLESv2.so -> libGLESv2.so.2
 +
lrwxrwxrwx 1 root root    16 May 11 14:30 libGLESv2.so.2 -> libGLESv2.so.2.0
 +
lrwxrwxrwx 1 root root    10 May 11 14:32 libGLESv2.so.2.0 -> libMali.so
 +
-rw-r--r-- 1 root root 731492 Feb 22  2013 libMali.so
 +
lrwxrwxrwx 1 root root    15 May 11 11:41 libUMP.so -> libUMP.so.3.0.0
 +
lrwxrwxrwx 1 root root    15 May 11 11:41 libUMP.so.3 -> libUMP.so.3.0.0
 +
-rw-r--r-- 1 root root  22232 Feb 22  2013 libUMP.so.3.0.0
 
</pre>
 
</pre>
  
Finally, the x-server-module can be compiled.  
+
== X11 driver ==
 +
 
 +
Next, the x-server-module can be compiled. It should be possible to use either the sources
 +
from the [http://malideveloper.arm.com/downloads/drivers/DX910/r3p2-01rel4/DX910-SW-99003-r3p2-01rel4.tgz official drivers]
 +
or use the open source ones:
 
<pre>
 
<pre>
git clone https://github.com/ssvb/xf86-video-sunxifb.git
+
git clone https://github.com/ssvb/xf86-video-fbturbo
cd xf86-video-sunxifb
+
cd xf86-video-fbturbo
 
./autogen.sh
 
./autogen.sh
 +
./configure --prefix=/usr
 
make
 
make
mkdir -p /usr/local/lib/xorg/modules
+
sudo checkinstall --pkgname=xf86-video-fbturbo --pkgversion=1 make install
checkinstall --pkgname=xf86-video-sunxifb --pkgversion=1 make install
+
 
</pre>
 
</pre>
  
 
After installation of the x-server, it needs to be configured using /etc/X11/xorg.conf.
 
After installation of the x-server, it needs to be configured using /etc/X11/xorg.conf.
you can generate one by
 
<pre>
 
cp /usr/share/X11/xorg.conf.d/99-sunxifb.conf /etc/X11/xorg.conf
 
</pre>
 
 
 
For kernel version 3.8, /dev/fb0 is the LCD output, /dev/fb1 is the HDMI output [http://forum.odroid.com/viewtopic.php?f=55&t=305&hilit=mkimage&start=220#p8894 1]. For an Odroid-X2 with kernel 3.8.13, the following /etc/X11/xorg.conf gives output on the HDMI interface:
 
For kernel version 3.8, /dev/fb0 is the LCD output, /dev/fb1 is the HDMI output [http://forum.odroid.com/viewtopic.php?f=55&t=305&hilit=mkimage&start=220#p8894 1]. For an Odroid-X2 with kernel 3.8.13, the following /etc/X11/xorg.conf gives output on the HDMI interface:
 
<pre>
 
<pre>
 
Section "Device"
 
Section "Device"
         Identifier "Sunxi FBDEV"
+
         Identifier "Mali FBDEV"
         Driver          "sunxifb"
+
         Driver          "fbturbo" # The driver is recently renamed from sunxifb to this
 
         Option "fbdev" "/dev/fb1"
 
         Option "fbdev" "/dev/fb1"
 
         Option "ShadowFB" "on"
 
         Option "ShadowFB" "on"
Line 66: Line 82:
  
 
Section "Screen"
 
Section "Screen"
         Identifier      "Sunxi Screen"
+
         Identifier      "Mali Screen"
         Device          "Sunxi FBDEV"
+
         Device          "Mali FBDEV"
 
EndSection
 
EndSection
 
</pre>
 
</pre>
  
After this, your favorite window manager can be installed, for example [[Debian-wheezy-gnome-6_Build_Notes]].
+
If you use the official drivers from above, /etc/X11/xorg.conf should look like:
 +
 
 +
<pre>
 +
Section "Device"
 +
        Identifier "Mali-Fbdev"
 +
        Option  "fbdev"          "/dev/fb1"
 +
 
 +
        Driver  "mali"
 +
        Option  "DRI2"            "true"
 +
        Option  "DRI2_PAGE_FLIP"  "true"
 +
        Option  "DRI2_WAIT_VSYNC" "true"
 +
        Option "AccelMethod" "EXA"
 +
        Option  "UMP_CACHED"      "true"
 +
        Option  "UMP_LOCK"        "false"
 +
EndSection
 +
</pre>
 +
 
 +
 
 +
Finally, make sure the device rights are set properly:
 +
<pre>
 +
cat /etc/udev/rules.d/10-hkl_mali.rules
 +
KERNEL=="mali",SUBSYSTEM=="misc",MODE="0777",GROUP="video"
 +
KERNEL=="ump",SUBSYSTEM=="ump",MODE="0777",GROUP="video"
 +
</pre>
 +
 
 +
 
 +
After this, a window manager can be installed, for example [[Debian-wheezy-gnome-6_Build_Notes]].

Latest revision as of 14:01, 12 May 2014

This topic is for Odroid-U2 and Odroid-X2 devices.

The U2 information may be dated. At the end, more recent summary for Odroid-X2 is given.

The x-server and userspace drivers provided by [1] are either X version 1.11 or 1.13, whereas the default in debian is 1.12. The X-protocols seem to be incompatible.

So after installing the official drivers, the X-server mali driver should be replaced by something else.

Newer versions of the user-space code might require libump:

git clone https://github.com/libv/libump.git
cd libump
aclocal; automake --add-missing; autoconf
./configure --prefix=/usr
make
checkinstall --pkgname=libump --pkgversion=1 make install

One option for the X-server is to use the sunxi-mali drivers. Since debian is statically linked to libdri2, that needs to be built from source as well:

apt-get install checkinstall build-essential pkg-config
git clone https://github.com/robclark/libdri2
cd libdri2
./autogen.sh
./configure --prefix=/usr
make
checkinstall --pkgname=libdri2 --pkgversion=1 make install

checkinstall is used to make a debian-package while installing. This makes it easy to uninstall later on. Just press enter on all checkinstall questions should be fine.

User space binary blob

Next up are the user-space mali drivers. They are part of the mali400_2.1-13_armhf.deb package inside the hardkernel packages. Debian jessie has different installation paths, so make it's best to use for example midnight commander to extract libMali.so and libUMP.so from the .deb and make sure your system ends up looking like:

cd /usr/lib/arm-linux-gnueabihf
ls -l *EGL* *GLES* *UMP* *Mali*
lrwxrwxrwx 1 root root     11 May 11 14:18 libEGL.so -> libEGL.so.1
lrwxrwxrwx 1 root root     13 May 11 14:18 libEGL.so.1 -> libEGL.so.1.4
lrwxrwxrwx 1 root root     10 May 11 14:32 libEGL.so.1.4 -> libMali.so
lrwxrwxrwx 1 root root     17 May 11 11:36 libGLESv1_CM.so -> libGLESv1_CM.so.1
lrwxrwxrwx 1 root root     19 May 11 11:36 libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1
lrwxrwxrwx 1 root root     10 May 11 14:32 libGLESv1_CM.so.1.1 -> libMali.so
lrwxrwxrwx 1 root root     14 May 11 14:30 libGLESv2.so -> libGLESv2.so.2
lrwxrwxrwx 1 root root     16 May 11 14:30 libGLESv2.so.2 -> libGLESv2.so.2.0
lrwxrwxrwx 1 root root     10 May 11 14:32 libGLESv2.so.2.0 -> libMali.so
-rw-r--r-- 1 root root 731492 Feb 22  2013 libMali.so
lrwxrwxrwx 1 root root     15 May 11 11:41 libUMP.so -> libUMP.so.3.0.0
lrwxrwxrwx 1 root root     15 May 11 11:41 libUMP.so.3 -> libUMP.so.3.0.0
-rw-r--r-- 1 root root  22232 Feb 22  2013 libUMP.so.3.0.0

X11 driver

Next, the x-server-module can be compiled. It should be possible to use either the sources from the official drivers or use the open source ones:

git clone https://github.com/ssvb/xf86-video-fbturbo
cd xf86-video-fbturbo
./autogen.sh
./configure --prefix=/usr
make
sudo checkinstall --pkgname=xf86-video-fbturbo --pkgversion=1 make install

After installation of the x-server, it needs to be configured using /etc/X11/xorg.conf. For kernel version 3.8, /dev/fb0 is the LCD output, /dev/fb1 is the HDMI output 1. For an Odroid-X2 with kernel 3.8.13, the following /etc/X11/xorg.conf gives output on the HDMI interface:

Section "Device"
        Identifier "Mali FBDEV"
        Driver          "fbturbo"  # The driver is recently renamed from sunxifb to this
        Option "fbdev" "/dev/fb1"
        Option "ShadowFB" "on"
EndSection

Section "Screen"
        Identifier      "Mali Screen"
        Device          "Mali FBDEV"
EndSection

If you use the official drivers from above, /etc/X11/xorg.conf should look like:

Section "Device"
        Identifier "Mali-Fbdev"
        Option  "fbdev"           "/dev/fb1"

        Driver  "mali"
        Option  "DRI2"            "true"
        Option  "DRI2_PAGE_FLIP"  "true"
        Option  "DRI2_WAIT_VSYNC" "true"
        Option "AccelMethod" "EXA"
        Option  "UMP_CACHED"      "true"
        Option  "UMP_LOCK"        "false"
EndSection


Finally, make sure the device rights are set properly:

cat /etc/udev/rules.d/10-hkl_mali.rules 
KERNEL=="mali",SUBSYSTEM=="misc",MODE="0777",GROUP="video"
KERNEL=="ump",SUBSYSTEM=="ump",MODE="0777",GROUP="video"


After this, a window manager can be installed, for example Debian-wheezy-gnome-6_Build_Notes.