Remove All Ads from XDA

[Q] How and where to get linaro patches for CM kernel/ROM build

6 posts
Thanks Meter: 2
By redhavoc, Junior Member on 21st January 2014, 02:57 PM
Post Reply Email Thread
I've been trying to build my own cyanogenmod 11 build using the linaro toolchains on a galaxy S (i9000), with mixed success. At the moment I can compile everything with 4.8. I would preferably like to add strict-aliasing, and the -fmodulo-sched -fmodulo-sched-allow-regmoves flags for kernel, and rom (arm/thumb) builds. If possible I would like to add the -O3 flag too, but the -fpredictive-commoning and the vectorising options definitely create segmentation faults in the compilation.

Also I hear the linaro has some library patches to improve memory operations, and maybe optimisations to other libraries. Is there a link or tutorial or a list of what I need to get in order to get a successful build with most optimisations in?

Last, is there a nice reliable way to test a ROM rather than put it in my phone all the time. I usually appaly it to my phone and restoring can be very difficult.

For people who are looking for similar information and to point what I have done so far is the following. (Unfortunately XDA forum does not allow me to post links yet) I put in a quote to differentiate.


mkdir ~/android
cd ~/android

Download the latest linaro gcc 4.8
Google 'linaro downloads 13.12' and find in the page the links for android-toolchain 4.8
[i]tar -xjf android-toolchain-eabi-4.8-2013.12-x86.tar.bz2
mv android-toolchain-eabi android-toolchain-eabi-4.8

Follow the cyanogenmod wiki up the point of running the 'lunch <device command>'
Google 'How to Build CyanogenMod for the Galaxy S galaxysmtd' to get the link (XDA does not let me post it)
It is for galaxy S i9000 but every other device should be similar

After that there were a couple of choices, but what I prefer is doing the following
in the directory ~/android/system//prebuilts/gcc/linux-x86/arm
I run the following commands to link the linaro gcc tools to the default gcc-4.8 toolchain used by cyanogenmod
ln -s ~/android/android-toolchain-eabi-4.8 arm-eabi-4.8
ln -s ~/android/android-toolchain-eabi-4.8 arm-linux-androideabi-4.8

changed flags in ~/android/system/build/core/combo/
change variable TARGET_GCC_VERSION from "4.7" to "4.8"

in file ~/android/system/system/vold/
for variable common_cflags
add the flag -Wno-error=unused-parameter
so it should look like
common_cflags += -Werror -Wno-error=unused-parameter

in file ~/android/system/bootable/recovery/voldclient/
for variable LOCAL_CFLAGS
add the flag -Wno-error=unused-parameter
it should look like
LOCAL_CFLAGS := -DMINIVOLD -Werror -Wno-error=unused-parameter

then to finish the build
brunch galaxysmtd

I would really appreciate some help, and hope my post helps some newbies like me
29th January 2014, 12:29 PM |#2  
OP Junior Member
Thanks Meter: 2
Anybody has anything to add?
4th February 2014, 10:05 PM |#3  
SetiroN's Avatar
Senior Member
Thanks Meter: 293
Donate to Me
Take a look at this thread:

With an obvious degree of uncertainty, everything should work on CM11 and your device as well: all those patches aren't device specific, they mostly allow you to avoid aliasing issues (such as switching from SLUB to SLAB or selectively use fno-strict-aliasing within certain problematic areas) or fix small things that are still largely identical between different android releases and devices.
I would suggest doing the patching manually, cherry-picking one by one, instead of creating a script - so that you can more easily detect conflicts.
The Following User Says Thank You to SetiroN For This Useful Post: [ View ] Gift SetiroN Ad-Free
5th February 2014, 03:23 PM |#4  
OP Junior Member
Thanks Meter: 2
I actually took the same path as provided in the thread for enabling strict aliasing for thumb compilations. At the moment I dont have a solution for the kernel, but I will take a look on the sony kernel provided in the thread and maybe it can guide me through.

It would still be nice to know more about these magical linaro patches, haven't been able to find anything solid other than people mentioning that they have builds with them.

Thank you for the answer, really appreciate it
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes