Posts Tagged ‘quantal’

Ubuntu Linaro 12.11 with 2D/3D Mali-400 GPU Acceleration on ODROID-X Development Board

February 19th, 2013 36 comments

A few days ago, Hardkernel released the first version of Ubuntu 12.11 (Linaro) with Mali-400 GPU support for their ODROID boards (ODROID-X/X2, ODROID-U/U2). This is still WIP (Work in Progress), but this is one of the few boards together with Pandaboard, Origen and Snowball that can support 2D/3D GPU acceleration in Ubuntu Quantal. Since I have an ODROID-X development board, I decided to give it a try. There are different ways to install it. I chose the way that is most convenient for me (LCD display instead of HDMI), and likely to yield more performance (eMMC instead of SD Card). The current installation instructions to eMMC are extremely cumbersome and you have to go through 5 main steps:

  1. Install Android (yes, seriously) in the eMMC
  2. Install Ubuntu in the SD Card
  3. Install Ubuntu to the eMMC
  4. Upgrade Ubuntu to the latest version
  5. Install the Mali drivers

In this post I’m going to go through all those steps, and do some testing for eMMC and 2D/3D performance. If you just want to boot Ubuntu from SD, simply skip steps 1 and 3. For eMMC installation, I followed the “eMMC Ubuntu” guide on odroid forums, as well as the instructions on the release post to install Mali drivers, and enable 2D/3D acceleration in Ubuntu. Similar instructions are also available for ODROID-X2 and ODROID-U2.

You’ll need an 8GB SD Card or greater to complete all the steps.

Installing Android to ODROID-X

  • Insert the SD card in a Linux PC, and find your SD card device:

  • Download & extract the Android Installer, and write it to your SD card with dd or script:

If you use Windows, do it with Win32DiskImager. Back in the times when I still used Windows and Win32DiskImager, I never had problems myself, but some people apparently have, and Hardkernel released an improved version of Win32DiskImager to verify the copy.

Then insert the SD card in your ODroid-X board, connect a Jumper on SD/MMC connector (JP2) to boot from SD card, and install the latest version of Android. During installation I had no display on the 10″ LCD display, and the board simply powered itself off after a while. Not sure this is normal, but after removing the Jumper, I could boot to Android (3-Jan-2013 build) from the eMMC.

Installing Ubuntu 12.11 for ODROID-X to the SD card

Now take the SD card back to your Linux computer to copy the Ubuntu image:

  • For LCD display:

  • For HDMI Display:

I’ll carry on with the LCD image since this is what I use, but the step for HDMI are the same, just replace the filename:

Inset the SD card in ODroid-X board, insert the Jumper in JP2 to boot from SD card to verify Ubuntu 12.10 boots correctly.

Install Ubuntu to ODROID-X eMMC Module

Once you’ve verified Ubuntu boots correctly from the SD Card, put the SD card back in your PC and copy odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz to the rootfs. In my PC running Ubuntu 12.04, it will automount it to /media/rootfs:

Once umount is successfully (which means the data is fully written to the SD card), you can insert it back into your ODroid-X board to install Ubuntu 12.10 to your eMMC. First locate your eMMC device with:

The eMMC is the device with with boot0/boot1, as well as p1/p2/p3/p4. In my case, it’s mmcblk0. Once you know this, copy Ubuntu to the eMMC by using the following command in a terminal:

Once sync is complete, power off the board, remove the Jumper on JP2, and start Ubuntu.

Ubuntu Quantal in ODROID-X Board

Ubuntu Quantal in ODROID-X Board

Upgrading Ubuntu (15 Feb)

Before we can use Mali-400MP4 GPU in Ubuntu, you must install an update for Ubuntu (Feb 15, 2013):

If you are using the Wi-Fi module from Hardkernel (and probably others), run those 2 commands:

Installing Mali Drivers for ODROID-X Board

Mali-400MP4 drivers are not included in the image, most probably for legal reasons, and you have to accept an End-User-License-Agreement (EULA) during installation (dkpg). Let’s do this:

If you are outputting to an HDMI monitor, the installation should be complete at this stage. In my case I could only the 4 tux and nothing else showed up on the display. I could however access the command line via the serial console. After further reading, I found out I had to modify /usr/share/X11/xorg.conf.d/99-hkl_mali.conf to make it work with the LCD display as follows:

Ubuntu Linaro 12.11 Performance in ODROID-X

The first thing I’ve noticed is that Ubuntu feel snappy with this hardware, at least snappier than in my Atom netbook running Ubuntu 12.04, and it’s the first time I could see myself using this platform as a desktop replacement. Booting from power off takes 15 to 20 seconds. There are still some issues though. Once of them is that software-center is not working when run from the eMMC (SD card is OK). Even though this post is mainly about GPU support, I’ve compared startup times from eMMC and SD card with Libreoffice Writer, Software Center, and Firefox

Libreoffice Writer was not pre-installed, so I installed it first:

Firefox Software Center Libreoffice Writer
SD Card 5s 18s 11s
eMMC 3s Does not start 5s

Each program was started after a reboot. We can notice there’s a significant advantage of using eMMC instead of SD card when it comes to startup time.

I’ve also done several 2D/3D tests.

I started with es2gears, which comes in the provided Ubuntu image:

EGL_VERSION = 1.4 Linux-r3p2-01rel0
vertex shader info:
fragment shader info:
483 frames in 5.0 seconds = 96.561 FPS
427 frames in 5.0 seconds = 85.230 FPS
395 frames in 5.0 seconds = 78.827 FPS
394 frames in 5.0 seconds = 78.580 FPS
379 frames in 5.0 seconds = 75.664 FPS
373 frames in 5.0 seconds = 74.570 FPS
363 frames in 5.0 seconds = 72.585 FPS
352 frames in 5.0 seconds = 70.245 FPS
332 frames in 5.0 seconds = 66.387 FPS
317 frames in 5.0 seconds = 63.273 FPS
297 frames in 5.0 seconds = 59.341 FPS
298 frames in 5.0 seconds = 59.469 FPS
279 frames in 5.0 seconds = 55.722 FPS
280 frames in 5.0 seconds = 55.855 FPS
263 frames in 5.0 seconds = 52.505 FPS
260 frames in 5.0 seconds = 51.875 FPS
251 frames in 5.0 seconds = 50.090 FPS
237 frames in 5.0 seconds = 47.230 FPS

It appears to work, but the window background is transparent, and although the frame rate starts at 96.651, it just decreases which each iteration… Not sure what that means…

I’ve also installed glmark2-es2

sudo apt-get install glmark2-es2

glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board

glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board

run it, and got a score of 54:

[email protected]:~$ glmark2-es2
glmark2 2012.08
OpenGL Information
GL_RENDERER:   Mali-400 MP
GL_VERSION:    OpenGL ES 2.0
[build] use-vbo=false: FPS: 52 FrameTime: 19.231 ms
[build] use-vbo=true: FPS: 54 FrameTime: 18.519 ms
[texture] texture-filter=nearest: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=linear: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=mipmap: FPS: 57 FrameTime: 17.544 ms
[shading] shading=gouraud: FPS: 57 FrameTime: 17.544 ms
[shading] shading=blinn-phong-inf: FPS: 57 FrameTime: 17.544 ms
[shading] shading=phong: FPS: 54 FrameTime: 18.519 ms
[bump] bump-render=high-poly: FPS: 46 FrameTime: 21.739 ms
[bump] bump-render=normals: FPS: 58 FrameTime: 17.241 ms
[bump] bump-render=height: FPS: 57 FrameTime: 17.544 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 56 FrameTime: 17.857 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 56 FrameTime: 17.857 ms
[pulsar] light=false:quads=5:texture=false: FPS: 58 FrameTime: 17.241 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 40 FrameTime: 25.000 ms
[desktop] effect=shadow:windows=4: FPS: 53 FrameTime: 18.868 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 37 FrameTime: 27.027 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[ideas] speed=duration: FPS: 53 FrameTime: 18.868 ms
[jellyfish] <default>: FPS: 56 FrameTime: 17.857 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 58 FrameTime: 17.241 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
glmark2 Score: 54

Some test failed. I’m not sure if it’s because those are not implemented yet, or simply not supported by Mali-400. One interesting point is that ODROID-U2 users reports that Xubuntu is twice as fast as Ubuntu in glmark2-es2, and the culprits appear to be Unity and Compiz.

I’ve done another test to check whether WebGL would work, and I’ve got between 0 to 1 fps on both Firefox and Chromium with WebGL Aquarium. A final comment, since many people still seem to be confused with GPU and video decoding. The Mali-400 does not handle video decoding, this is done normally done by the Video Processing Unit (VPU), and AFAIK this is not currently supported in Linux on ODROID boards.

