XBMC on the Raspberry Pi

This is a rough tutorial on how to build a small, full-featured XBMC-based media-center to run on the Raspberry Pi.

This is a work in progress.
Expect rough edges.
Mind your fingers. ;-)

This XBMC setup boots in about 15 seconds from power up, to the XBMC main screen (depending on the speed of your SDcard; the first boot is a bit longer).

With this, you'll be able to:

  • read media from the network, via: Samba, DLNA, AirPlay
  • read media from local storage: USB sticks, CD, DVD or BD
  • play videos using the hardware acceleration in the RPi
  • output video to: HDMi (by default) (TV out untested)
  • output sound to: HDMI (by default), jack (some noise due to the hardware)
  • control XBMC with your TV's remote (if your TV is CEC compliant), or with a USB keyboard

Here are the tools we're going to use:

  • Buildroot: Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation.
  • Buildroot.config: a collection of scripts to make it easy to manage projects using Buildroot.
  • XBMC: XBMC is an award-winning free and open source (GPL) software media player and entertainment hub.

Getting the required tools

First, get the lastest version of Buildroot.config:

  git clone git://ymorin.is-a-geek.org/buildroot.config

or for those behind a restrictive proxy:

  git clone http://ymorin.is-a-geek.org/git/buildroot.config

(Prefer using the git:// URL, as it uses the git protocol, which is more efficient than the http protocol.)

Next, enter this directory, and launch the Buildroot.config shell wrapper:

  cd buildroot.config
  ./brsh

You are now set to use Buildroot.config.

Preparing the tools

Buildroot.config comes with a set of pre-configure projects. You can list them with:

  listprj

For this tutorial, we are interested in the rpi/xbmc project. We are going to tell Buildroot.config to use that project to prepare a build environment:

  initprj rpi/xbmc

Building the firmware for the Raspberry Pi

Now is time to run the build proper:

  make

You'll see at lot of messages go by on your screen. The build can be very long. Depending on your machine, it may take more than one hour. For example, on a dual-core, hyper-thread Core-i5 @ 2.5 GHz and a fast SSD, the build takes a bit more than 1 hour and 15 minutes. On an hexa-core, hyper-threaded Core-i7 @ 3.2 GHz, it takes a bit less than 45 minutes (both timings not counting the download time).

Finally, if all goes well, you'll get a directory named images/ in the current location. In this directory, you'll find a file named mmclbk0.img. This is the image of the firmware, ready to be flashed on the raw device of an SDcard:

  dd if=images/mmcblk0.img of=/dev/sdX bs=1M conv=sync

Replace /dev/sdx with the actual device for your SDcard. Be sure not to use a partition, such as /dev/sdX1, but really the raw device.

( Note: if dd complains, you may remove the trailing conv=sync option. Be sure however to run sync manually afterwards, to ensure the write to the SDcard is complete.)

Running XBMC

Plug your SDcard in your Raspberry Pi, connect it to a monitor and the network, then power-up the Raspberry Pi.

You should soon see the splashscreen with the three logos of Builroot, Raspberry Pi and XBMC :

After a few seconds (depending on the speed of your SDcard), you should see the the main screen of XBMC:

Finally, when you're done, shutdown the system (using XBMC shutdown menu). You should see the shadow of the three logos :

After a few seconds (the time for the final sync of the SDcard), it should be safe to power down your Raspberry Pi.

projects/rpi-xbmc.txt · Last modified: 20140418.123712 by ymorin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki