[Defy Android Development] wskelly:
I've created a fork of Quarx's Defy CM10 repository, to build the latest version from Quarx but using the Linaro 4.7 toolchain. I encourage anyone who might stumble upon this thread to go to linaro.org and read about this non-profit organization and what they are trying to do. Note that TI is a supporting member of this non-profit org, as well as Samsung, LG, ARM, etc. All of these companies have interests in optimizing code performance on ARM architectures.

Now, Quarx has already created a couple of builds using the Linaro 12.10 toolchain. These builds are available as his November 17th and 18th builds, but there was much debate in the original CM10 thread (here) as to whether or not there was (1) any benefit from using the Linaro toolchain and (2) if the Linaro toolchain was adding instability. I think after these discussions Quarx decided to revert back to the original prebuilt Android toolchain.

I've created this build as an experiment, using the latest available (12.11) version of the Linaro toolchain.

Builds are located here:

http://goo.gl/vbAKN

Changelog:

cm-10-20121215-UNOFFICIAL-mb526.zip: First build, based roughly on Quarx 05-Dec or perhaps later; I just forked his most recent repo, then added Linaro 12.11 and made a few small changes to get it to build. (Thank you Quarx)

cm-10-20121218-UNOFFICIAL-mb526.zip: Cherry picked "Volume adjust sound preference 1" and Volume adjust sound preference 2 from ICS. (StevenHarperUK)

cm-10-20121219-UNOFFICIAL-mb526.zip: wpa_supplicant_6 switched to CyanogenMod official jellybean-stable branch. This means maniac's and Quarx's commits and changes involving AdHoc are not in this version. Trying to see if this helps wifi connectivity at my gym where the phone seems to get very confused and drops/connects to wifi many times. Wifi at my home is no issue. This version also reverts a change from Quarx that may or may not have an effect on reading NTFS cards... No idea, for testing.

cm-10-20121222-UNOFFICIAL-mb526.zip: using Linaro 2012.12. Screenshot option in long press power much enabled by default, cherry pick for screen off animation (not sure what benefit this was), more debugging statements in MediaProvider to debug NTFS issue.

cm-10-20121224-UNOFFICIAL-mb526.zip: same as above, but used Linaro optimizing compiler flags from Kayant, removed the screen off animation cherry pick.

cm

cm-10-20130104-UNOFFICIAL-mb526.zip: Switch to JellyX kernel repo from Blechd0se (thanks!), kernel built with standard gcc 4.4.3 while everything else is built with Linaro gcc 4.7. Seems to be stable overnight, I had to wipe cache/dalvik/data to get it to boot. I've rebooted it several times on purpose to check stability and it is, so far, stable.

The forked repo is located here:

https://github.com/skelliam/android

If you want to try to build this yourself, you *will* encounter build errors. One in particular with Linaro is regarding strict-aliasing. There is some discussion of this on the Linaro blog here. There are several other errors that you'll enounter, but fortuantely, Quarx has already created a script that checks out fixes for most of these.

So in general, the process will be something like this:

Move to a directory that will hold the sources. I just created a directory 'cm'.

$ mkdir cm
$ cd cm
$ repo init -u git://github.com/skelliam/android.git -b jellybean

Now you need to run Quarx's script to make the fixes required for Linaro. From the ROOT of your repository (in my case the cm subdirectory):

$ ./device/moto/jordan-common/apply_linaro.sh

Now, what the heck, try to build it. You will encounter more compile errors but it is worth it to see what I'm talking about. To build:

$ source build/envsetup.sh
$ brunch mb526

You should get a bunch of errors related to strict aliasing. To fix these, right now I've applied local changes on my repo, in the remaining makefiles responsible for the errors. Here are the changes I've made locally to get around these issues. I will try to make an update to the apply_linaro.sh script as Quarx did, it was 2 am when I did this and I just wanted to get it built. :)

Update 5-Jan-2013 I've checked in everything now, so if you use my base manifest file (from github.com/skelliam/android) you should not need to make any changes OTHER than to run the apply_linaro.sh script.