[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Sources :

For Xperia Phones

Download the stock sources from

http://developer.sonymobile.com/dow...s/open-source-archive-for-build-4-0-2-a-0-84/

http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/

to fix toolchain errors

I peeked into wedgess' Lupus and kast's Kappa sources

https://github.com/garwedgess/LuPuS-STOCK-ICS-Xperia2011

Toolchains :

Toolchains are the compilers (cross compilers to be exact :D ) with which kernel is compiled .

There are tooooooooo many compilers .

I can't test everyone

The best way is to go for compilers which are proven to be work

Path to the compiler .

Before compiling kernels the path to cross compiler must be exported using

export CROSS_COMPILE=path_ to_compiler

e.g.

My 4.4.3 compiler lies in

/home/user/android-ndk-r8d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin

In the folder of the toolchain the compiler is present ,all the tools are prefixed with arm-linux-android-eabi-

so the path to compiler becomes

export CROSS_COMPILE=/home/karan/xd/android-ndk-r8d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin//arm-linux-androideabi-

Some have arm-eabi- as prefix ,some have no prefixes .Adjust the path accordingly

The usual path of compiler is in bin folder .

Toolchain sources :

Source no 1 : Android NDK

http://developer.android.com/tools/sdk/ndk/index.html

Download the one which has above 360MB of download size ...I have the older version and it has 4.4.3,4.6,4.7

Source no. 2 : Github of [MENTION=2784807]DooMLoRD[/MENTION] and [MENTION=4609488]wedgess[/MENTION]

https://github.com/garwedgess/toolchains

https://github.com/DooMLoRD/android_prebuilt_toolchains

Doomlord has 4.4.3,Linaro 4.6.2,4.7

Wedgess has 4.4.3 ,Linaro 4.6.2 , Linaro 4.7.3

Use git clone command to download the toolchains

e.g

git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git

git clone https://github.com/garwedgess/toolchains.git

[MENTION=4825437]Christopher83[/MENTION]'s thread

http://xdaforums.com/showthread.php?p=36677987

He has one toolchain for every occasion . If you wish to dabble ,feel free to dive in ...

FAQ:

What Toolchain works on Stock sources ?

On pure Stock ROM ,without any modification I have been able to compile only on the 4.4.3 by DoomLord ..I would recommend using that one.It works fine on both ICS and GB stock kernels .The kernels boot fine

What should be done so that that you can compile with other toolchains ?

A:There are certain changes in the main Makefile which need to be carried out

Open the main makefile and search for

KBUILD_CFLAGS

Replace

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks

with

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-unused-but-set-variable -Wno-uninitialized \
-fno-strict-aliasing -fno-common \
-Wimplicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks

Now open

/include/linux/netfilter/x_tables.h

and delete these lines

const struct xt_match *match;
const void *matchinfo;

That should fix 4.6.2 & 4.7.3 erros

The Linaro 4.7.3 toolchain requires editing the /arch/arm/boot/compressed/Makefile.Honestly ,peek into kast's Makefile ,since I was able to compile only by applying his Makefile fix .

For others ,Please check logs and correct errors :cowboy: