XBMC packages for Raspberry Pi running Raspbian

I recently got a Raspberry Pi, which is an ARM based device which runs Linux. My goal is to use this as my HTPC running XBMC, so that I can move the fileserver out the lounge.

Edit: I've moved the latest information and updates about these packages to this page.

Building

I installed Raspbian on my RPi, which is basically a rebuild of Debian Wheezy specifically for the RPi (targeting the ARMv6 architecture with hard float). I found various instructions on how to build XBMC for Raspbian, but none of them were in the form of deb packages, and installing software without packages just makes me queezy. So I went off and built it myself.

Since the RPi is relatively low powered, I built the package on my laptop using qemu-user, which emulates binaries with a different architecture. I based the packaging on the XBMC package in Wheezy, and the source is from the xbmc-rbp branch on GitHub. I made the modifications to the source as per this forum post and added an initscript so that it can automatically start at bootup.

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 then import the archive signing key:

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

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

sudo apt-get install xbmc

(If you don't want to configure my archive you can download the packages manually, but you'll have to deal with all the dependencies. Note that it requires a newer libcec package which is also in my archive.)

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

audio video input dialout plugdev

Running

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

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

ENABLED=1

You also need to set the user which XBMC should run as (the xbmc user is not automatically created at the moment). Run sudo service xbmc start to test this.

Configuration

The following settings in advancedsettings.xml decreases the CPU usage while showing the UI. Disabling the RSS feeds also helps with this.

<advancedsettings>
    <gui>
        <algorithmdirtyregions>3</algorithmdirtyregions>
        <nofliptimeout>0</nofliptimeout>
    </gui>
</advancedsettings>

Rebuilding

If you want to rebuild this package with a different source (e.g. a later Git revision), you need to prepare the source by running ./bootstrap before creating the orig.tar.gz. You obviously need all the build dependencies (which should be listed in the packaging), as well as the VideoCoreIV libraries in /opt. You probably want to set DEB_BUILD_OPTIONS=nocheck parallel=4 to disable the tests (they failed to build for me), and speed up the build by using more than one core. You can find the packaging in my archive or my Bazaar repository.

Trackback URL for this post:

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

Pingback

[...] Read instructions HERE [...]

Michael, I have successfully

Michael,

I have successfully installed this on a Rpi B+ Jessie system running the latest V7 kernel. There is still an issue exiting out of Kodi and back to the shell. The first time it is run, it exits fine. Subsequently it does not exit cleanly and leaves Kodi running so we get a locked blank screen. To recover you need to ssh in and kill the top pf the Kodi tree process using top or htop. Once the kodi processes are killed it then returns to the shell on tty1.

Cheers Stephen

Hi Michael, Will you be

Hi Michael,

Will you be updating your Kodi verison to the release version 14.1 and compiling for debain Jessie and Rpi 2?

Cheers Spart

Very good post. I'm going

Very good post. I'm going through some of these issues as
well..

14.1 is available for Jessie

14.1 is available for Jessie and Wheezy. The packages and the latest SD card image should work on Rpi 2, but aren't optimised for it.

But will it be optimized for

But will it be optimized for the RPi2?!

I have succesfully installed this with some changes of path/name (xbmc=>kodi) but I think the Broadcom chipset isn't updated, but the hardware encoded video does work, and the multi processor too! (seeing CPU0 to CPU3!)

well, ican work with this already now (on the RPi2).

Thanks for the very good description/instruction given!

I'm not sure where you are

I'm not sure where you are getting your information, but great
topic. I needs to spend some time learning much more or understanding
more. Thanks for wonderful info I was looking for this information for my mission.

Why users still use to read

Why users still use to read news papers when in this technological globe everything is available on web?

Hey there! This is my first

Hey there! This is my first comment here so I just wanted to give
a quick shout out and tell you I truly enjoy
reading through your posts. Can you recommend any other blogs/websites/forums that deal with the same topics?
Thanks a ton!

Pingback

[...] I have used Raspbian which is general purpose Debian based distro and added XBMC to it with this guide – http://michael.gorven.za.net/blog/2012/08/06/xbmc-packages-raspberry-pi-running-raspbian [...]

