maemo.org - Talk

maemo.org - Talk (http://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (http://talk.maemo.org/forumdisplay.php?f=40)
-   -   [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900 (http://talk.maemo.org/showthread.php?t=84829)

freemangordon 06-11-2012 01:14 PM

[ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
WHAT IS THIS?

Cortex-A8 SoC we have in our devices supports several ISAs (Instruction Set Architecture):

- ARM
- Thumb
- Thumb2
- ThumbEE
- ...

Stock Fremantle, all CSSU flavors and all of the software in repos (excluding some like FB sharing plugin compiled by mistake with Thumb2 ISA) 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.

Thumb2 is another instruction set, which have 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 researches 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). Will explain how that benefit us later.

The logical question:

Why then Nokia didn't compile Fremantle using Thumb2 ISA?

The answer - the SoC revision inside n900 has silicon erratas (i.e. bugs in the hardware) which render Thumb2 compiled binaries unstable if no countermeasures are taken. A system without fixes for the erratas crashes randomly, not only in Thumb2 compiled executables/libraries, but in ordinary ARM ones too.

The countermeasures:

There are two erratas that must be workaroundеd on n900 in order Thumb2 compiled binaries to not lead to system instability: ARM errata 430973 and ARM errata 657417

The first errata(430973) is workaroundеd in kernel, CSSU-thumb repo contains a special kernel (kernel-cssu) based on top of kernel-power 51r1 which workarounds the issue. While workaround for errata 430973 is upstreamed, it does not work on n900 being the High Secure device. A special call to Secure Monitor( that is a piece of ROM in our SoC programed by Texas Instruments during chip manufacture) is needed to properly enable the workaround, and that is handled in kernel-cssu.

The second errata (657417) is workarounded in linker, all binaries in CSSU-thumb repo are compiled using Linaro gcc 4.7.2 and binutils 2.22.

What is the benefit?

Well, we all know that the major performance bottleneck on n900 is the amount (or better said the lack) of RAM. Constantly swapping pages in and out of memory leads to stutter, lag, etc..., you know ;) . A 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. In addition - smaller code means better code cache usage, less reading from the storage (faster application start times), etc.

With packages that are so far in CSSU-thumb repo, the code size is reduced with approximately 35MiB, more RAM and storage space will be regained in the future when more packages will be included

The catch:

errata 430973 is workarounded 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 my "ordinary user" POV, there is no visible performance loss.

How to install it?

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

Using microb on your n900 click here and follow the instructions on http://wiki.maemo.org/Community_SSU, section Installation, from step 5 on (Hildon Application Manager (HAM) will launch...). 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 included in kernel-power v51r1 (and above)

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.

USUAL WARNINGS:

This is still in highly experimental 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 repo. It is highly unlikely to happen, but be prepared to reflash if something goes south. Make a full backup of your data/settings/whatever before installing stuff from CSSU-thumb repo

You've been warned :P

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
- added new packages: xserver-xomap, xserver-xorg-core
- fixed a bug in the kernel : Clear the IT state when invoking a Thumb-2 signal handler http://git.et.redhat.com/?p=kernel-k...62e8de4406ac7e

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

Wreck 06-11-2012 01:27 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Looks very promising. Good work.
Uninstalling can be done just trough HAM again and deleting the repo?

freemangordon 06-11-2012 01:36 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Quote:

Originally Posted by Wreck (Post 1220599)
Looks very promising. Good work.
Uninstalling can be done just trough HAM again and deleting the repo?

The same rules apply as for CSSU in general - no uninstallation, only a reflash. Will update the OP accordingly, thanks

sifo 06-11-2012 01:56 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Nice and clean im gonna do it now and test it many thanks :)

fw190 06-11-2012 02:00 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Just instaled, as I switched to Samsung Solid B2710 ;) I can test and flash the N900 ans often as requested. My system wasn't clean and I had a few problems.When launching the CSSU about and trying to scroll the setings closed automatically also when trying to search the HAM for conky the phone got stuck and I had to reboot. I will try to flash the phone clean and report then.

Alfred 06-11-2012 02:38 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
i need to reflash the phone soon anyway, and i'll test it later after it works with kp-settings.

ramesh.kumar 06-11-2012 02:46 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Thanks for this new update. :)

I installed it just now for testing. I am constantly getting rebooted as soon as it gets to the desktop. Do you have any suggestions? :(

freemangordon 06-11-2012 02:56 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Quote:

Originally Posted by ramesh.kumar (Post 1220638)
Thanks for this new update. :)

I installed it just now for testing. I am constantly getting rebooted as soon as it gets to the desktop. Do you have any suggestions? :(

Which kernel does it boot?

ramesh.kumar 06-11-2012 02:59 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Quote:

Originally Posted by freemangordon (Post 1220641)
Which kernel does it boot?

I had the stock kernel with CSSU Testing. Did not have KP.

freemangordon 06-11-2012 03:00 PM

Re: [ANNOUNCE] CSSU-thumb thread - stable Thumb2 on N900
 
Guys, hold on for a while, for some reason the needed kernel is not flashed, gimme some time to check what's wrong, will make a new post when the problem is solved


All times are GMT -4. The time now is 08:31 PM.

vBulletin® Version 3.8.7