As discussed in previous articles, I’ve been working on getting Kodi running on a BananaPi using the 3.4 kernel from the AllWinner BSP. An old hacked kernel, to quote the sunxi website

It is only useful when accelerated 3D graphics and multimedia support is strictly necessary.

Nevertheless, let’s see how to get Kodi (somewhat) running on this thing. Basically, download and compile all the things mentioned on the sunxi binary mali driver wiki page. When you use the udev rule to set the rights for the /dev/mali and /dev/ump devices, keep in mind you need to add yourself to the video group as well.

To run the standard kodi build from the repository, we need to run an X server, thus we need to have X installed. To have video acceleration (OpenGL ES) we need the fbturbo driver. Even though there is a version of this driver in the repository, this version is compiled without libump support, something required for acceleration. But when compiling and installing everything from the wiki, that should not pose a problem.

Furthermore, download and compile the experimental vdpau driver for sunxi. As mentioned on the sunxi wiki, this is rather insecure. If you’re don’t need hardware video decoding or video acceleration (OpenGLES), please use the mainline kernel.

When all is well, we can start kodi from X

$ xinit
..........wait for X to start and then in the xterm 
$ VDPAU_DRIVER=sunxi kodi

Now this should start kodi. If the screen remains black, please check the permissions for /dev/mali and /dev/ump, and verify the sunxi-mali libraries have been installed correctly. This might need repetition (run make install again). We’re not packaging things up, and adding files to the file system without the package manager to know. This could cause conflicts with the mesa package, also providing OpenGL stuff, causing kodi to load mesa in stead of mali.

Now, Kodi runs, but might crash when trying to play certain videos. I’m not entirely sure if this is codec or container related. In the crash log appears:

 ERROR: Unable to load, reason: cannot open shared object file: No such file or directory

So, I tried disabling omx support, and that solved this crash issue.
in ~/.kodi/userdata/guisettings.xml is an option “useomx”, set this to false. Note that you must remove the default attribute otherwise it will be reset.

After this modification it seems Kodi is able to play videos without crashing. Full HD 1080p content will not play smooth. I suppose this is because of the down sampling as I am using a “real” SD TV. I have to HD TV be see if it would play fine if it doesn’t have to downsample. Nevertheless, 720p and SD content seem to play smooth most of the time, even though I’ve seen some tearing.

But still… things aren’t running as perfect as they should. I haven’t been able to pinpoint this problem, but when I add a directory to the media library, and configure it as “TV Shows”, then kodi will crash as soon as I attempt to open that directory. If I configure no content type, everything runs fine. For audio applies, using the file browser works, but selecting a media-related view, such as Artists, crashes Kodi.

With all of this, kodi doesn’t run perfectly on a bananapi, however, the menu runs a lot smoother then it ran on the raspberry pi, especially when overlaying the menu when some video is still playing.

« »