Hi, Thank you for writing

Hi,

Thank you for writing this up. I have access to arm build environment and would like to build some other pacakges for my Raspberry Pi.

I wanted to check with you on if and whether we need to supply any extra / additional build paramereters that could be specifically for the Pi ?

My arm build environment is Debian.

It is not my first time to

It is not my first time to visit this web page, i am visiting this web
page dailly and get good information from here daily.

Hey! Quick question that's

Hey! Quick question that's entirely off topic. Do you know how to make your site mobile
friendly? My weblog looks weird when browsing from my iphone
4. I'm trying to find a theme or plugin that might be able to resolve this problem.
If you have any suggestions, please share. Thanks!

I got it to build but when I

I got it to build but when I installed the package, it failed stating "Illegal Instruction". Looking at the Debian wiki, it says that Debian armhf defaults to hard float. It does have armel, that does soft float. RPI on the other hand is in between.

So my question to you is on how do I build any usual debian source package on a Debian armhf box, that can work on RPI ?

We are a gaggle of volunteers

We are a gaggle of volunteers and opening a brand new scheme
in our community. Your site provided us with useful info to
work on. You've done a formidable activity and our
whole neighborhood will be thankful to you.

I just followed the

I just followed the instructions for adding the xbmc package to my PI:

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

and then import the archive signing key:

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

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

sudo apt-get install xbmc

I got the following error:

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory

Please advise, thanks.

Additional info: There

Additional info: There appears to be a seg fault...

inline: Install these packages without verification [y/N]? y perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Extracting templates from packages: 100% Preconfiguring packages ... (Reading database ... 69776 files and directories currently installed.) Preparing to replace libc6:armhf 2.13-38+rpi2 (using .../libc6_2.18-4_armhf.deb) ... Checking for services that may need to be restarted... Checking init scripts... Unpacking replacement libc6:armhf ... dpkg: warning: subprocess old post-removal script was killed by signal (Segmentation fault) dpkg: trying script from the new package instead ... dpkg: error processing /var/cache/apt/archives/libc6_2.18-4_armhf.deb (--unpack): subprocess new post-removal script was killed by signal (Segmentation fault) dpkg: error while cleaning up: subprocess installed pre-installation script was killed by signal (Segmentation fault) Errors were encountered while processing: /var/cache/apt/archives/libc6_2.18-4_armhf.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

You might have to configure

You might have to configure your locales with sudo dpkg-reconfigure locales. Once you're at it, you might also like to configure your timezone: sudo dpkg-reconfigure tzdata. Follow the on-screen instructions.

Once you've done this, run sudo apt-get update, then run sudo apt-get install xbmc and follow the rest of the tutorial.

Hope it helps,

Euler

Hi, I run a raspberry pi

Hi,

I run a raspberry pi operated via SSH and connected via HDMI to a TV screen using the latest versions of raspbian and your XBMC. When I start xbmc-standalone I get the followig :

Login: pi Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Jan 15 13:15:28 2014 from 192.168.0.22 pi@raspberrypi ~ $ xbmc-standalone terminate called after throwing an instance of 'dbiplus::DbErrors' Aborted (core dumped) Crash report available at /home/pi/xbmc_crashlog-20140115_132202.log terminate called after throwing an instance of 'dbiplus::DbErrors' Aborted (core dumped) Crash report available at /home/pi/xbmc_crashlog-20140115_132223.log

pi@raspberrypi ~ $ grep -i "error" /home/pi/xbmc_crashlog-20140115_132223.log 13:22:18 T:3036353248 ERROR: Error: Requested setting (audiooutput.guisoundmode) was not found. It must be case-sensitive 13:22:22 T:3025560592 ERROR: CecLogMessage - failed to release the previous LA 13:22:22 T:3025560592 ERROR: CecLogMessage - could not open a connection (try 1) 13:22:22 T:3036353248 ERROR: SQL: SQL error or missing database pi@raspberrypi ~ $

do you have any ideas how I can fix this ?

