Buildroot:TechShowcase2015 Demo

This page documents the Buildroot demo that was presented during the technical show case at the Embedded Linux Conference 2015 in San Jose.

There are two sides to the demo:


 * 1) A NAS serving media files via various means: DLNA, NFS
 * 2) A media player running Kodi 14.1 Helix, playing media files served by the NAS

Both systems were built using Buildroot, go get it there:

git clone git://git.busybox.net/~ymorin/git/buildroot cd buildroot git checkout 2015.03-demo-elc

NAS
The NAS is an OpenBlocks AX3:


 * Dual-core Marvel Armada XP Cortex A9 @1.33GHz
 * 1GiB DDR3 RAM, 128MiB NOR Flash
 * Giga-bit ethernet
 * SATA II

The software stack running on the NAS is mainly composed of:


 * Linux kernel 3.18.7, plus backported patches to improve Armada XP support
 * Avahi 0.6.31
 * MiniDLNA 1.1.4
 * Dropbear 2015.67

Build the NAS firmware:

mkdir -p output/NAS make O=output/NAS demo_elc_openblocks_nas_defconfig make O=output/NAS

The result is available in, with the following two files being the important ones:


 * , which is the kernel image. It contains an appended Device Tree Blob, because the AX3 bootloader doesn't support Device Tree booting.
 * , which is the root filesystem image, in the UBI format.

We will flash both on the NOR flash. We could have stored the system in the SATA hard disk, but we preferred to keep it only for the NAS data, and have the system stored separately.

You can flash the resulting system to the AX3 using the following U-Boot commands, assuming you have a working TFTP server:

erase 0xf8800000 +0x800000; tftp 0x2000000 uImage; cp.b 0x2000000 0xf8800000 ${filesize} erase 0xf9000000 +0x2000000; tftp 0x2000000 rootfs.ubi; cp.b 0x2000000 0xf9000000 ${filesize}

Then, to boot the system, set the following environment variables:

setenv bootargs console=ttyS0,115200 mtdparts=f0000000.nor:8M@8M(kernel),32M(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs setenv bootcmd cp.b 0xf8800000 0x2000000 0x800000; bootm 0x2000000

The system will automatically mount the  partition in , assuming it is used for the NAS storage. Note that the system is basic, and does not attempt to create or format this partition: it assumes it already exists.

Media player
The media player is a Raspeberry Pi 2:


 * Quad-core Broadcom BCM2836 Cortex A7 @900MHz
 * 1GiB RAM
 * 100Mb ethernet
 * µSD

The software stack running on the media player is mainly composed of:


 * Linux kernel 3.19.0 (plus RPi patches)
 * Kodi 14.1 Helix
 * Kodi PVR and audio-encoder add-ons
 * samba 3.6.25
 * Avahi 0.6.31
 * ConnMan 1.27
 * Dropbear 2015.67
 * eudev 2.1.1
 * tzdata 2015a

Build the Media player firmware:

mkdir -p output/mediaplayer make O=output/mediaplayer demo_elc_raspberrypi_kodi_defconfig make O=output/mediaplayer

The result is available in, wit the following content:


 * , which is the kernel Image.
 * , which contains the bootloader and the GPU firmware, and the RPi-2 DTB.
 * , which contains the rootfs filesystem.

To use this, you first need to prepare a µSDcard (assuming it is  on your PC):

sudo parted -s /dev/sdz mklabel msdos unit MiB mkpart primary 1 10 mkpart primary 10 512 print sudo partprobe -s /dev/sdz sudo mkfs.vfat -F 16 -n BOOT /dev/sdz1 sudo mkfs.ext4 -m1 /dev/sdz2

Then you need to copy files to the µSDcard:

mkdir sdz1 sdz2 sudo mount /dev/sdz1 sdz1 sudo mount /dev/sdz2 sdz2 sudo cp -a output/mediaplayer/images/rpi-firmware/* sdz1/ sudo cp -a output/mediaplayer/images/zImage sdz1/ sudo tar xf output/mediaplayer/images/rootfs.tar -C sdz2/ sudo umount sdz1 sudo umount sdz2

Finally, you can move the µSDcard to the RPi-2 and power it on. The default configuration on this system is meant for Kodi to be controlled via the remote of a CEC-compatible TV, or froom a USB keyboard. See the official Kodi documentation on how to further customise it.

Poster
The poster used to present the demo is available as [[Media:ELC2015-Buildroot-Poster.pdf|PDF]] and [[Media:ELC2015-Buildroot-Poster.svg|SVG]].