X Display Manager for odroidu2

From odroid US
Jump to: navigation, search

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
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
./configure --prefix=/usr
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
./configure --prefix=/usr
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"

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

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"

Finally, make sure the device rights are set properly:

cat /etc/udev/rules.d/10-hkl_mali.rules 

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