Community SSU/Thumb

Contents

Introduction

Instruction Set Architecture's

The Cortex-A8 SoC we have in our N900 supports several Instruction Set Architecture's (ISA).

These include ARM, Thumb, Thumb2, ThumbEE.

As stock Fremantle, CSSU and all of the software currently in the repositories* come with binaries (i.e. executable files, libraries) compiled using ARM instruction set.

Which is the most powerful and fastest. Every ARM instruction uses exactly 4 bytes of memory.

Note:- *Facebook sharing plugin was compiled by mistake with Thumb2 ISA.

Thumb2

Thumb2 is another instruction set, which has most of the power and speed of ARM ISA, but its instructions could be 2 bytes in length instead of 4 bytes.

According to some research that can be found on internet, using Thumb2 ISA leads to reduction of code size in 30-40% without sacrificing much of the performance (some 2-5% performance decrease).

Memory Usage

We all know that the major performance bottleneck on the N900 is the size of RAM. Constantly swapping pages in and out of memory leads to stutter and lag.

Part of that RAM is used to hold the executable code, so the smaller the code is, the larger part of the RAM will be free to be used for data.

While it is a simplified explanation, you should be able to get the general idea. Smaller code means better code cache usage, less reading from the storage and therefore faster application start times.

With packages that are so far in CSSU-thumb repository, the code size is reduced by approximately 35MiB.

As more packages are included, more RAM and storage space will be regained in the future.

The Catch

The SoC revision inside our N900 has silicon erratas or put simply bugs in the hardware. These render Thumb2 compiled binaries unstable if no countermeasures are taken.

A system without fixes for the erratas, that tries to run Thumb2 binaries, crashes randomly, not only in Thumb2 compiled executables/libraries, but in ordinary ARM ones too.

The Countermeasures

There are two erratas that must be worked around on N900 in order for Thumb2 compiled binaries to not lead to system instability.

These are ARM errata 430973 and ARM errata 657417

ARM errata 430973

This is worked around in the kernel by clearing a special type of cache (Branch Target Buffer) inside the chip on every context switch made by the CPU.

In theory that slows down the system. I didn't make any benchmarks, but from current testing there is no visible performance loss.

A special call to Secure Monitor (that is a piece of ROM in our SoC programmed by Texas Instruments during chip manufacture) is needed to properly enable the workaround.

Therefore CSSU Thumb requires a kernel which has the workaround. This is provided in Kernel-CSSU or the latest version of Kernel Power

ARM errata 657417

This is worked around in the in linker, all binaries in the CSSU Thumb repository are compiled using Linaro gcc 4.7.2 and binutils 2.22.

Information on how to setup the CSSU-thumb toolchain (gcc4.7.2-linaro) in scratchbox is linked below

CSSU Thumb Toolchain Setup

Installation

Make sure Nokia and Extras catalogues are enabled in application manager.

Using MicroB on your N900 click on the link below.

CSSU Thumb Install

The installation process is the same as other CSSU Flavours

Community_SSU#Installation

CSSU-Thumb is based on CSSU-Testing flavor.

If you have kernel-power v51r1 or above, no custom kernel will be installed, as needed errata workaround is now included in kernel-power.

Uninstallation

There is no way to uninstall, i.e. the same rules apply as for the other CSSU flavors. The only way to rollback without messing with apt-get is to Reflash. Or you can downgrade all of the packages manually using apt-get.

Disclaimer

This is still in development stage and while so far there are no known issues, I will take no responsibility for any damage and/or data loss caused by using CSSU-thumb repository. It is highly unlikely to happen, but be prepared to reflash if something goes south. Make a full backup of your data and settings before installing.

Changelog

15.06.2012 - 21.2011.38-1Tmaemo4-thumb7

  • Qt libraries moved back to /opt
  • added new packages: qt-mobility, clutter, libhildonfm, osso-gnome-vfs2

16.06.2012 - 21.2011.38-1Tmaemo4-thumb9

  • added new packages: libalarm2, alarmd, libxml2

20.06.2012 - 21.2011.38-1Tmaemo4-thumb10

19.07.2012 - 21.2011.38-1Tmaemo4-thumb11

  • added new packages: microb-engine

27.07.2012 - 21.2011.38-1Tmaemo4-thumb12

  • toolchain upgrade to gcc 4.7.2
  • microb-engine - fixed HTTPS TLS error
  • Qt libraries rebuild with the new toolchain

29.07.2012 - 21.2011.38-1Tmaemo4-thumb13

  • kernel upgraded

01.08.2012 - 21.2011.38-1Tmaemo4-thumb14

  • fixed a bug in tinymail

04.09.2012 - 21.2011.38-1Tmaemo4-thumb16

  • microb-engine source code was missing some stuff from maemo.org, rebased.
  • add libcurl3 (7.26.0-1maemo1+0cssu1-thumb1) - fix for Facebook widget, photo uploader and MfE IPv6 problems

15.09.2012 - 21.2011.38-1Tmaemo5.1+thumb0

  • rebased on top of 21.2011.38-1Tmaemo5.1 CSSU-testing
  • changed versioning scheme
  • added thumb-compiled camera-ui, alarmd, hildon-application-manager, apt, modest

Because of the versioning scheme change you should follow the instructions here if upgrading from 21.2011.38-1Tmaemo4-thumb16 or older version.

23.09.2012 - 21.2011.38-1Tmaemo5.1+thumb1

  • added missing dependency (system-services (>= 0.3.8-68+0cssu0))
  • Thumb2 compiled dosfstools and openssl

25.09.2012 - 21.2011.38-1Tmaemo5.1+thumb2

  • Thumb2 compiled gdigicam and gst-plugins-bad

03.10.2012 - 21.2011.38-1Tmaemo5.1+thumb3

  • Thumb2 compiled sqlite3, gstreamer, gst-plugins-base, gst-plugins-good

03.11.2012 - 21.2011.38-1Tmaemo5.1+thumb4

  • Thumb2 compiled db4.2, pulseaudio, calendar-backend, evolution-data-server

26.12.2012 - 21.2011.38-1Tmaemo7.1+thumb0

  • packages updated to latest CSSU-testing(21.2011.38-1Tmaemo7.1)
  • Thumb2 compiled obexd, gnome-vfs-filechooser-backend, ke-recv, libmatchbox2, rtcom-eventlogger-async

06.01.2013 - 21.2011.38-1Tmaemo7.1+thumb1

  • Thumb2 compiled pango, freetype, libpng, zlib, libxml2
  • NEON-optimized upstream versions of libpng (~30% faster) and zlib (~8% faster decompression, ~18% faster compression)
  • libxml2 recompiled against latest zlib

07.01.2013 - 21.2011.38-1Tmaemo7.2+thumb0

  • packages updated to latest CSSU-testing(21.2011.38-1Tmaemo7.2) - blacklist fraudulent TURKTRUST intermediate certificates

07.04.2013 - 21.2011.38-1Tmaemo7.2+thumb1

  • pixman upgraded to upstream version 0.29
  • build microb against system libpng and zlib
  • pulseaudio, qt and hildon-desktop upgraded to latest CSSU versions on gitorious

__________________