CuBox

The CuBox is a very small, fan-less nettop-class computer manufactured by the Israeli company SolidRun Ltd. It is cube-shaped at only approximately 2 × 2 × 2 inches and weighs 91 grams (0.2 lb, or 3.2 oz). CuBox is the first commercially available desktop computer based on the Marvell Technology Group's Armada 500-series SoC (System-on-Chip), and said to currently be the worlds smallest complete desktop computer.

It was announced in December 2011 and began shipping in January 2012, initially being marketed as a cheap open source developer platform for embedded systems, so just like the Raspberry Pi it is not designed for end-user but rather for developers looking to improve their experience with embedded systems.

Overview
CuBox is a low-power ARM architecture CPU based computer, using the Marvell Armada 510 (88AP510) SoC with an ARM v6/v7-compliant superscalar processor core, Vivante GC600 OpenGL 3.0 and OpenGL ES 2.0 capable 2D/3D graphics processing unit, Marvell vMeta HD Video Decoder hardware engine capable of 1080p video decoding, and TrustZone (Security Extensions) Cryptographic Engines and Security Accelerator (CESA) co-processor.

Despite being just about 2-inch-square device size, the platform can stream and decode 1080p content, use desktop class interfaces such as KDE or GNOME under Linux, all in less than 3 Watt and less than 1 Watt in standby.

Solid-Run currently officially only supports Linux kernel 2.6.x or later, and Android 2.2.x and later, and it comes with Ubuntu Desktop 10.04 and Android 2.2 dual-boot pre-installed. An experimental version of Linux kernel 3.4 for the CuBox is however available with source code.

XBMC for CuBox
XBMC has already have an initial port for the CuBox with hardware accelerated video decoding using GStreamer, this experimental port was made by Solid-Run developer abeeh (Rabeeh Khoury) in his fork on GitHub.com but the code patches has not yet been submitted upstream into mainline XBMC.


 * YouTube video of XBMC running on CuBox

Installing pre-compiled XBMC on CuBox

 * XBMC on CuBox

Compiling XBMC for CuBox

 * Building XBMC for the CuBox

Xilka Linux Distribution on CuBox

 * Xilka on CuBox - Ships with XBMC pre-installed

CuBox Hardware Specifications
For a more detailed hardware specification please see the CuBox hardware specification on the Solid-Run wiki.



Physical Dimensions

 * Approximately: 55mm x 55mm x 42mm (2.17 x 2.17 x 1.65 inches)
 * Weight: 91 metric grams (0.2 lb, or 3.2 oz)

