Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install OpenELEC on Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. OpenELEC

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

The installation process will be divide the content into three section according to the host platform:

  1. Automated Installation using Linux
  2. Installation on Linux
  3. Generic Installation for QEMU

What is OpenELEC?

OpenELEC is an embedded operating system built around XBMC, the open source entertainment media hub. Home Theatre PCs are known to be hard to install and configure and can take a massive amount of time to keep running. OpenELEC, on the other hand, is designed to be as lightweight as possible in terms of size and complexity meaning your HTPC becomes no harder to configure than satellite box or DVD player. With it’s small footprint, OpenELEC is also ideal for small systems based on Atom or Fusion platforms so we won’t need a whole computer in your living room!

OpenELEC is designed to be lightweight. It support many system such as NVIDIA’s ION platform, AMD’s Fusion platform, and Broadcom’s Crystal HD chip. OpenELEC can support high definition content on machines with low-powered processors by offloading video content to supported graphics cards and decoders. This means we can build (or buy) small, silent machines to be effectively used as a media center.

Obtain the Materials

The Operating System images I used is latest version of OpenELEC. The version I use is latest version, at time of writing this article (per August 25th, 2013), and can be download from their official site here. Verify your package, you should have a tarball package (file that ends in .tar.bz2) with correct checksum.

Exploring the Package

Extract the content and you will have a folder with some content on it.

For the latest package we download (version 3.1.6) there will be three directory four plaintext, one shell script file, and one image file.

The three directories are:

3rdparty
Like implied by name, the 3rdparty code and file. There is only one folder there, bootloader. The files inside there are used to make a bootloader for OpenELEC’s SD Card.
licenses
Various license used. Including license by third party such as NVIDIA, etc.
target
Our primary interest. There are four files here: KERNEL, KERNEL.md5, SYSTEM, and SYSTEM.md5. Actually there are two important file there, KERNEL and SYSTEM. The files with .md5 extension are used for checksum. KERNEL file is used as OpenELEC kernel (Linux kernel ARM boot executable zImage little endian) and the SYSTEM file is the root filesystem (technically a Squashfs filesystem, little endian).

The shell script (name: create_sdcard) is used to create SD Card. If you read the script, you will see that the script will create two partition. One partition is using FAT32 and the other uses ext2. The FAT32 partition (first partition) is set to 16 cylinders or approximately 130MB. This is interesting information.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Installation

(1) Automated Installation on Linux

Insert SD Card your Linux system. Look for what device it is recognized as. It can be /dev/sdX, /dev/mmcblk0, etc.

Invoke following command with root privilege (/dev/sdX is our device):

It is very important to make sure you have the right device as it will be wiped as part of the process.

(2) Installation on Windows

There is no batch script or vbscript (or similar to that) for Windows so we should do manually.

Formatting the SD Card

OpenELEC needs properly formatted SD Card. It requires two partition with one of theme is formatted with an ext4 filesystem. A third party such as the MiniTool® Partition Wizard can be used for this purpose. The Home Edition is free for home use only.

Delete all existing partition and create two partitions. Both are primary partition. The first partition is parted as FAT32 with capacity of 130MB. Give the rest SD Card storage to EXT2 (or other EXT) partition. Name the first as Boot and the later as System.

Last but important part, create bootloader configuration. Create a file ‘cmdline.txt’ on the SD card with following content:

Copying OpenELEC to SD Card.

Now mount the first partition (the FAT32 one) to your Windows. Copy the target/KERNEL as kernel.img to partition. Also copy the target/SYSTEM. Next, copy the content of 3rdparty\bootloader folder also to that partition. Also copy openelec.ico and README.md. At this point you should have following items on your partition:

  1. LICENSE.broadcom
  2. README
  3. SYSTEM
  4. bootcode.bin
  5. cmdline.txt
  6. config.txt
  7. fixup.dat
  8. kernel.img
  9. openelec.ico
  10. start.elf

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

To resize the SD card after installation, you can follow this article.

Finally, you can login to Raspberry Pi using

Username root
Password openelec

If you do not have a USP Input device, you can enable XBMC wifi remote access (via Android/iOS etc) by editing config files directly.

Happy hacking 😀

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">