Skip to content

Compiling

Fernando Rodriguez edited this page May 17, 2018 · 1 revision

Requirements

  • Modern Linux distribution with the essential build tools (gcc, autotools, git, etc).
  • ncurses library installed
  • An internet connection to download dependencies when generating a bootable image.

Compile and install

MediaBox uses autotools as the main build system. Before compiling you must ensure that developement versions of the following packages are installed:

  • pangocairo
  • alsa-lib
  • All dependencies for the selected video driver (ie. libX11 and mesa for X11, libdrm and mesa for DRM, and the Raspberry Pi userland package for VC4).
  • ffmpeg libraries
  • libcurl
  • libupnp
  • libtorrent-rasterbar
  • libwebsockets-3.0.0 (for the web remote)
  • sqlite3
  • libdvdcss (for DVD playback)
  • bluez (for bluetooth support)
  • libmagic

Then simply run:

$ git clone https://github.com/avbox/mediabox
$ ./autogen.sh
$ ./configure --enable-debug --enable-ionice --enable-realtime --enable-dvd --enable-bluetooth --enable-x11 --enable-libdrm
$ make
$ make install

Generate Bootable Image

MediaBox uses buildroot to create a complete bootable image. The sdk/ directory contains all the necessary buildroot recipes and configuration files along with a script, buildroot that will download and configure buildroot, and then build a cross-compile toolchain and root filesystem. To generate a bootable image for the Raspberry Pi Zero simply run the following commands:

$ git clone https://github.com/avbox/mediabox
$ cd mediabox/sdk
$ ./buildroot --arch=arm --board=raspberrypi0

You may see some ncruses based configuration menus during the process, just press ESC to exit and accept to save any changes. The build process may take a while but if everything goes well by the end of the process you should have bootable images in sdk/build/arm/raspberrypi0/images/.

Install and Configure Bootable Image

TODO: Explain how to burn the image to an SD card, grow the data partition, and configure WIFI connections.

Clone this wiki locally