Core SoC (System on Chip) and integrated co-processor cores
Marvell Armada 510 (88AP510) ARMv6/ARMv7 SoC in a 55nm BGA process package
 * ARM v6/v7-compliant processor core (Marvell's Sheeva PJ4 architecture, superscalar, dual issue CPU processor) clocked at 800MHz
 * VFPv3 - Vector Floating Point (VFP) v3 - Single precision and double precision FPU (Floating Point Unit) co-processor
 * WMMX / WMMX2 instruction set - Wireless MMX and Wireless MMX2 support (but no NEON support) SIMD extension
 * 32KB L1 I-Cache
 * 32KB L1 D-Cache
 * 512KB L2 cache
 * Vivante GC600 2D and 3D capable hardware accelerated graphic engine supporting up to 16MT/sec and 300 MP/sec to WUXGA 24 bpp resolution over these APIs:
 * OpenGL ES 2.0 (with full backwards compatibility with OpenGL ES 1.1)
 * OpenVG 1.1
 * X11 / EXA
 * DirectFB 1.4
 * EGL 1.4
 * 1GB 32-bit DDR3 RAM running at 800MHz (4 x Hyndix H5TQ2G63BFR-H9C)
 * vMeta HD Video Decoder hardware engine is running at 500MHz and is capable of Full HD 1080p at 30fps decoding H.264, VC-1 and MPEG-2, etc. w
 * TrustZone cryptographic engine and security accelerator co-processor supporting AES, DES, 3DES, SHA-1, and MD5
 * Two XOR/DMA Engines and PDMA
 * PMU (Power Management Unit) engine
 * Integrated Real Time Clock (RTC)

External input/output ports, buttons, and interfaces

 * HDMI port supporting max 1080p at 50/60 Hz for TV, and max 1600x1200 at 60 Hz for PC (UXGA60)
 * HDMI 1.4a
 * DVI 1.0 backward compatible
 * EIA/CEA-861B
 * CEC (HDMI 1.4a)
 * HDCP 1.4 (TDA19988AHN and TDA19988AET only)
 * HA Audio (4 x I2S-bus or one S/PDIF; audio data rate up to 192 kHz)
 * Two High Speed USB Host ports (USB 2.0) supports both host and device modes
 * One 10Mbps, 100Mbps, and 1000Mbps Ethernet MAC port ("Gigabit Ethernet")
 * One S/PDIF (SPDIF transmitter optical audio) port
 * One eSATA I/II port with integrated SATA II PHY (SATA AHCI 2.0 support at 3Gb/sec)
 * Standard IrDA Infra-red receiver for 38KHz based IR controllers (LIRC software support)
 * MicroSD SDXC capable slot (supporting up to 64GB microSDXC NAND flash memory) comes with a 2GB card
 * MicroUSB USB Device / Console for flashing (so no JTAG required making it "unbrickable" for developers)
 * Recovery Button
 * LED light indicator when powered-on
 * Input power 5mm/2.1mm DC Jack (requires a 5V/2A power supply that is included)

HDMI transmitter by NXP Semiconductors Caen
The CuBox (Marvell Armada 510 - 88AP510 SoC) hardware has integrated TDA998x (TDA19988 or TDA19989) HDMI transmitter by NXP Semiconductors Caen to support HDMI output and CEC (Consumer Electronics Control) over HDMI.


 * Sample code with CEC module: https://github.com/rabeeh/linux-2.6.32.9/tree/master/drivers/video/display/nxp
 * CEC documentation for developers: http://www.nxp.com/documents/application_note/AN10920.pdf
 * Full specifications: http://www.nxp.com/products/audio_video/hdmi/hdmi_transmitters/TDA19988BET.html
 * Product overview: http://www.nxp.com/documents/leaflet/75017116.pdf

HDMI transmitter (from NXP) resolution options:
 * 4:3 (VGA/XGA 640 to 1600, NOT 'PAL' 768x576)
 * 16:9 (HD 720, HD 1080)
 * 5:4(..1280x1024), 5:3(1280x768) and a few others..
 * (NO 16:10/8:5, 17:9, 3:2 ie. 1440x900 1680x1050.. ratio resolutions)

Display Controller:
 * TFT panel support
 * Video Graphics Array (VGA) out support with integrated DACs
 * HD 1080p maximum resolution
 * Parallel interface up to 24-bit RGB
 * YCbCr to RGB conversion
 * YCbCr 4:4:4, 4:2:2, 4:2:0 input support.
 * Color management: brightness, contrast, hue
 * Up-scaling and down-scaling support
 * Linear horizontal and vertical up-scaling
 * Horizontal and vertical mirroring options
 * 90 or 270 degree full screen rotation
 * Three overlay layers—video, graphics, and cursor
 * NOTE: Supports hardware cursor with up to 24-bpp RGB and alpha blending.
 * Color palette—three 256 entries (2, 4, 8 bpp) for video and graphics overlay channels
 * Alpha blending support for color panels
 * Dedicated DMA for data movement between memory and port
 * Dual display with independent frame buffers
 * SPI controller supports display control
 * PWM control

Detailed list of supported resolutions

 * 640x350p 85Hz
 * 640x400p 85Hz                          3:2
 * 640x480p 60Hz 72Hz 75Hz 85Hz           4:3
 * 720x240p 60Hz
 * 720x288p 50Hz
 * 720x400p 85Hz
 * 720x480i 60Hz                          3:2
 * 720x480p 60Hz                          3:2
 * 720x576i 50Hz                          5:4
 * 720x576p 50Hz                          5:4
 * 800x600p 60Hz 72Hz 75Hz 85Hz           4:3
 * 1024x768i 87Hz                         4:3
 * 1024x768p 60Hz 70Hz 75Hz 85Hz          4:3
 * 1024x864p 75Hz
 * 1152x864p 85Hz                         4:3
 * 1152x960p 60Hz
 * 1280x720p 24Hz 25Hz 30Hz 50Hz 60Hz     16:9
 * 1280x768p 60Hz                         5:3
 * 1280x960p 85Hz                         4:3
 * 1280x1024p 60Hz 75Hz 85Hz              5:4
 * 1360x768p 60Hz                         (16:9)
 * 1400x1050p 60Hz                        4:3
 * 1440x480p 60Hz
 * 1440x576p 50Hz
 * 1600x1200p 60Hz                        4:3
 * 1920x1080i 50Hz 60Hz                   16:9
 * 1920x1080p 24Hz 25Hz 30Hz 50Hz 60Hz    16:9
 * 2880x480p 60Hz
 * 2880x576p 50Hz

Vivante GC600 graphic engine
Vivante GC600 OpenGL ES 2.0 GPU (Graphics Processing Unit) running at 250MHz (500MHz in shader processing), scalable up to 285 MHz (571 MHz shader) 32-bit AHB interface for register access with 64-bit AXI interface to access external memory by graphics client, and virtual memory support. Supported Screen Resolutions:
 * QVGA 320x240
 * VGA 640x480
 * XGA 1024x768 1024x768
 * HD 720p 1280x720
 * HD 1080p 1920x1080

2D and 3D GPU features

 * Fully featured 3D pipeline
 * Unified vertex and pixel/ fragment shader
 * Full support for OpenGL ES 2.0 shading language
 * Transform, lighting and fixed function texture blending features of OpenGL ES 1.1
 * Complete floating point pipeline that generates high quality images
 * High quality anti-aliasing with one quarter the memory and processing
 * High Dynamic Range (HDR) texture operation; support for eight simultaneous textures
 * Point-sample, bi-linear, tri-linear and cubic textures
 * Fully featured 2D pipeline
 * Bit, stretch, and pattern BLITs
 * Fast clear
 * Rectangle fill and line primitives
 * Mono-expansion for text rendering
 * Alpha blending
 * 90 degree rotation
 * Maximum frame size
 * Performance
 * 10 million polygons per second
 * 200 million pixels per second in depth only mode
 * 100 million pixels per second in texture/ color and depth mode
 * API support:
 * OpenGL ES 2.0
 * OpenGL ES 1.1
 * OpenVG 1.1
 * X11 / EXA
 * DirectFB 1.4
 * EGL 1.4
 * Hardware features
 * ScalarMorphic(TM) architecture means less area with no drop in performance
 * Ultra-threaded, unified shader maximizes graphics processing speed
 * Smallest die area in every GPU class
 * Very low power with battery-saving innovations
 * Highest graphics performance per sq. mm
 * Superior image quality with high-definition detail, MSAA, and high dynamic range
 * Depth texturing to enable dynamic shadow generation
 * High-definition screen resolutions of HD 1080p and beyond
 * Optimized to minimize bandwidth and reduce CPU load
 * Simple integration using standard AHB and AMBA AXI bus SoC interconnects
 * Unified Shader
 * Unified vertex and fragment/pixel shader means no wasted GPU cycle
 * Full OpenGL ES 2.0 Shading Language support for unrestricted programmability
 * IEEE 32-bit high-precision computing yields more detail, supports long instructions
 * Massively parallel multi-threading virtually eliminates graphics pipeline latency
 * Fully backward-compatible with all OpenGL ES 1.1 applications
 * Texture Mapping
 * Texture support includes 2D, Cubic environment, Projective, YUY2, and High Dynamic Range (HDR)
 * Point sample, bi-linear, and tri-linear texture filters
 * Bump mapping support
 * Depth map up to 24-bit
 * Compressed texture standards ETC1 and DXT1-DXT5
 * Dependent texture operation with high performance
 * Supports up to 16 vertex textures and 16 pixel textures simultaneously
 * Supports texture size up to 8K x 8K
 * Video post-processing and peripherals
 * YUV-to-RGB color space conversion
 * Color space conversion
 * Alpha blending/hardware overlay for up to eight planes/surfaces
 * High-quality image and video scaling with 9-tap, 32-phase programmable filter
 * Camera preview
 * AHB interface
 * 256K addressable register space
 * 32-bit data bus
 * Handles error response for illegal accesses
 * Bus speed up to 400MHz in 65LP
 * AXI interface
 * AMBA AXI protocol-compliant
 * 32-bit address bus and 64-bit data bus
 * Multiple burst length (8, 16, 32, or 64 bytes)
 * High-performance out-of-order / multiple outstanding access
 * Supports out-of-order return data from multiple slaves
 * Bus speed up to 400MHz in 65LP
 * Asynchronous interface to the graphics core

Audio Controller with SPDIF Optical Output Port

 * Sony/Philips Digital Interface (S/PDIF)
 * Compliant to 60958-1, 60958-3, and IEC61937 specifications
 * S/PDIF playback support
 * Sample rates of 44.1/48/96 kHz
 * 16/20/24-bit depths

vMeta HD Video Decoder hardware engine
Marvell vMeta HD Video Decoder hardware engine running at 500MHz for decoding H.264, VC-1 and MPEG-2, etc. and vMeta engine also support JPEG/PNG/GIF/TIFF/BMP/Animated GIF decoding acceleration up to 50MP/s. A number of containers are also specified as being supported officially, but that is usually a matter of firmware.

The Video Decode (VMeta) unit decodes the compressed Video Elementary Stream (VES) to produce the reconstructed video frames (in YUV422 format) for display or further processing. The input VES and the output frames are stored in DRAM.

The typical VMeta™ operation sequence can be summarized as:
 * 1) Demux extracts VES to the buffer inside DRAM.
 * 2) CPU sets the DMA to start prefetching VES.
 * 3) CPU invokes the vScope block for upper-level stream processing.
 * 4) CPU initializes the rest of VMeta, download programs, and initializes VMeta for video decoding.
 * 5) vScope performs the lower-level stream processing to generate messages (queued in HBO) for the pixel processing block.
 * 6) vCache fetches the reference pixels for the pCube.
 * 7) pCube reconstructs the video frames and outputs to DRAM.