Linaro 13.01 Release with Linux Kernel 3.8 and Android 4.2.1

February 1st, 2013 2 comments

Linaro has just announced release 13.01 which includes Linux Kernel 3.8-rc4 and Android 4.2.1.

A lot of work seems to have gone in Arndale board and OpenEmbedded ARMv8. It’s the first time an Ubuntu image is released for Arndale Cortex A15 development board. One the kernel side some Android upstreaming work has been done, as well as some fixes for eMMC, and code for ST Ericsson Novathor 8500 SoC has been reorganized. Version 14 of the big.LITTLE MP (Multi Processing) has been released. The LEG has done further work on Linaro UEFI and GRUB.

Here are the highlights of this release:

  • Android
    • Platform Work
      • The first step of the android-build front-end update for new build program has been landed.
      • Origen and Versatile Express manifests have been consolidated into a single manifest.
      • linaro-android-tools were developed to improve development time for kernel developers. See Kernel Update Tools for details.
      • The android-build scripts have been cleaned up and should work from Ubuntu 10.04 and work for restricted builds as well.
      • busybox was upgraded to 1.21
    • Enablement
      • Audio Playback for panda is fixed.
      • External sdcard issue on pandaboard and origen quad was fixed.
    • LAVA/Testing
      • Third party benchmark suite is updated to use the uiautomator testing framework.
  • Developer Platform
    • CI bring up: Arndale
      • Add binary pre-bootloader package for Arndale (BL1)
      • Include Arndale support into Linaro U-Boot
      • Update u-boot-linaro source package to build a binary package for Arndale
      • Update edk2-uefi source package to build a binary package for Arndale
      • Pulls Arndale support into Linux Linaro
      • Add linaro-image-tools support for Arndale
      • Add package-and-publish linux linaro CI job for Arndale
      • Add hwpack configurations for Arndale
      • Setup CI job for Arndale hwpack daily builds
      • Create a pre-built image for Arndale
    • Enable 64-bit HipHop VM development in OpenEmbedded
      • Build dwarfutils, libmcrypt, libmemcached, memcached, onig, google-glog and libevent 1.4.14b with Facebook patch
      • Mark libdwarf and libunwind and google-perftools as optional (JIT requirement)
      • Create meta-toolchain-hhvm
    • Porting userspace applications for ARMv8: fuse ,libaio, xserver-xorg, cmake, nspr …
    • Merge ARMv8 support into OpenEmbedded
      • Merged slang, libffi, libart-lgpl, ghostscript, cmake, linux-libc-headers, libav, oprofile, python-numpy, xserver-xorg, gmp, attr, libaio, fuse and nspr changes into OE (and upstream if applicable)
    • Create Toolchain validation setup
      • Add options to jenkins-setup scripts to pass architecture and GCC version
      • Add ARMv7a gcc-4.7 and gcc-4.6 LAMP builds to
      • Update CI jobs publishing to
      • Merge changes in toolchain-layer
    • Linux Linaro 3.8-rc4 2013.01 released
      • Based off linux-linaro-core-tracking tree, llct-20130123.0 tag
        • Based off v3.8-rc4
        • Updated linaro-android-3.8 topic by John Stultz
        • Gator version 5.13
        • big.LITTLE MP version master-v14
        • eMMC patches from Kernel WG
      • Updated Versatile Express patches from ARM LT
      • Updated patches from Samsung LT: Arndale support added
      • Ethernet fixes for Snowball: ethernet works OK now
      • A patch to enable perf in Android by Bernhard Rosenkraenzer
      • Ashmem patch by Serban Constantinescu
      • VExpress64 support (both RTSM and Foundation models)
    • Linaro U-Boot 2013.01.1 released
      • LP #1103004 [Arndale] u-boot-linaro lacks pxeboot support
    • OpenEmbedded ARMv8 build has been updated
      • Toolchain updated to Linaro GCC 4.7 2013.01
      • Kernel updated to Linux Linaro 3.8-rc4
      • Various bug fixes
  • Graphics
  • Infrastructure
  • Kernel
    • Android upstreaming
      • Mempressure cgroup got an lwn article:
      • keyreset work got an initial patch queued with the input driver for 3.9
      • alarm-dev compat_ioctl support for 32-app on 64bit-kernel is queued for 3.9
      • First pass implementation of extended ashmem unit test completed
      • ashmem compat_ioctl support reworked to include feedback from lkml
    • ux500
      • conversion to common clock got several patchsets merged upstream by Torvalds
      • now uses sparse IRQs and accepted in ARM SoC
    • EHCI refactoring separated mxc, spear, orion and tegra host controller driver from ehci-hcd into its own driver modules
    • Research impact on kernel size for multi-platform configs
      • Gather kernel image and runtime size data for i.MX platform with multiplatform config support
    • AB8500 GPIO shape-up
    • Android upstreaming: Ashmem
      • Review Minchan’s v5 vma based approach
    • Android keyreset driver upstreaming
    • Android upstreaming: Lowmem
      • Anton sent out non RFC version of mempressure cgroup patchset, got ack from Kirill A. Shutemov
      • Anton’s work was written up in an lwn article
    • Depopulate the ux500 and plat-nomadik <mach/*> and <plat/*>
    • Refactor USB Host Drivers
      • Write Orine host controller driver to separate from ehci-hcd host code into its own driver module
    • Android alarm-dev compat_ioctl support
    • Refactor EHCI controller code
      • Separate the mxc,spear,orion and tegra host controller driver from ehci-hcd into its own driver modules
    • Improve eMMC Power Management Support
      • Prepare patches for fixup I/O voltage switch in protocol layer
      • Prepare patches for adapt sdhci host driver to new sequence for how I/O voltage switch is done
    • Support for EMMC 4.5 and UFS
      • Submit /integrate patches for fixing Power Off Notify issues
  • Power Management
    • Integration tree to bring together big.LITTLE MP related work (V14 branch)
    • DVFS for the Common Clock Framework
      • improve re-parenting in clk_set_rate
      • create new clk-next branch based on 3.8-rcN
      • brainstorm alternative locking mechanism
    • Thermal framework enhancements for non-ACPI platforms
      • Get feedback from thermal tests PM-QA for all platforms and enable by default in LAVA
    • sched: modify timer and workqueue framework to allow migration
      • Get patches reviewed and accepted in mainline
      • Analyse users of workqueue subsystem to check which drivers would break by migrating work to other cpus, total of 1200 drivers found
      • Implement queue_work_on_any_cpu() type interfaces
    • Upstream stericsson u8500 suspend driver
      • Get clear the kernel requirements/constrains about suspend codes
      • Check the issue of rtc alarm doesn’t work
    • cpuidle: testsuite in PM-QA
      • Understand the existing tests
    • Upstream stericsson ab8500 thermal driver using new thermal framework
      • Keep reviewing and tracking patches for new thermal framework
      • Send out patches for upstreaming
    • Linaro PM QA 0.4.0 released
  • Toolchain
    • Linaro GCC 4.7 2013.01 released, based off GCC 4.7.2+svn194772
      • Includes arm/aarch64-4.7-branch up to svn revision 194808
      • Support for the rev16 and revsh instructions
      • A15 Neon pipeline backported from trunk
      • FMA intrinsic backported from trunk
      • Better extending core to NEON transfers
      • Fused multiply-add support
    • Linaro GCC 4.6 2013.01 released, based off GCC 4.6.3+svn194771
    • AArch64 Boehm GC port upstreamed
    • Multimedia filters in WebP submitted for upstream approval.
    • Linaro Toolchain Binaries 2013.01 released, updated to latest Linaro GCC 4.7 2013.01
  • LAVA
    • Filters now support a “compare” feature that allows comparing the results of two different jobs.
    • Filters results can now be downloaded as JSON data so people can generate their own custom reports.
    • Galaxy Nexus support added
    • pre-built CI images converted to use lava-test-shell
  • LEG
    • Linaro UEFI 2013.01 released. Highlights include fixes for native building of UEFI on ARM platforms and improvements to flashing images on Arndale boards.
      • add parameters and defaults
      • panda: Enable native building for Pandaboard
      • LP #1091447 UEFI: A9 crashes on boot with ATAGS
    • Linaro GRUB 2013.01 released.
      • Merge in latest upstream changes, including nested function removal.
      • Add cache line size probing for clean/invalidate operations
      • Fix a bug in D-cache clean operation.
      • Made code, especially Linux loader, more generic.

Visit for a list of known issues and further release details about the LEB, Android, Kernel, Graphics, Landing Team,  Platform, Power management and Toolchain (GCC / Qemu) components.