Gentoo on a Pandora


This article describes a Gentoo rootfs archive customized for the Pandora handheld device.

This article and all information and products in it are provided on an "as is" basis, without warranty of any kind, either express or implied. Your use of this article is at your own risk.

What is configured

  • All packages are recompiled with OMAP3-preferable flags.
  • Added the Pandora keyboard layout. It’s a bit different from the official layout. Here‘s what it looks like.
  • WiFi network. There is one annoying bug in the wl1251 modules described here. Fixed in a quite brutal way.
  • The kernel is compiled with appropriate patches and config. The tarball contains both the kernel sources and the config file in /usr/src/linux.
  • X.Org with all the relevant drivers: omapfb, keyboard (including DPad and power switch), touchscreen, nubs, external keyboard and mouse.
  • OpenBox (a window manager). The key shortcuts include these two:
    • Pandora_key shows menu
    • Fn+Pandora_key shows status information
  • Added few Pandora-related scripts: to control brightness, to change CPU clock, to reset nub, to emulate low power mode, etc.
  • Added few eyecandies: wallpaper, cursor and themes.
  • Locale is set to ru_RU.UTF-8.
  • Timezone is set to GMT +3 (Moscow).
  • The maximum CPU OPP is set to 5 by default.
  • The default user is vminko, no password. The root password is 1.

What packages are installed

Here is the full list of installed packages (equery l). It includes the following ones:

vim urxvt midori pidgin sylpheed gftp mpd gimmix mplayer gpicview xournal stardict
epdfview xrick supertux numptyphysics

The local overlay includes the following packages:

  • games-action/openlierox – Differs from the default package in that the cursor drifting is fixed.
  • games-arcade/supertux – Differs from the default package in that 800×480 resolution support is added.
  • games-arcade/xrick – Differs from the default package in that joystick support is added, incorrect fullscreen mode and freezing on exit are fixed. See this bug for details.
  • games-puzzle/numptyphysics – A drawing puzzle game (new package).
  • media-video/mplayer – An mplayer package based on the source code from the Maemo repository. It works much better than the default one: plays everything (mp4/theora-vorbis/h264/flv) and does not crash.
  • media-video/omap3-sgx-modules – Kernel drivers for the PowerVR SGX chipset (new package).
  • net-wireless/pandora-firmware – Binary firmware for the Bluetooth and WiFi modules on the Pandora (new package).
  • net-wireless/wl1251-modules – Kernel drivers for the TI WL1251 WiFi chip found on the Pandora (new package).
  • sys-kernel/pandora-sources – Pandora kernel sources (new package).
  • sys-process/procps – Differs from the default package in that the annoying ‘Unknown HZ value!’ error is fixed. See this bug for details.
  • x11-base/xorg-drivers – Differs from the default package in that the omapfb video driver is added.
  • x11-drivers/xf86-video-omapfb – X.Org driver for TI OMAP framebuffers (new package).

What does not work

DSP since it requires the kernel version 2.6.32+, but we’re currently stuck at 2.6.27.

PowerVR chip since the only driver we have is closed source and I decided not to use it. However, the appropriate ebuilds are available here.

How to install

  1. Download the rootfs tarball: gentoo-rootfs-20110115.tar.bz2 (317 Mb).
  2. Format the first partition of your SD card as ext2. The SD card capacity should be at least 4Gb.
  3. Extract the rootfs to this partition (tar xvpf gentoo-rootfs-20110115.tar.bz2 -C /mnt/<your-mnt-dir>).
  4. Insert the SD card into the Pandora and reboot the machine.

/usr/portage is removed from the tarball in order to reduce its size. The latest portage snapshot is available here (37 Mb).

Useful links

  • If you are not familiar with the distribution, you may want find this helpful: Gentoo ARM handbook.
  • Here is a video demonstration of Gentoo running on the Pandora.
  • Neuvoo – a project focused on adaptation of the Gentoo to various OMAP3-based platforms including Pandora.


Cortex-A8 vs Coppermine

Samples description

I made a few benchmarks of two devices:

  1. The Pandora device (based on OMAP3530).
  2. A PC with 256 Mb SDR RAM and one of the following CPUs: Pentium 3 and

Both systems used the same gcc-4.4.3 and glibc-2.11.2.
Whole systems were compiled with the following flags:

PC flags:

CFLAGS="-O2 -march=native -pipe"

Global USE includes sse and mmxю ffmpeg’s use uncludes mmxext.

OMAP flags:

CFLAGS="-O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -fomit-frame-pointer"

OMAP’s DSP was not used.


  • OMAP@600 is OMAP3530 running at 600Mhz (default for Pandora).
  • OMAP@850 is OMAP3530 overclocked to 850Mhz.
  • P3@600/133 is Pentium 3 EB (the Coppermine core) running at 600 Mhz (FSB clocked at 133Mhz).
  • Cel@600/66 is Celeron (the Coppermine-128 core) running at 600 Mhz (FSB clocked at 66Mhz).


I want to emphasize that it is not a performance benchmark, because compilation is done for different architectures (ARM and x86). It is a benchmark of one particular task, which is essential for gentoo users.

package OMAP@600 OMAP@850 P3@600/133 Cel@600/66
binutils-2.20.1, m:s 37:50 28:45 20:06 28:23
glibc-2.11.2, m:s 177:27 138:19 104:09 145:16

OMAP3530 overclocked to 850 Mhz is very close to Celeron running at 600 Mhz.


Nbench is a synthetic performance test.

The used version: nbench-2.2.3-r1

index OMAP@600 OMAP@850 P3@600/133 Cel@600/66
memory 3.040 4.364 2.811 2.745
integer 3.073 4.365 2.761 2.751
floating-point 0.533 0.761 5.477 5.268

Nbench does not show any difference between Pentium 3 and Celeron, which is strange.


MPlayer was used to measure video decoding time.
The used version: mplayer-1.0_rc4_p20091026-r1
Command line:

mplayer -benchmark -vo null -nosound input_file

Input files: Big Buck Bunny at 480p in MPEG4, H.264 and Theora/Vorbis.

codec OMAP@600 OMAP@850 P3@600/133 Cel@600/66
FFmpeg H.264, s 546.3 409.5 221.1 369.9
FFmpeg MSMPEG-4, s 175.3 128.1 98.4 130.2
Theora, s 497.9 367.8 256.2 322.7


FFmpeg was used for encoding MPEG4 to Theora/Vorbis.
The used version: ffmpeg-0.5_p20373
Command line:

time ffmpeg -i input_file.avi -vcodec libtheora -acodec libvorbis \
-vb 1024k -s 640:360 output_file.ogv

Input files: Big Buck Bunny, Sintel trailer.

movie OMAP@600 OMAP@850 P3@600/133 Cel@600/66
big buck bunny, m:s 143:21 102:38 43:45 47:51
sintel trailer, m:s 13:39 9:48 3:59 4:30


The used tools: bzip2-1.0.5-r1, gzip-1.4
Command lines:

time bzip2 big_buck_bunny_480p_stereo.avi
time gzip big_buck_bunny_480p_stereo.avi

Input files: big_buck_bunny_480p_stereo.avi

compressor OMAP@600 OMAP@850 P3@600/133 Cel@600/66
bzip2, m:s 6:48 5:17 6:08 7:45
gzip, m:s 1:55 1:39 0:53 1:42


The used tools: coreutils-8.5
Command lines:

time md5 big_buck_bunny_480p_stereo.avi
time sha256 big_buck_bunny_480p_stereo.avi
time sha512 big_buck_bunny_480p_stereo.avi

Input files: big_buck_bunny_480p_stereo.avi

algorithm OMAP@600 OMAP@850 P3@600/133 Cel@600/66
md5, s 2.45 1.18 1.95 2.15
sha256, s 7.20 5.17 8.30 8.68
sha512, m:s 1:10 0:43 0:29 0:31


The used tools: midori-0.2.6, webkit-gtk-, V8 version 5, SunSpider-0.9.

suite OMAP@600 OMAP@850 P3@600/133 Cel@600/66
V8 57.4 80.2 305 253
SunSpider, ms 23053.8 18327.0 4744.6 5520.4