Hardware Audio and Video Decoding Codec Formats supported

 * Audio formats supported currently:
 * MPEG1, MPEG2
 * MP3
 * WAV
 * WMA V9
 * LPCM
 * AAC
 * HE-AAC
 * Dolby Digital, Dolby Digital Plus, TrueHD
 * DTS Core only
 * DTS HD HD high Resolution Audio
 * DTS Master Audio
 * DTS LBR, DTS Encoder
 * Dolby Digital Encoder
 * MAT encoder
 * Prologic II
 * Audio formats to be supported in the future via firmware upgrade:
 * Dolby virtual surround/headphone, Dolby volume
 * SRS
 * Vorbis, FLAC, MIDI
 * Video formats supported currently:
 * MPEG1, MPEG2
 * MPEG4 SP
 * MPEG4 ASP (GMC 0,1p)
 * VC1 AP
 * H.264 up to 4.1
 * H.264 level 5 (max bitrate 50Mbps)
 * H.264 MVC
 * JPEG baseline
 * DiVX3.11
 * WMA V9
 * VP6
 * RMVB
 * Sorenson H.263
 * PNG
 * Video formats to be supported in the future via firmware upgrade:
 * DV
 * JPEG2000

Cryptographic Engines and Security Accelerator (CESA)
The 88AP510 integrates hardware-based cryptographic engines and a security accelerator (CESA). The cryptographic engines and the security accelerator reduce CPU packet processing overhead by performing time-consuming cryptographic operations such as Advanced Encryption Standard (AES), Data Encryption Standard (DES), and Triple Data Encryption Standard (3DES) encryption, as well as Message Digest 5 (MD5) and Secure Hash Algorithm 1 (SHA1) authentication. There are four cryptographic engines that operate independently, one at a time, (one DES encryption/decryption engine, one AES128 encryption engine, one AES128 decryption engine, and one Authentication MD5/SHA engine).
 * Hardware implementation of encryption and authentication engines to boost packet processing speed
 * Implements AES, DES, and 3DES encryption algorithms
 * Implements SHA1 and MD5 authentication algorithms
 * Dedicated DMA for data movement between either internal SRAM memory or DDR memory and the engines

XOR DMA Engines

 * Two XOR/DMA Engines for a total of four high performance DMA channels
 * Supports XOR operation for up to eight source blocks
 * Useful for application acceleration:
 * RAID XOR offload
 * Memcpy / memset acceleration
 * Copy to/from user space
 * Supports iSCSI CRC-32 calculation

Stuff left to do by capable developers on the XBMC for CuBox
TODO list for any capable C++ developers willing to help develop XBMC for the CuBox and submit any finished patches upstream to XBMC:
 * 1) Get the CuBox integrated CEC (Consumer Electronics Control) over HDMI to work with the libcec and thus also work with XBMC, see http://www.solid-run.com/phpbb/viewtopic.php?f=12&t=514 and http://www.solid-run.com/mw/index.php/CEC_%28Consumer_Electronics_Control%29_over_HDMI
 * 2) Build XBMC on ARM HardFB (Hard Floating Point), a.k.a. armhfp for the CuBox's SoC VFPv3 - Vector Floating Point (VFP) v3 engine, on top of a Linux distribution with hard float support, for more information see http://www.madeo.co.uk/?p=851
 * 3) Add better reset implementation instead of flushing by seeking, look at the GStreamer and EGL patches created by Rob Clark in this XBMC fork on GitHub => https://github.com/robclark/xbmc/tree/gstreamer-eglimg
 * 4) Add delay for pipeline gstreamer creation and wait for paused state. The reason is that there is always hickups when video starts to play since XBMC starts sending frames for decoding, but gstreamer pipe still not ready.
 * 5) Fix proper pipe closing. There seems to be missing 30 frames at the end of every playback. The reason is that gstreamer is done on decoding but video renderer is still showing those decoded frames.
 * 6) Change ffmpegcolorspace in gstreamer to output either YUV420, UYVU and other supported dove-overlay video layer color formats (I420 is YUV420 but with swapped color space etc...)
 * 7) DVDVideoCodecGStreamer has lots of cleanup to do. Internally it has lots of printfs that needs to be removed.
 * 8) MathUtils doesn't build correctly with the native ARM code already in XBMC (probably scratchbox toolchain issue). Notice that sometimes when launching XBMC we get some assert on MathUtils, unclear if it's related or not.
 * 9) Ugly hack to make XBMC build. Somehow although we don't build LinuxRendererGLES.cpp that header file still being used. For now it's a hack, should be removed in the future.
 * 10) Second hack is that Status typedef is missing when building WinEventsSDL which leads to build error on XKBlib.h
 * 11) Hack to disable eglCreateContext that Dove GL driver doesn't like. Needs to be sorted out
 * 12) Added --with-iwmmxt to fmmpeg configure, but disabled meanwhile since the used processor for build (cortex-a9) doesn't support that. Needs to be fixed in the future (will add performance by using Dove vector operations when codec not supported by video engine and CPU decoding is required).
 * 13) Implement the GPU backoff algorithm when playing a video. Since the video is rendering directly via a video overlay, no need for tens of fps for GPU in that time since it might only be used for subtitles. Instead of running tens of fps, lower the fps of the gpu and thus keep more DDR bandwidth for the video engine so higher bitrate content can be played.
 * 14) Add auto video out resolution select mode. On the GUI go for 720p since the graphics is best (images are 720p optimized and fps is faster - more smooth). When playing back switch to either 1080p or to the native resolution of the content with it's corresponding refresh rate.
 * 15) Assert failures at the beginning when running XBMC. Similar to the item mentioned in XBMC forums here => http://forum.xbmc.org/showthread.php?t=81122
 * 16) asound.conf is not good enough. there are some noises in 44.1KHz and others.
 * 17) Disable Xorg screen blanking when playing a movie.
 * 18) Implement Marvell vMeta hardware engine JPEG (and other image formats) decoding, as done by the XBMC for iOS port, this should increase the GUI speed/smoothness and image caching/thumbnailing immensely. Contact XBMC team developers TheUni, Davilla, and Memphiz about how this is done in XBMC for iOS port.
 * 19) Check to if Rob Clark has any other relevant GStreamer, EGL, ARM, etc. patches in this XBMC fork on GitHub => https://github.com/robclark/xbmc/tree/gstreamer-eglimg
 * 20) Possible try to make XBMC run with DoveFB X.Org and FBDev DirectFB 2D / 3D graphics engine drivers|DirectFB using DoveFB support, to run XBMC without X, (as currently XBMC requires X since it runs over EGL with X backend). This depends on latest DirectFB/Mesa, so have to run newer Ubuntu, for more information see https://github.com/xbmc/xbmc/pull/454
 * 21) When playing in 1080p, LCD refreshes the graphics overlay by 1920x1080x60hzx32bpp = ~500MB/sec. While playing the graphics overlay is either 100% transparent, or there are subtitles in the bottom of the screen. Implement a hardware mechanism that checks graphics overlay every one second; and by partitioning it and crc32 (by hardware engine) each part adjust the starting and ending point of the graphics overlay. This should drastically lower the LCD graphics overlay refresh.
 * 22) Look into gimli's native VMeta decoder implementation in his reworked marvell-dove tree to use as an alternative to GStreamer => https://github.com/huceke/xbmc/commits/marvell-dove
 * 23) Utilize CESA co-processor cryptographic engine (TrustZone on CuBox) for hardware acceleration encryption / decryption crypto and ciphers calculations tasks such as SSL, SCP, SSH, AES, DES, 3DES, SHA-1, MD5, hashes, dm-crypt, luks, etc. (such as OpenSSL and OpenSSH via CryptoDev to offload cryptographic tasks from CPU and therefore every dependency module that XBMC utilizes which support CryptoDev) => http://www.solid-run.com/phpbb/viewtopic.php?f=9&t=634