XBMC for Raspberry Pi

This page describes how to install XBMC on a Raspberry Pi running Raspbian. You can either install packages on an existing Raspbian installation, or you can download a prebuilt image and flash it to an SD card.

Installing packages on an existing installation

I've published a Debian archive containing packages for Kodi/XBMC and some dependencies which it requires. This can be setup on an existing Raspbian installation (including the foundation image).

Installing

The easiest way to install the package is to add my archive to your system. To do this, store the following in /etc/apt/sources.list.d/mene.list:

deb http://archive.mene.za.net/raspbian wheezy contrib

and import the archive signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

Then update the package lists:

sudo apt-get update

You can then install it as you would with any other package, for example, with apt-get:

sudo apt-get install kodi

The user which you're going to run Kodi as needs to be a member of the following groups:

audio video input dialout plugdev tty

If the input group doesn't exist, you need to create it:

addgroup --system input

and setup some udev rules to grant it ownership of input devices (otherwise the keyboard won't work in Kodi), by placing the following in /etc/udev/rules.d/99-input.rules:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

The GPU needs at least 96M of RAM in order for XBMC to run. To configure this add or change this line in /boot/config.txt:

gpu_mem=128

You will need to reboot if you changed this value.

Running

To run XBMC, run kodi-standalone from a VT (i.e. not under X). XBMC accesses the display directly and not via Xorg.

If you want Kodi to automatically start when the system boots, edit /etc/default/kodi and change ENABLED to 1:

ENABLED=1

Run sudo service kodi start to test this.

Release history

  • 15.2-2: Isengard 15.2 release, and most PVR addons.
  • 14.2-1: Helix 14.2 release.
  • 14.1-1: Helix 14.1 release.
  • 14.0-1: Helix 14.0 release.
  • 13.1-2: Link to libshairplay for better AirPlay support.
  • 13.1-1: Gotham 13.1 release.
  • 12.3-1: Frodo 12.3 release.
  • 12.2-1: Frodo 12.2 release.
  • 12.1-1: Frodo 12.1 release. Requires newer libcec (also in my archive).
  • 12.0-1: Frodo 12.0 release. This build requires newer firmware than the raspberrypi.org archive or image contains. Either install the packages from the raspberrypi.org untested archive, the twolife archive or use rpi-update. (Not necessary as of 2013/02/11.)

Flashing an SD card with a prebuilt image

I've built an image containing a Raspbian system with the XBMC packages which you can download and flash to an SD card. You'll need a 1G SD card (which will be completely wiped).

Flashing

Decompress the image using unx:

% unxz raspbian-xbmc-20121029.img.xz

And then copy the image to the SD card device (make sure that you pick the correct device name!)

% sudo cp xbmc-20121029-1.img /dev/sdb

Customising

The image uses the same credentials as the foundation image, username "pi" and password "raspberry". You can use the raspi-config tool to expand the root filesystem, enable overclocking, and various other configuration tasks.

Updating

Both Raspbian and Kodi can be updated using normal Debian mechanisms such as apt-get:

# sudo apt-get update
# sudo apt-get dist-upgrade

Release history

Unstable versions

I've started building packages for the upcoming Jarvis release. These are in the new unstable section of the archive. To install these packages update your source list to look like this:

deb http://archive.mene.za.net/raspbian wheezy contrib unstable

Release history

  • 16.0~git20151213.a724f29-1: Jarvis 16.0 Beta 4
  • 15.2-2: Isengard 15.2 with packaging changes to support PVR addons, and most PVR addons.
  • 15.2-1: Isengard 15.2
  • 15.1-1: Isengard 15.1
  • 15.0-1: Isengard 15.0
  • 15.0~git20150702.9ff25f8-1: Isengard 15.0 RC 1.
  • 15.0~git20150501.d1a2c33-1: Isengard 15.0 Beta 1.
  • 14.2-1: Helix 14.2 release.
  • 14.1-1: Helix 14.1 release.
  • 14.0-1: Helix 14.0 release.
  • 14.0~git20141203.35b4f38-1: Helix 14.0 RC 2
  • 14.0~git20141130.ea20b83-1: Helix 14.0 RC 1
  • 14.0~git20141125.4465fbf-1: Helix 14.0 Beta 5
  • 14.0~git20141124.ec361ca-1: Helix 14.0 Beta 4
  • 14.0~git20141116.88a9a44-1: Helix 14.0 Beta 3
  • 14.0~git20141103.d6947be-1: Helix 14.0 Beta 1. This requires firmware as of 2014/10/06 and libcec 2.2.0 (both included in the archive). There are also builds for Jessie but I haven't tested them. PVR addons are also updated.
  • 14.0~git20141002.d2a4ee9-1: Helix 14.0 Alpha 4

Trackback URL for this post:

http://michael.gorven.za.net/trackback/1498

Kodi bootscreen

Hi there,

i followed the instructions, but when i start kodi, there is just a blue bootscreen and it freeze.

How does i fix this?

Custom AMC image

Any chance of a build with filebot preinstalled and a headless torrent client for a fully automated media centre experience? Great work keep it up!

Raspbian Pre built image

Hi

I'm looking to flash an SD card with a Prebuilt image to install on an RPi 2, I may just be missing it but I don't see the link to download. Thanks.

Andrew

Found it! Sorry my bad -

Found it! Sorry my bad - eyesight isn't the greatest and missed the links in the "release history"

Next silly question, how do I

Next silly question, how do I get out of Kodi and boot the raspbian gui to set up WIFI ? this preinstalled image would be perfect other than the fact that I have to run a cable.

I was trying to make Kodi run on Raspbian, had it working then it stopped so decided to try this instead.

My wifi adapter is raspbian compatible, and works out the box (again I have had it working fine) but I guess I am still learning the joys of linux command line and am a bit stuck.

Andrew

Select the power icon in Kodi

Select the power icon in Kodi and choose Exit; you should then get a console with a login prompt.

Thanks Michael ok I've done

Thanks Michael

ok I've done that.

I get

Kodi login: Password:

if I do pi and raspberry as my username and password here I login as pi@kodi:

which is great but I cant run startx from here I need the pi@raspberrypi prompt obviously...

so where to from here ?

sorry about this :)