Thanks

Werner

Zufaellig bin ich auf eurem

Zufaellig bin ich auf eurem Portal gelandet und
muss sagen, dass mir diese vom Design und den Informationen richtig gut gefaellt.

Under 'Installing', it was

Under 'Installing', it was necessary to do

sudo apt-get update sudo apt-get upgrade

before sudo apt-get install xbmc, otherwise there are unmet dependencies.

Pingback

[...] idea of it. So I set out to build it myself with some more stuff thrown in. Minimal LXDE install XBMC (Frodo 12.2) RetroPie (boots into EmulationStation) Quake III Arena (just add pak files) You boot [...]

I loved as much as you will

I loved as much as you will receive carried out
right here. The sketch is attractive, your authored subject matter stylish.
nonetheless, you command get got an shakiness over that you wish be delivering
the following. unwell unquestionably come more formerly again since exactly
the same nearly very often inside case you shield this hike.

Howdy I am so thrilled I

Howdy I am so thrilled I found your web site, I really found you by mistake, while I was browsing on Google for something else, Anyhow I am here now and would just like to say thanks for a incredible post and a all round entertaining blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the excellent b.

How to turn on rss on the

How to turn on rss on the main screen?

I'm having the following

I'm having the following 'bugs' with my Raspbian/XBMC setup.

1) I got this fixed but I don't know how. The first time I tried using a mp3 file; it would not work. It is only after I did some other stuff such as installing other programs such as mpg123 that it worked through XBMC.

1.1) I do not know what I did to fix it because my testing was done through the terminal window. Audio through HDMI seems to only work through XBMC and not the terminal. Audio from the analog port works fine through the terminal and I did not test to make sure it works through XBMC (although I'm sure it does).

2) The program had a habit of freezing at random but was fixed by lowering the overclocking value. It was changed from Turbo to Medium.

3) The XBMC program is treating the keyboard as a giant remote control rather than a keyboard. This is not a problem until I get to a 'search' box. I have to use the arrow keys and hit enter for each letter rather than just type in what I want. The spacebar works though as it normally does.

4) The XBMC program crashes most of the time, but not all of the time, when I try to exit the program. It also sometimes crashes when I select the shutdown option instead.

Hi, Thank you for your XBMC

Hi,

Thank you for your XBMC package.

You wrote that the user which is going to run XBMC needs to be a member of the following groups:

audio video input dialout plugdev

but it seems (after installing the package) that i don't have any "input" group :

# cat /etc/group | grep input

returns nothing.

does it seems to be a problem ?

Thanks

mgorven, something went

mgorven, something went really wrong with the latest version...

the screen resolution (in standalone mode) is broken. XBMC renders itself out of the screen resolution. Also, none of the airplay stuff works.

It is simply unusable.

How canI go back to the previous version?

Thanks

The resolution problem is

The resolution problem is caused by this issue. To fix it edit userdata/guisettings.xml and remove the contents of the <resolutions> element. I can't test the airplay functionality unfortunately :-/

If you want to revert to the previous version grab the 20120804 debs from the archive pool and manually install them with dpkg -i.

Great delivery. Outstanding

Great delivery. Outstanding arguments. Keep up the great work.

It's really a great and

It's really a great and useful piece of info.
I am satisfied that you simply shared this useful information with us.

Please stay us up to date like this. Thanks for
sharing.

Thanks mgorven! Re airplay I

Thanks mgorven!

Re airplay I think the issue is libshairport. In the build when trying to play over airtunes the following error comes up: 22:30:20 T:1101959168 DEBUG: AIRTUNES: Failed to create ipv6 socket. Trying ipv4 22:30:20 T:1101959168 DEBUG: AIRTUNES: Error setting up server socket on port 36666, try specifying a different port

Googling solution brought up this: http://forum.xbmc.org/showthread.php?tid=138106&pid=1207877

So basically, libshairport has to be updated with this patch: https://github.com/Memphiz/xbmc/commit/f5770cd1811a4ee0096010eca6bb0a9a6...

this should solve the problem

I've published a new build of

