MuseDevelopmentWiki

Design

Filed in: BeagleBox.Design · Modified on : Fri, 15 Oct 10

Your Trail: BeagleBox/Design

Edit this page to change styles

--- Boxes and outlines ---

--- Headers beyond ordinary "!" level headers

--- Stegi specific stylings ---

--- Text warnings, notices, hilights ---

--- Directory paths ---

--- Calendar specific --- BeagleBox is a set top box software stack designed to provide non-Internet capable televisions the ability to utilize streaming video from the Internet. The stack is designed to run specifically on a Beagle Board hardware platform.

This document is intended to provide a high level overview of BeagleBox. Detail design specifications are found in the Architecture page.

Project Goals

Every project needs an primary goal, that thing that provides the measure for "We did it!" The primary goal for BeagleBox is

a set top box that can provide access to Internet based video to existing TVs that do not have Internet connections.

To achieve this goal BeagleBox will provide a set of software images that can be loaded onto a Beagle Board platform. The Beagle Board can be mounted in whatever external case the user chooses and connected to the TV using common video connectors.

Secondary goals enhance the primary goal by specifying desirable but not necessarily required features. BeagleBox's secondary goals include the ability to run existing open source video and audio tools. This will make BeagleBox are more general purpose home entertainment system.

These goals are purposely vague in hardware specifications. This allows the project to work within the bounds of the BeagleBox hardware platform, including improvements to that platform. However, another goal for BeagleBox is off the shelf hardware. BeagleBox does not intend to specifically support external hardware except for required components such as input devices and display devices. Support for external storage, for example, is not a goal of BeagleBox.

To clarify these goals, let's look at what BeagleBox intends to be and what it does not intend to be.

What BeagleBox Is

Figure 1: BeagleBox is a wireless network oriented media system.
  • BeagleBox is an environment for playing network based video.
  • BeagleBox is a DYI project. It requires some understanding of the system being built. BeagleBox attempts to explain as much of that as possible.
  • BeagleBox is a software project. It is based on off the shelf hardware components.
  • BeagleBox is open source as much as possible but is not restricted to open source components. Some components (specifically, a Flash player and some 3rd party players such as Hulu Desktop) may not be open source. BeagleBox will always release versions that are unencumbered by non-free software components though this may restrict the systems usefulness.
  • BeagleBox is a playground for developers. Dig in and learn how these kinds of systems get built.
  • BeagleBox is one word. No spaces, no hyphens.

What BeagleBox is Not

  • BeagleBox is a not a DVD player. It retrieves content from the network.
  • BeagleBox is not a local data store. It does not store content except for caching while playing.
  • BeagleBox is not an end product. It requires hardware the user must acquire separately and assemble.
  • BeagleBox is not focused on end users. It is focused on what developers want. See "BeagleBox is a playground."

Specific Goals

Enough of the philosophy. Down to brass tacks. This is what BeagleBox is intending to support.

  • Set Top Box Hardware
    • S-Video and Composite output
    • 10-second power-up
    • Wireless connectivity
    • HDMI Video
    • Stereo Audio
  • USB Input
    • Keyboard
    • Mouse
    • Not intending to support hand held remotes
  • Avoid Add on hardware
    • Keep cost down for DIYers
    • Avoid Beagle Board mods
  • UI
    • Not a desktop - more like Sony Bravia or mobile UIs
      • Based on Matchbox
    • Arrow key driven
    • Software keyboard if no keyboard connected
  • Open Source Video Applications
    • WebKit enabled browser
    • Video players
    • MythTV client
    • XBMC

Hardware Capabilities

The Beagle Board already provides most of what is required for BeagleBox.

  • S-Video
    • DVI-D option not likely to help with older TVs
    • HD video capable
  • HDMI
    • Suitable for newer but not network connected TVs
  • Stereo audio out
  • SD-Card for software stack, limit general storage
  • USB keyboard/Mouse
    • Use IR keyboards/mouse for interaction
    • IR remotes don't necessarily make system easier to use
    • Home entertainment (re: thin, small) keyboards available and easy to integrate

Additional desired components

  • Composite video
  • Wireless G
    • Sufficient for video playback on uncluttered network
    • low cost

The newer Beagle Board xM (due out end of July 2010) will include wired network connectivity but not Wifi. This would suffice using a network bridge. However, we want wifi to reduce the packaging around the TV. On either the original or the xM boards the use of USB wifi is likely a requirement for cost reduction and off the shelf availability without requiring board mods.

Hardware Connectors

Figure 2: BeagleBox requires a number of external connectors and components.

This project requires the following external cabling, connectors and components:

  • 5V/2A wall wart power connector
  • USB keyboard/mouse
  • RCA stereo out Y-splitter
  • HDMI or S-Video cable
  • IDC10->DB9F Null Modem cable for serial port
  • 1GB SD card
  • Risers or enclosure (optional)

These components can be purchased from DigiKey or Sparkfun. I use SparkFun, since they're in Boulder and I'm in Colorado Springs, or NewEgg.


Project Costs

This is an electronics DIY project. As such, you don't get the benefit of high volume pricing on major components. So the cost of doing this is not as low as buying a device off the shelf from Best Buy or Micro Center, if such a device existed.

Total costs for the hardware, connectors and components for BeagleBox, assuming retail pricing and not including taxes.

Item Price
BeagleBoard 149.95
power connector 5.95
keyboard/mouse 27.99
RCA stereo out Y-splitter, 6ft, M-to-M 2.95
HDMI or S-Video cable 4.99 / 4.95
IDC10->DB9F, Null Modem, DB9 to USB 5 / 4 / 10
1GB SD card 9.95
802.11g USB adapter - ath9k_htc driver 14.99
Standoffs and screws 1.95 / 0.95
Total 238.67

There is no case for the board included in the cost because this is a DIY project. If you plan on putting the board in a case, add that cost to the total. There are not many BeagleBoard specifc-cases available, though you might look at Special Computing's acrylic case or Esawdust's metal case. Or maybe just mount it in a wooden box or teddy bear like they do with miniITX boards.

You can save money on the keyboard/mouse, wireless USB network and assorted cables by using components you already have. This is the cost of buying everything if you were starting from scratch.

The Software Stack

Figure 3: The BeagleBox Software Stack.

The Software Stack is the primary focus of this project. The majority of development tasks will be associated with the development of the software stack components.

The BeagleBox software stack consists of the following high level components.

  1. Boot loaders
  2. Linux Kernel and drivers
  3. Root file system, utilities, libraries and configuration files
  4. Graphics Display via X.org / OpenGL
    1. BUI, a window environment based on Matchbox
    2. Widget libraries
    3. Clutter
    4. GStreamer
  5. User Space
    1. BeagleBox Libraries
    2. WebKit based Web Browser
    3. Flash player
    4. Configuration tools
    5. Other apps

Boot loaders are required to get the board to properly find and start the Linux kernel as well as initiate various hardware components. Boot loaders include the X-Loader, a Beagle Board requirement, and u-boot, which will be used to get the Linux kernel running. BeagleBoard projects often refer to the X-Loader as MLO. MLO is just a digitally signed copy of X-Loader.

The Linux kernel is used to provide access to hardware such as USB and SD card reader. TI provided add on drivers will provide support for advanced 3D graphics (SGX) and hardware accelerated video decoding (DSP) support in the TI OMAP processor.

The root file system provides a core set of utilities required to run the applications. This includes a minimalist set of GNU utilities and device driver files for common devices (serial ports, USB, etc.) along with additional components required in support of both Linux kernel configuration and higher level software configuration and control.

X.org will provide the basis for the graphical interface, BUI, including a desktop component, menus and window management. X.org is required to support many off-the-shelf applications that rely on widget sets such as GTK+ an Qt. However, accelerated graphics do not operate through the X.org interfaces due to current limitations in lower layer drivers for the OMAP SGX graphics. OpenGL will provide a common interface to hardware accelerated graphics. This forms a basis for higher level utilities such as Gnash, an open source flash player. Because the lower layer SGX drivers only support OpenGL/ES we need Clutter to provide higher level support to utility libraries such as WebKit and/or GTK+.

Hardware accelerated video decoding for formats such as H.264 comes from the OMAP C64+ DSP (digital signal processor). Kernel drivers from TI provide support for this hardware and the open source GStreamer infrastructure provides a common interface for video playback applications to utilize it.

BUI is a custom window environment based on Matchbox. It provides window management without window decoration and includes sliding menus and application launch capabilities. BUI is a separate project from BeagleBox but is closely associated with it and is maintained in the same source code repository.

BeagleBox libraries will provide custom application support. These libraries are intended to be specific to use on BeagleBox though will be open source and free to use for any other project who might find them useful.