WiFi

Hi Michael,

I wrote about Jessie 15.2-2 a few days ago. Would I be right in thinking you use an Ethernet connection rather than a WiFi connection for much of your Kodi viewing? With Ethernet your 15.2-2 works very well but not so well with WiFi. I have at least 3 different WiFi adapters, some supported by Raspbian and some not. I mainly use model B Pi's with the low powered 2 USB ports but even with a powered hub the WiFi drops out a lot. I'm currently watching Kodi with one of my WiFi adapters and I'll see how it goes. Thank you for all your excellent work with Kodi over the years.

Costas

I use wifi on my production

I use wifi on my production setup without issues, which runs 15.2 on Wheezy. I'd be surprised if there's a difference on Jessie since the kernel is the same (although the chipset firmware might be different).

Kodi 16 PVR Addons not working

Hi

I have tested Kodi 16 and some PVR addons (IPTV Simple and TVHeadend/HTS) in the unstable repo, and I can confirm that they aren't working. Changing manually the variables @PLATFORM@ and @LIBRARY_FILENAME@ at /usr/share/kodi/addons/$pvr/addon.xml makes them work. All the PVR addons seems to suffer from this, so maybe you need to change or define these variables at compile time.

Thanks

Thanks for pointing this out,

Thanks for pointing this out, that file isn't being interpolated correctly.

I just uploaded new packages

I just uploaded new packages which should fix this.

Jessie Kodi 15.2.2

Hi Michael,

I downloaded version 15.2.2 for Jessie today and it crashes with:

pi@kodi:~$ sudo kodi-standalone [sudo] password for pi: /usr/lib/kodi/kodi.bin: error while loading shared libraries: /usr/lib/arm-linux -gnueabihf/libpython2.7.so.1.0: invalid ELF header /usr/lib/kodi/kodi.bin: error while loading shared libraries: /usr/lib/arm-linux -gnueabihf/libpython2.7.so.1.0: invalid ELF header /usr/lib/kodi/kodi.bin: error while loading shared libraries: /usr/lib/arm-linux -gnueabihf/libpython2.7.so.1.0: invalid ELF header /usr/bin/kodi --standalone has exited uncleanly 3 times in the last 1 seconds. Something is probably wrong

Any ideas what the problem is?

is this issue solved?

I'm afraid to upgrade and be left with a broken setup...

ok works fine

I just went ahead anyway after a backup and everything works for me (I don't use PVR)

PVR addons for 15.2, new images, 16.0 beta

I've finally had time to update the packaging for the new PVR addon repo structure, so there are now packages for most PVR addons compatible with 15.2. I've therefore promoted 15.2 to contrib, and built new images for both Wheezy and Jessie.

unstable now has packages for 16.0 beta 4, but only for Jessie for now (and I may actually drop Wheezy support). I'm still working on PVR addons for 16.0.

Thanks you

Thanks a lot for your Update. I have tried different ways to update wheezy to 15.2 but always failed. Now it was just a simple apt-get Update / upgrade and it works like a charm. Thanks again for your efforts.

Thx a lot

Great improvements

Thank you very much, Michael!

Thank you very much, Michael!

Thank you very much!

Thank you very much!

THX for your great work

THX for your great work :)

Björn
www.opendisplaycase.com

Kodi 16 beta 4

Hi,

Kodi 16 is almost out, today a beta 4 was released. Can you please provide a test version of Kodi 16 ? Thanks

Kodi 15.2 for Wheezy (Download)

Go here if you want to install the latest version of kodi http://tiny.cc/x2b45x

Kodi 15.2 wheezy

Hi Michael, do you have any idea when Kodi 15.2 will be available in the stable section for wheezy? I would like to update from 14.2 to 15.2.

Thanks a lot

Jessie

Hey Michael, any plans on moving the project to jessie?

You can already install

You can already install it...

deb http://archive.mene.za.net/raspbian jessie contrib

sid version

Hi Michael,

the binaries are not installable on sid (deb http://archive.raspbian.org/raspbian testing main contrib non-free) due to some dependency issues (libnettle, libhogweed, ...).

Would you be willing to provide a version?

Thanks in advance!

Gamepad Support

A lot of people use kodi within retropie and gamepad support would be appreciated, as far as I understand it it only requires these two build flags:

--enable-joystick -- enable-sdl

Could you enable gamepad support in your builds?

Thanks

web service does not start

I'm running raspbian wheezy release 7.8 I installed kodi (stable) as above. kodi starts OK, but the web service does not start.

I've modified guisettings.xml, but no success yet.

Any ideas?

PS: My goal is to control kodi via an android app. Yatse, for example, won't connect to kodi: is that because the kodi web service isn't running?

question about rpi 1 and his armv6hf

Hello Michael,

Firstly thank you to provide the rpi community the kodi package you built.

I just would like to ask you if there is a risk to run kodi packages on the raspberry pi 1 (armv6hf) as the kodi.bin on your package is built for the armv7 arch (VFPv3/NEONv1 can not be used on armv6):

readelf -A /usr/lib/kodi/kodi.bin
Section d'Attribut: aeabi Attributs du fichier Tag_CPU_name: "7-A" Tag_CPU_arch: v7 Tag_CPU_arch_profile: Application Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-2 Tag_FP_arch: VFPv3 Tag_Advanced_SIMD_arch: NEONv1 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-octet Tag_ABI_enum_size: int Tag_ABI_HardFP_use: SP and DP Tag_ABI_VFP_args: VFP registers Tag_DIV_use: Not allowed

A simple asm code dump is indicating a lot of undefined instructions. command: objdump -D /usr/lib/kodi/kodi.bin | grep -i UNDEFINED

It is built for arm7hf, not

It is built for arm7hf, not for arm6hf, which leaves undefined instructions. There's no risk at all. It's not possible.

Reply to comment | Michael Gorven - cocooncrash

Great blog you have got here.. It's hard to find excellent writing like yours nowadays.
I really appreciate individuals like you!
Take care!!

PVR addons still not working

Hi Michael

I noticed that you updated Kodi today and pvr-addons, thanks. But your "updated" PVR Addons still dont work with Kodi 15. Now they are built from here: https ://github.com/kodi-pvr

For example, IPTV Simple for Isengard version is 1.11.5 while yours is 1.9.12. Hope you can update them in the future again.

Thanks

Yeah, the repos for the PVR

Yeah, the repos for the PVR addons have been reorganised, and the way they are built has changed too. It's going to require a fair amount of work to get them building again, and I unfortunately don't have much time at the moment so it's unlikely to happen soon.

Same problem forme with

Same problem forme with IPTV: PVR - Add-on 'PVR IPTV Simple Client' is using an incompatible API version. XBMC minimum API version = '1.9.6 ', add-on API version '1.9.2'

Same problem for kodi-pvr-vdr-vnsi

Please update PVR addons to be compatible with API 1.9.6, or please provide kodi-dev packages to allow people upgrading themselves.

Update Kodi 14.2 to 15.1

how can I upgrade kodi 14.2 to 15.1

Just wait until 15.1 enters

Just wait until 15.1 enters unstable or contrib.

You can install 15.1 from

You can install 15.1 from unstable by now. Big thanks to Michael!

Kodi 15.0 Isengard

Hi, First thanks for your work ;)

