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.1-1: Jarvis 16.1
  • 16.0-1: Jarvis 16.0
  • 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

Gotham feedback

Hi,

Thanks for compiling Gotham package!

First impression: it really is faster so I am happy with that :)

The only thing is while upgrading it seems to have overwritten the firmware provided by rpi-update and they are on kernel version 3.10.23. Is there a way to use that newer kernel with xbmc package you have provided? When I run rpi-update it says I am already using latest firmware but uname -a shows I am still on 2.6.11+? Cheers.

The firmware was installed

The firmware was installed via packages (raspberrypi-bootloader, libraspberrypi0, libraspberrypi-bin). If you want to manage your firmware using rpi-update you should probably remove these packages and then exclusively use rpi-update.

rpi-update uses a file /boot/.firmware_revision to record the installed firmware version. Deleting this file should cause it to reinstall the firmware. (You may also need to remove the git repo in /root/.rpi-firmware).

I'm currently looking at

I'm currently looking at compiling the latest Gotham alpha. There are some updates which need to be made, but hopefully I'll have something out in the next few weeks.

subtitles in Gotham Alpha

Just checked your latest build. Looks good, feels faster than 12.2, Nice job, thanks! However, due to the changes Gotham makes in the way subtitles are handled, your build is not suitable for daily use (not for me :-). An update is released where the subtitles should work. For more information read this thread: http://forum.xbmc.org/showthread.php?tid=180265

Hope you manage to find some time creating a new build of Gotham. Thanks in advance!

I'm planning to do a new

I'm planning to do a new build when alpha 11 (or beta 1) comes out, which should be soon.

Great, thanks! (And a happy

Great, thanks! (And a happy New Year!)

That would be appreciated :)

That would be appreciated :)

Failed to fetch

I have previously had this XBMC build running great, but as of today I get nothing but a black screen when launching it. In addition, when I run sudo apt-get update I get this error:

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.mene.za.net_raspbian_dists_wheezy_contrib_binary-armhf_Packages rename failed, Is a directory (/var/lib/apt/lists/partial/archive.mene.za.net_raspbian_dists_wheezy_contrib_binary-armhf_Packages.decomp -> /var/lib/apt/lists/archive.mene.za.net_raspbian_dists_wheezy_contrib_binary-armhf_Packages).

E: Some index files failed to download. They have been ignored, or old ones used instead.

I have deb http://archive.mene.za.net/raspbian wheezy contrib in both sources.list and mene.list, and the only time I can run apt-get update successfully is when the line is commented out in both files. Any ideas?

Command

What difference in launching with xbmc and xbmc --standalone? I have found no difference so far.

Cant install - package not found

Hi there,

I'm quite new to this, but I'm 99% sure i've done everything correctly, and it simply isn't working for me :S

Once I update mene.list with deb http://archive.mene.za.net/raspbian wheezy contrib, I've added the key which is successful, but on doing sudo apt-get update it gives 'err http://archive.mene.za.net wheezy/contrib armhf packages 404 not found"

as well as "W: failed to fetch http:archive.mene.za.net/raspian/dists/wheezy/contrib/binary-armhf/packages 404 not found"

I can't work it out at all. Any help is really welcome!!

Sounds like a connection

Sounds like a connection problem. Go google and site called 'down gor everyone or just me.'in the blank space type in 'http://archive.mene.za.net/raspbian' to check if it appears to be on for you. If not you have have a connection problem to the server, try change your point of internet access (changing IP), if yes then you have something else which might be solved by the archive owner. By all means, do this simple test first. BTW it appears to be on to me!

You misspelt "raspbian" as

You misspelt "raspbian" as "raspian".

Yeah...

I noticed about 5 minutes after. Damn, I am retarded hahaha. Works like a dream now!!

Run Error

run xbmc-standalone

show error as below

symbol loopup error: /usr/lib/xbmc.bin: undefined symbol: vc_tv_get_display_state

You probably have old

You probably have old firmware. Run apt-get update and apt-get dist-upgrade to upgrade your system.

Doesn't work :(

I cd to /etc/apt/sources.list.d/mene.list and then ran the command, deb http://archive.mene.za.net/raspbian wheezy contrib but it just keeps on telling me "-bash: deb: command not found" I have updated dist and system but it still doesn't work. pls help. I really want this to work. Iv't got my pi running as a file server. If I counld run XBMC as well, it will be awesome! At the moment I have to swap between 2 cards to use XBMC on OpenElec and then when I'm done, swap back to the card to run my file server, and that is a pain.

Read carefully instructions

I have just installed. Just read cerefully and follow instructions. Add repository to file.

In my case i was able to run cec with "sudo apt-get install libcec*"

I wonder when can we expect new version in repository? XBMC 13 will come soon, hope it will be available to download.

apt basics

In my opinion you have to add a line to the apt-sources.list: deb http://archive.mene.za.net/raspbian wheezy contrib to a file. I am a debian user for over 15 years now, but i am new to raspbian, but the way is the same, use an editor and insert the deb archive.

this is correct

make sure you edit /etc/apt/sources.list and add deb http://archive.mene.za.net/raspbian wheezy contrib to it

I'm stuck

I'm stuck at the install (as weird as it sounds) this is what i'm getting

"Some packages could not be installed. This may mean that you have requested and impossible situation or if you are usuing the unstable distribution that some required packages have not yet been created or been moved out of incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: xbmc : Depends: xbmc-bin(>= 2:11.0~git20120510.82388d5- 1) but it is not installable.

   Depends: xbmc-bin (< 2:11.0~git20120510.82388d5- 1.1~) but it is not installable

E: unable to correct problems, you have held broken packages."

some one please help

Debian packaging and version control

Debian is quite responsive. You can't install xbmc because it requires a xbmc-binary which version does not match. So you should have a peek in your apt-sources list. Please keep in mind that you need the appropriate version of xbmc matching your debian system (stable, testing, sid) and everything will work. If you add an additional archive which does not match the release you are running on your device you get those messages. Kind regards from Germany, SMut

Pingback

[...] Enfin installer XBMC en suivant ce tutoriel, a noter que j’ai remplacer l’utilisateur « xbmc » par [...]

total newb

as the tile denotes i have never done any of this before, i do not know ow to store the archive in the etc/...... file route tat route does't even seem to exist on my NOOB pi, i proceeded any way and got to the need to belong to groups portion and lost my way i tried to add group: "pi@raspberrypi ~ $ addgroup --system input addgroup: Only root may add a user or group to the system." while reading some of your help posts i see you have to add a user to the XBMC to use the program, I haven't done that and don't know how, i looked again for the etc/.. dir and couldn't find it as well as the XBCM folder that i thought i would have as i "installed" it, but neither have appeared on my pi "drive"

-Frustrated Newb Groovergabe@yahoo.ca

Debian newbies and rapsberry pi devices...

So, maybe you should use a prepared 'pisces' image to get your system easily up and running. http://www.raspbian.org/PiscesImages has XMBC already setup and it runs like a charm, just use dd on a Linux machine or the Windows tool as described to wipe your primary installation off your SD card and retry. Plug it in your Raspberry PI, connect to power and you should be done.

Pingback

[...] Source: http://michael.gorven.za.net/raspberrypi/xbmc October 15th, 2013 | Tags: electronics, raspberry pi | Category: Electronics, News [...]

Thank you :-)

This was incredibly helpful. Thank you very much indeed. :-)

David

Ontario, Canada

It needs avahi-daemon

I think you need to add an xbmc-avahi that depends on xbmc and avahi-daemon.

If avahi-daemon isn't installed then xbmc won't be detected by an iPad.

I installed avahi-daemon,,

I installed avahi-daemon,, ipad can detect pi,,but when airplay,got error

XBMC "Gotham" Updates?

With the news of the major revision over on the raspberry Pi blog http://www.raspberrypi.org/archives/4986 I was wondering when you were planning to update? I would also be interested in an updated guide on building xbmc since then one on the raspbian site is woefully out of data

I did see that announcement;

I did see that announcement; however, I'm going to wait for those changes to be integrated into the XBMC mainline before packaging it since I don't have the time to deal with non-mainline changes at the moment. You can find some basic pointers for building your own packages in this blog post, and my packaging is available in this Bazaar repo.

How to create "my own .deb" compatible with your repository

It has been a while since last time you make a deb package of xbmc. I know that there isnt a new stable version since then, but now there is many speed improvements in xbmc if using a compiled version from git. Can you make a new deb compiled from git and put it in "testing" for example ?

Or at least explain how can i make "my own xbmc deb" in a way that, when you update your repository, it doenst break the update system (sudo apt-get update && sudo apt-get upgrade).

Thank you in advance and for your work.

This blog post should point

This blog post should point you in the right direction (you'll need to be familiar with Debian packaging), and you can find my packaging in this Bazaar repo.

[...] trunkate comments

How come several comments are trunkate? Is it because I'm not login to the blog? Where is the subscribe form?

Thank

Pingback

[...] from severe NIH (Not Invented Here) symptoms. But this time, I actually tried to install XBMC from Michael Gorven’s Debian package. But what do I [...]

Pingback

[...] la télécommande en HDMI CEC). C’est pourquoi, je me suis intéressé à la solution de Michael Gorven qui à l’avantage de pouvoir mettre à jour le package via les commandes [...]

CEC, ça sert à quoi?

Tu dois a priori utiliser un cable HDMI supportant V1.4 Ensuite ton téléviseur doit supporter le CEC comme bravia link chez Sony. Avec cette combinaison, il te sera possible de controler XBMC à partir de ta télécommande IR de téléviseur. Cette dernière transmettra via le cable HDMI la commande au serveur XBMC. Personnellement je roule XBMC sur un Raspberry PI à 35$ et ma télécommande Sony opère à merveille pour l'ensemble des fonctions sans que j'ai eu à me procurer une télécommande USB ou Bluetooth.

XBMC Display Access

Hi Guys,

thanks a lot for the 5* Tutorial! After the installation i have only one more problem! Is there any possibility to start XBMC in "the same Window" (Xorg) and not directly at the display? Which files have to be edited? Thanks a lot! Steve

gpio remote

hi mike can you please advise on how to set up gpio remote up on your installation?. It is available on raspbmc and openelec I have installed lirc and setup the config file for my remote but the remote although it is recognised by the raspberry pi, it is not recognised by xbmc frodo 12.2

I'm afraid I haven't set this

I'm afraid I haven't set this up, nor have the equipment to do so.

PVR Addons

Hi , follow your guide all works great.Only issue I can't enable PVR. I need to install Tvheadend client can you help me ? many thanks

Pingback

[...] Debian Linux distro, Raspbian, for my OS because it offered the most flexibility. Using Michael Gorven’s packages and instructions, I was able to get XBMC, a great media player designed for the ten-foot user interface, loaded and [...]

Pingback

[...] XBMC for Raspberry Pi | Michael Gorven - cocooncrash [...]

Thanks! Everything works

Thanks! Everything works great.

Boot and Close

Firstly this is a great post and worked first time.I have 2 small issues that i can't seem to get working. 1. I can't get the Pi to startup xbmc on boot. It just boots to the raspbian GUI. 2. When i choose exit xbmc this shuts everything down, i thought this would close xbmc and take me back to the gui.

I have set the ENABLED=1.in xbmc. Any help would be great.

=-Paddy

did you change the default

did you change the default user here: /etc/default/xbmc ? that's what I need and it's running fine on boot.

Working..

Got it working thanks. I added to the file the default user. Works a treat. Thanks

compilation option

Hello, could you please indicates me what are options you used to build your xbmc packages? I used your prebuild pkgs and xbmc is running correctly. I builded the frodo release from source, with the official raspbian tutorial for xbmc... but i have no sound and x264 hw decoding is very slow... (9 fps). Below are the configuration option i used for my own compilation. Probably somes options are missing. Could you please help me? thank you.

./configure --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --with-platform=raspberry-pi --localstatedir=/var/lib --disable-gl -enable-gles --disable-x11 --disable-sdl --enable-ccache --enable-optimizations --enable-external-libraries --disable-goom --disable-hal --disable-pulse --disable-vaapi --disable-vdpau --disable-xrandr --disable-airplay --disable-alsa --enable-avahi --disable-libbluray --disable-dvdcss --disable-debug --disable-joystick --enable-mid --disable-nfs --disable-profiling --disable-projectm --enable-rsxs --enable-rtmp --disable-vaapi --disable-external-ffmpeg --disable-optical-drive

./configure

./configure --host=arm-linux-gnueabihf --build=arm-linux-gnueabihf --prefix=/usr --docdir=/usr/share/doc/xbmc --disable-debug --enable-optimizations --disable-gl --enable-gles --enable-vdpau --disable-vdadecoder --disable-vtbdecoder --disable-openmax --disable-tegra --disable-profiling --enable-joystick --enable-xrandr --disable-ccache --enable-pulse --enable-rtmp --enable-ffmpeg-libvorbis --disable-mid --enable-hal --enable-avahi --disable-asap-codec --enable-webserver --enable-optical-drive --enable-texturepacker --enable-nfs --enable-libcec --disable-afpclient --enable-airtunes --enable-external-libraries --disable-dvdcss --disable-non-free --disable-crystalhd --with-platform=raspberry-pi --enable-player=omxplayer --disable-x11 --disable-sdl --disable-vaapi --disable-vdpau --disable-xrandr --disable-joystick --enable-airplay --enable-mid --enable-rsxs --enable-afpclient --disable-external-ffmpeg --enable-non-free --enable-dvdcss --enable-ccache --enable-alsa --enable-libusb --enable-libbluray CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -O3" CXXFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -O3" LDFLAGS="-L/opt/vc/lib" TEXTUREPACKER_NATIVE_ROOT="/usr"

--disable-joystick

hi, I just saw you're using --enable-joystick AND --disable-joystick at the same time

could you please make a build with just --enable-joystick ?

Joystick is intentionally

Joystick is intentionally disabled because it requires SDL, and I couldn't get it to build with that.