User space is where the set of utilities that provide the user experience will live. This includes the video players and, most importantly, a web browser capable of accessing Internet-based content. BUI includes software for configuration of the system, such as network proxies, favorite web sites and userid/password management. These components and BUI are custom software built specifically for use with BeagleBox.

Development will be off-board on a host Linux system. This requires the use of a cross compiler. The cross compiler is used to build the software on a host system but run it on the target board. A custom build system will be used to generate the software stack images.

More information on the software stack can be found in the Architecture and Build pages.

New to embedded? This high level and not very detailed software stack is essentially the way any software platform is built. See the Android and Maemo stacks for comparison. Those are more detailed specifications, but since BeagleBox is not (yet) supplying an API for development there is little need for a more complex structure.

User Experience

Playing with build systems and writing code is all fun and games but we need to keep our primary goal in mind: a set top box. End users are familiar with these devices and we must endeavour to provide a better user experience than commercially available systems. to that end, BeagleBox intends to provide the following UI components.

  • Alpha blended, Sony Bravia-styled menus
  • Application logos/screenshots for menu items
  • Stacked window management
    • Single full-screen app displayed one at a time - no overlapping windows (menus must overlay applications, however)
    • Multiple workspaces to speed interaction
  • Point and click configuration for favorite web sites
  • More...

Modularity

The system should allow for adding external applications using off the shelf packaging tools such as RPM or ipkg/opkg. This will allow for future integration of an GNU App Store interface that allows users to add applications to their system, possibly through the use of external USB storage.

Applications should be considered plugins to the UI. Existing applications have plugin wrappers that integrate them into the UI.

Communication

Media will be retrieved from external sources. BeagleBox is not intended for use as a DVD player. Communication with external media sources is via network connections. BeagleBox will support wireless networking using 802.11g. The G specification is sufficient to stream media depending on local conditions. Support for N protocols will be considered in a future release.

The xM version of the board will incorporate an ethernet port which will also be supported.

Users: avoid the use of microwaves and wireless phones other than cell phones when using BeagleBox. It will help with network performance. Also, choose a channel on your wireless router that is mostly unused by your neighbors.

Data Storage

BeagleBox is not intended to be used to store content. While this may be possible with USB connected storage, providing support for this kind of content is not part of the primary goal. However, there needs to be some storage on the system to support not just the system software but configuration files and downloadable applications.

The Beagle Board provides an SD card port which is sufficient for all of these uses. SD cards are available in relatively large formats, up to and beyond 1GB. This is plenty of storage for BeagleBox system software with room to grow for add on applications.

Other Goals

BeagleBox will run a MythTV client. However, it will not run as a MythTV server. This is a design choice to reduce the hardware requirements for BeagleBox. Future versions of BeagleBox may support its use as a distributed backend server, however this is not a current design consideration.

BeagleBox needs to have a fast startup. The goal is 10 seconds from power on to user availability. This may be one of the most difficult requirements for BeagleBox. It may require modifications to the kernel and/or boot loaders to achieve.

Implementation Notes

BeagleBox development will be done in two phases, QEMU and BeagleBox.

Phase I is the QEMU phase. This phase will bring up as much of the software stack as possible under QEMU emulating ARM hardware. This will include the UI as much as possible but may not include support for video or audio playback. This allows much of the root file system and build process to be developed without the expense of the purchasing a board. Also, Beagle Boards are rumored to be in short supply with long lead times so this will allow an order to be placed for the board long before it will need to be available for Phase II.

The QEMU phase will include the following subtasks, in order of development:

  1. Infrastructure
    1. Cross Compiler
    2. Linux Kernel
    3. Root filesystem
  2. User Space
    1. Core UI, unthemed
    2. Web browser
  3. Hardware acceleration drivers

Surf will be installed as an example application. Alternatively, a standalone media player such as mplayer, xine or vlc may be chosen instead. Test suites will be developed to verify sanity and regression of releases.

Phase II of development will focus on moving the QEMU environment onto a Beagle Board to complete support for hardware components, including video and audio. At this point the build process should be stabilized, allowing the primary focus to be on final software stack improvements and specific board-component support.

  1. Infrastructure Extensions
    1. X-Loader (if needed)
    2. u-boot
  2. Hardware
    1. Video
    2. Audio
    3. Networking
  3. User Space

Configuration

Font Size

Powered by PmWiki