Since Kodi 15 is out I tryed to get it on my Pi.

I've added Mene.list to my source list but when I uninstall Kodi 14.2 (remove kodi, kodi.bin and .kodi pref directory) and I try to re-install it, I only have the "official" raspberry Kodi 14.2. If I install Kodi 15 in RC version, manually, apt-get doesn't propose to install your 15.0 stable version.

To sum up since kodi has an offical package in Raspbian, I don't have acces to your up to date kodi.

How can I fix this please ? Edit the raspbian source.lit file ? Set up some priority source ?

Thanks for any help

Are you using unstable?

15.0 is only in the unstable repo. Are you using this in your source.list?

deb http://archive.mene.za.net/raspbian wheezy contrib unstable

My feeling is that you are using the following:

deb http://archive.mene.za.net/raspbian wheezy contrib

Currently unstable is 15.0

Currently unstable is 15.0 RC1, not final

Editing...

I forgot to mention that if you are using Jessie, you need to replace wheezy with jessie:

deb http://archive.mene.za.net/raspbian jessie contrib unstable

still no 15.0 final here

Hi,

also Michael's repository currently has 14.2 in contrib (stable) and one of the 15.0 release candidates (15.0 RC1 I guess) in unstable.

So the fixes are to either pull the files from incoming (currently 15.0 final if I'm not mistaken) or to wait. Or compile Kodi on your own of course ;-)

Kodi 15.1

Hi, Kodi 15.1 is out, did you manage to built it for jessie ?

thanks :)

No Kodi 15.1 yet

Not yet, you might want to monitor the incoming and unstable directories for updates. Michael seems to be busy these days... unfortunately not with building Kodi ;-)

Status in unstable?

Hi Michael,

I saw that you copied some of the 15.0 final files from incoming to unstable already but not all of them yet. So unstable still installs 15.0 RC1 I guess.

Did something go wrong while copying the files to unstable or did you set up the current situation on purpose? Any issues blocking you from moving final packages to unstable?

Thanks Markus

Kodi on Testing

I have updated my Raspberry from Jessie to Testing. Is there a way to install your kodi Michael?

Thanks.

Back to Jessie

I downgraded back to Jessie. It was impossible for me to make Kodi work from the official repository.

I have the same problem, are

I have the same problem, are you planning to have a repository for testing?