Sunday 25 January 2015

RK3288 - Firefly development board

I received this board just over a month ago from the Firefly team and have been keen to assess it development capabilities given its hosts a quad core Cortex A17 (or technically a Cortex A12) processor. 


On board is a Rockchip RK3288 processor which on initial glance has a pretty decent specification:

  1. 4Kx2K H.264/H.265(10-bit) video decoder
  2. 1080p H.264 video encoder
  3. Up to 3840X2160 display resolution
  4. 4Kx2K@60fpsHDMI2.0
  5. eDP 4Kx2K@30fps
  6. According to Rockchip the GPU core is listed as a Mali-T764 GPU although it's reported as a Mali-T760 by the Mali drivers.
  7. Ethernet Controller Supporting 10/100/1000-Mbps 

Given the above I think it is import to clarify what 4Kx2K actually means and the clue is in point 3. Having spent many hours debugging the kernel driver display code it turns out the RK3288 has 2 display controllers know as VOP_BIG and VOP_LIT (I presume for little). VOP_BIG support a maximum resolution of 3840x2160 which equates to 4K UHD (Ultra high definition television) and for VOP_LIT its 2560x1600 (WQXGA). Each controller can be bound to a display interface eg HDMI, LVDS or eDP (sadly missing on the firefly).  If you define 4Kx2K as 4096x2160 also know as DCI 4K then the definitions can be misleading. The numbers also align with H264/VP8/MVC decoding which max at 2160p@24fps (3840x2160), although the HEVC(H265) decoder contradicts this by  supporting 4k@60FPS (4096x2304). What is also interesting is the image processing engine can up scale to 3x input, which would imply 720p can be up scaled to 4K UHD.

The Firefly seems to be based on a Android TV box reference design and it could be argued that its targeted as an Android centric development board. The noticeable peripherals are:

1. VGA support + HDMI
2. On board microphone
3. Wifi Connector (RF Connector SMA Female)
4. IR Sensor
5. eMMC 16Gb

Firefly supply a pre-built dual boot image (on eMMC) that offers Android 4.4
and Ubuntu 14.04.

Android 4.4


Firefly supply the Android SDK sources so that customised images can be built from source. What is nice is that the Android Studio integrates well with the Firefly which eases development of Android Apps especially for newcomers. Furthermore the App can be remote debugged while running on the Firefly. I  suggest that you sign your App with the platform key from the SDK to ease integration when remote debugging. One pitfall to bear in mind is that Android 4.4 implements selinux so you may find accessing I/O via sysfs (eg GPIO) from your Android App is severely restricted. 

Ubuntu 14.04


The Ubuntu image uses a patched version of the Android kernel and unfortunately has no support for GPU/VUP acceleration.

Linux Support


Historically many ARM SOC vendors have side stepped any request for providing meaningful Linux support and instead rely on the developer community to progress this as far as they can. Unfortunately the situation is normally exacerbated by the lack co-operation for GPU/VPU support with SOC vendor. What's clearly not recognised by ARM is that this fragmentation is clearly benefiting Intel with their latest lower power SOC's having far superior out of box Linux support.

As of today I would argue the RK3288 falls midway between no and full Linux support. The reason for this is Rockchips effort to develop a Chromebook device, if you examine the Chromium OS source tree will find numerous patches submitted from Rockchip

So the question becomes can we make use of that source tree? Well my initial aim was to get a minimal kernel booting and ideally test if GPU support was possible. The video below shows the progress made after numerous weeks of attempting to bring a workable kernel. In the video I launch Openbox under X and run es2gear,glmark-es2 and some WebGL samples in Chromium.



Although the video may seem impressive the only GPU acceleration available is through EGL/GLES hence the WebGL examples are accelerated. What is important to bear in mind is that the xf86-video-armsoc driver lacks 2D support for Rockchip therefore this still is fair amount of software rendering in X11 plus I implemented workarounds for broken code. Furthermore performance isn't particular spectacular, es2gear & glmark-es2 numbers are here. Unfortunately I haven't had the time to investigate the cause(s) however further progress may be hinder by the lack of newer Mali drivers from Rockchip/ARM.

For those of you expecting a future Rockchip Chromium OS image to work on an existing RK3288 device you may be disappointed unfortunately the hardware differences make this a slim possibility.

14 comments:

  1. Did you have a look at this ?
    http://www.volkspc.org/
    I have a UT3 which is based on RK3288 and can be ordered with 4 GByte RAM.
    http://bitkistl.blogspot.co.at/2014/12/ugoos-ut3-dual-boot.html

    ReplyDelete
    Replies
    1. I'm not convinced about volkspc/MicroXWin. Ideally the X server should use the underlying 2D api for acceleration otherwise the GPU hardware is partially redundant and its capabilities not exploited.

      Delete
  2. Did you also try xf86-video-fbturbo?
    https://github.com/ssvb/xf86-video-fbturbo
    it has nice software fallback, much much faster

    ReplyDelete
    Replies
    1. Thanks for the link. Not sure how compatible this is, because the Mali blobs don't use UMP. Furthermore we are missing the Rockchip 2D api library so can't taken advantage of that.

      Delete
    2. It is faster implementation than xf86 original module

      Delete
  3. http://community.arm.com/message/24816?et=notification.mention#24816
    fbdev version should be out this week, with the X11 version to quickly follow
    VPU support should come from Rockchip ?

    ReplyDelete
    Replies
    1. Demo of the fbdev drivers running with GLES 3.0 http://youtu.be/itEyJGhXXMs

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Cloudsto seems to have similar :
    http://www.cloudsto.com/products/linux-mini-pc-s/mk902ii-le-linux-edition-quad-core-a17-ubuntu-linux-mini-pc-16gb-flash-storage-detail.html

    and
    http://www.cloudsto.com/products/linux-mini-pc-s/embed-rk3288-android-linux-platform-detail.html

    ReplyDelete
    Replies
    1. If your trying to promote your board, then I suggest sending me a sample for review. We can determine how useful it actually is and level of BSP support!

      Delete
  6. Do you have a list what changes are needed to chromium sources to get Ethernet and frequency scaling working in kernel 3.14 on the firefly ?
    Something on Github or elsewhere to download ?
    Thank You,
    Peter

    ReplyDelete
    Replies
    1. I need to check whether I still have my source tree because I've been working on other boards in the meantime.

      Delete
  7. Chromium OS does run on this FireFly RK3288 board:

    https://www.youtube.com/watch?v=PU8megepkLw

    ReplyDelete