I've published a new build of libshairport to my archive which contains that patch. I tried to test it using PulseAudio as a sender, but couldn't get it working (display shows "Streaming..." but no sound).

Thanks, streaming music now

Thanks, streaming music now works!! Re pulseaudio, I did not have much success with this neither, however streaming from Apple products works fine!

There is one more issue that I'm facing now - CPU usage. I modified advancedsettings.xml, but xbmc still runs on >90% all the time. This is something new as I did not face the problem before. Any suggestions?

<advancedsettings>
    <network>
        <cachemembuffersize>5282880</cachemembuffersize>
    </network>
   <fanartheight>560</fanartheight>
   <thumbsize>256</thumbsize>
   <gui>
       <algorithmdirtyregions>3</algorithmdirtyregions>
       <nofliptimeout>0</nofliptimeout>
   </gui>
   <lookandfeel>
       <enablerssfeeds>false</enablerssfeeds>
   </lookandfeel>
   <bginfoloadermaxthreads>2</bginfoloadermaxthreads>
 
   <enableairtunesdebuglog>0</enableairtunesdebuglog>
</advancedsettings>

XBMC has always used a lot of

XBMC has always used a lot of CPU time for me. The package actually includes a default advancedsettings.xml customised for the Raspberry Pi which contains the best configuration I know of.

hi!,I really like your

hi!,I really like your writing very so much! percentage we
communicate more about your article on AOL? I require a
specialist on this space to unravel my problem.
May be that's you! Taking a look forward to peer you.

What's up, this weekend is

What's up, this weekend is fastidious in favor of me, because this occasion i am reading this great
informative paragraph here at my home.

Is anyone else finding this

Is anyone else finding this stopped working with a recent upgrade (last week or two)?

I get the background of XBMC displayed but no menu bar across it. Was working fine...

This website certainly has

This website certainly has all the information and facts I needed about this subject and didn't know who to ask.

Have anyone tried to use

Have anyone tried to use airplay with this build? For some reason I get to play pictures but no music at all, I found some where saying about libshairplay missing, but my does have it

Any thoughts?

I don't have any Apple

I don't have any Apple devices so I can't test AirPlay unfortunately. My latest build uses a newer libshairport (which is also in my archive) -- can you check that your system is fully updated?

Hi, it's compatible with

Hi, it's compatible with raspbian-19-09-12?

I've this message while I install xbmc:

sudo apt-get install xbmc
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:
 
I seguenti pacchetti hanno dipendenze non soddisfatte:
 xbmc : Dipende: xbmc-bin (>= 2:11.0~git20120510.82388d5-1) ma non è installabile
        Dipende: xbmc-bin (< 2:11.0~git20120510.82388d5-1.1~) ma non è installabile
        Raccomanda: python-qt3 ma non sta per essere installato
E: Impossibile correggere i problemi, ci sono pacchetti danneggiati bloccati.

thank you for your great work, Silvio

You need to run sudo apt-get

You need to run sudo apt-get update This will pull in the package lists.

Thank you, simple error :)

Thank you,

simple error :)

Good article! We are linking

Good article! We are linking to this great post on our site.
Keep up the great writing.

Are you referring to the

Are you referring to the 2012-09-18-wheezy-raspbian image? Or do you just mean Raspbian as of 2012/09/19? I haven't tested with the recent image, but am using it on a fully updated Raspbian installation.

Hi ! There are 2 things

Hi !

There are 2 things which you could expand on your blog (for better understanding).

  1. at the installing procedure, say that the existing /etc/apt/sources.list remain unchanged, because package "xbmc" will have double entry then and it seems to overlap, its ok to just keep the /etc/apt/sources.list intact

  2. say that advancedsettings.xml go into ~/.xbmc/userdata directory

Kind regards, Jan

just me or does the youtube

just me or does the youtube plugin not work?

Any plans to refresh the

Any plans to refresh the build? i.e. bake another snapshot?

Heya i'm for the first time

Heya i'm for the first time here. I found this board and I find
It really useful & it helped me out a lot. I hope to give something back and help
others like you helped me.