Introduction
Since the only guide I could find for switching toolchains in Android is one on linaro from a few years ago in the Galaxy nexus forum, I decided to make one and post it here. Custom toolchains can provide an overall better android experience to the end user by increasing speed, buttery smoothness, and even fixing bugs! Note: They can also produce bugs on some devices/ROMs.
Preface:
There are two mainstream custom toolchains, SaberMod and Linaro, which provide different improvements. In short, SaberMod is built for max speed, while Linaro is built for some subtle speed increases with much more smoothness.
Click for ARM info
For ARM devices, there are also 2 different toolchains used in Android; arm-linux-androideabi, which compiles the ROM, and arm-linux-eabi, which compiles the kernel. The recommended version for androideabi is 4.9, but higher should be used once the bugs are worked out/if it works for your device.
Click for AARCH64 (ARM64) info
For 64 bit ARM devices, there is one main toolchain,; aarch64-linux, which compiles both the ROM and the kernel. The recommended version is 4.9, because as of now 5.0 won't work with the kernel without heavy revision.
Switching ARM Toolchains
Step 1:
Run the following commands from your source directory to download the 4.9 toolchain for ROM and 4.9 toolchain for kernel
If using Linaro:
Code:
git clone -b linaro-4.9-arm-linux-androideabi https://github.com/ArchiDroid/Toolchain prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-linaro-4.8
Code:
git clone -b linaro-4.9-arm-linux-eabi https://github.com/ArchiDroid/Toolchain prebuilts/gcc/linux-x86/arm/arm-linux-eabi-linaro-4.9
If using SaberMod: Download from http://sabermod.com
If Using UBER
Code:
git clone https://bitbucket.org/UBERTC/arm-linux-androideabi-4.9.git prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-UB-4.8
Code:
git clone https://bitbucket.org/UBERTC/arm-eabi-4.9.git prebuilts/gcc/linux-x86/arm/arm-linux-eabi-UB-4.9
Step 2 :
Here's where things get a little tricky. Step 2 is different for different android sources. If you use a rom that has GCC Freedom, use the first method. If not, open the file in your source directory in gedit /build/core/combo/TARGET_linux-arm.mk and ctrl+f to search for "TARGET_GCC_VERSION_AND" without the quotes. If it's found, use the first method. If not, use method 2.
Method 1: To actually use the toolchains, you'll need to change a few things in /build/core/combo/TARGET_linux-arm.mk. An example of what you need to change is shown below:
Code:
ifeq ($(strip $(TARGET_GCC_VERSION_AND)),)
TARGET_GCC_VERSION_AND := SM-4.9
else
TARGET_GCC_VERSION_AND := $(TARGET_GCC_VERSION_AND)
endif
ifeq ($(strip $(TARGET_GCC_VERSION_ARM)),)
TARGET_GCC_VERSION_ARM := SM-4.9
else
TARGET_GCC_VERSION_ARM := $(TARGET_GCC_VERSION_ARM)
endif
# Specify Target Custom GCC Chains to use:
TARGET_GCC_VERSION_AND := SM-4.8
TARGET_GCC_VERSION_ARM := SM-4.9
Notice how the target versions are each listed in two places?(AND is for androideabi and ARM is eabi) Just change the versions at the bottom where it says to specify the custom toolchain to the suffix of the toolchain you chose, for example linaro-4.8 and
SM-4.9 . Save and your done!
Method 2: Open /build/envsetup.sh in gedit or another text editor and look for the following section of code:
Code:
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-$targetgccversion/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
;;
Look at the line "arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin" and change $targetgccversion to the suffix of the androideabi toolchain you downloaded in step 1, such as linaro-4.8. Now look at the lines
Code:
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-$targetgccversion/bin
and change $targetgccversion to the suffix of the eabi toolchain you downloaded in step 1, such as linaro-4.9. Save your file and you did it!
Switching AARCH64 Toolchains
Both ROM and Kernel use the same toolchain for AARCH64, so we need to clone it first.
Step 1:
Run the following commands from your source directory to download the 4.8 toolchain for ROM and 4.9 toolchain for kernel
If using Linaro:
Code:
git clone https://android.git.linaro.org/git-ro/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9-linaro.git prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9
If using SaberMod 4.9:
Code:
git clone https://github.com/SaberMod/aarch64-linux-android-4.9.git prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-SM-4.9
Step 2:
To actually use the toolchain, you'll need to change a few things in /build/core/combo/TARGET_linux-arm64.mk. An example of what you need to change is shown below:
Code:
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
TARGET_GCC_VERSION := 4.9
else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
See where TARGET_GCC_VERSION is defined as 4.9? change 4.9 to your toolchain version, SM-4.9 or linaro-4.9, to switch toolchains. Save the file and you're golden!
Congrats, you just upgraded to better toolchains! Make sure you run "make clobber && rm -rf ~/.ccache" before your next build.
More Links
I decided to add Links to all (known/published) custom toolchains available with a short description of each! Feel free to tell me if I miss any.
SaberMod Git
SaberMod aims to optimize Android as much as possible, using only the latest and fastest sources for toolchains. SaberMod also uses its own fixes and patches for graphite, ISL, and other optimizations.
Click to expand...
Click to collapse
UBERTC Git
UBER is focused on well rounded performace, starting with a GNU base, and building up smoothness, and battery by using Linaro and AOSP patches
Click to expand...
Click to collapse
Linaro (Switch to Linaro branch)
Linaro is the toolchain of Linaro Group, focussing on adding better support for ARM based targets
Click to expand...
Click to collapse
ArchiToolchain (Also under branches)
ArchiToolchain's goal is minimalism, by simply optimizing for a variety of targets.
Click to expand...
Click to collapse
Boosted TC
Little is known about boosted TC other than it was based on SM, and is likely incompatible with Lollipop (for ROMs)
Click to expand...
Click to collapse
Hyper Toolchains
Hyper Toolchains combines popular toolchains (Currently SM, Uber and Linaro) in various ways to create unique results, without a main goal.
Click to expand...
Click to collapse
Nice job! But what about Linaro 4.7?
joshuabg said:
Nice job! But what about Linaro 4.7?
Click to expand...
Click to collapse
4.7 is sooooooo last year, all the fast ROM's use 4.8
Thanks for providing steps to accomplish this not so easy task.
frap129 said:
4.7 is sooooooo last year, all the fast ROM's use 4.8
Click to expand...
Click to collapse
ok what about linaro 4.10. And yes it does exist.
REV3NT3CH said:
ok what about linaro 4.10. And yes it does exist.
Click to expand...
Click to collapse
You can use 4.9 and 4.10 for kernel build only.
Never managed to build a ROM with a toolchain above 4.8 .
If you use graphene...
Click to expand...
Click to collapse
What's graphene?
kantjer said:
REV3NT3CH said:
ok what about linaro 4.10. And yes it does exist.
Click to expand...
Click to collapse
You can use 4.9 and 4.10 for kernel build only.
Never managed to build a ROM with a toolchain above 4.8 .
Click to expand...
Click to collapse
Yep, 4.10 doesnt work with ROM's, and for kernels it can cause (somtimes) stability problems. And doesn't "exist" per say. It's not an official version of GCC. From my understanding, it's a watered down version of GCC 5.0 mixed with 4.9 because 5.0 is currently in development and doesn't work. It also doesn't provide too much of a performance boost, so I chose not to include it in the guide.
koe1974 said:
What's graphene?
Click to expand...
Click to collapse
An optimized version of Carbon (click the link labled "My source" in description
frap129 said:
Yep, 4.10 doesnt work with ROM's, and for kernels it can cause (somtimes) stability problems. And doesn't "exist" per say. It's not an official version of GCC. From my understanding, it's a watered down version of GCC 5.0 mixed with 4.9 because 5.0 is currently in development and doesn't work. It also doesn't provide too much of a performance boost, so I chose not to include it in the guide.
Click to expand...
Click to collapse
Well I know that lol...I was more so being sarcastic...I do Dev Roms and kernels but use GCC freedom as I know its creator personally....
REV3NT3CH said:
Well I know that lol...I was more so being sarcastic...I do Dev Roms and kernels but use GCC freedom as I know its creator personally....
Click to expand...
Click to collapse
You're only causing unnecessary confusion. Specifying custom prefix and proper manifest entry works far better than hardcoding ANY version right in the android_build.
REV3NT3CH said:
Well I know that lol...I was more so being sarcastic...I do Dev Roms and kernels but use GCC freedom as I know its creator personally....
Click to expand...
Click to collapse
Could you post a link to GCC Freedom? I've seen it mentioned but i havent been able to find much about it.
JustArchi said:
You're only causing unnecessary confusion. Specifying custom prefix and proper manifest entry works far better than hardcoding ANY version right in the android_build.
Click to expand...
Click to collapse
Yeah, but this is a beginer guide. It's meant for people who have started compiling ROM's and want to give it a little extra boost, and to be able to be applied to any source code with ease (and so you can have multiple toolchains incase you want to switch). People who are knowledgeable enough about android to the point where they add things to their roomservice.xml and have custom repo's probably wont need a guide. But thanks for the tip, it'll help more advanced people who read these posts, and also thanks for uploading the prebuilt linaro toolchains, It really makes it easy for everyone.
frap129 said:
Could you post a link to GCC Freedom? I've seen it mentioned but i havent been able to find much about it.
Yeah, but this is a beginer guide. It's meant for people who have started compiling ROM's and want to give it a little extra boost, and to be able to be applied to any source code with ease (and so you can have multiple toolchains incase you want to switch). People who are knowledgeable enough about android to the point where they add things to their roomservice.xml and have custom repo's probably wont need a guide. But thanks for the tip, it'll help more advanced people who read these posts, and also thanks for uploading the prebuilt linaro toolchains, It really makes it easy for everyone.
Click to expand...
Click to collapse
Yea give me a bit..I'm at work and mobile but I'll shoot you a pm....it's more so a commit on github that's universal than a how-to guide on xda
REV3NT3CH said:
Yea give me a bit..I'm at work and mobile but I'll shoot you a pm....it's more so a commit on github that's universal than a how-to guide on xda
Click to expand...
Click to collapse
Nevermind, a few minutes of highly determined google searching found the commit. Thanks anyways.
@frap129 : Are you planning on adding/talking about flags ? And Archi's too ?
frap129 said:
Nevermind, a few minutes of highly determined google searching found the commit. Thanks anyways.
Click to expand...
Click to collapse
Your welcome...the one I use is the direct commit from @IAmTheOneTheyCallNeo
bud77 said:
@frap129 : Are you planning on adding/talking about flags ? And Archi's too ?
Click to expand...
Click to collapse
Archi's are the one's I use, so I don't plan on really talking about them. I may talk a little about Graphite flags, as those are highly optimal flags that are included in SaberMod, but that would be a separate guide because I'd have to talk about adding them to the ROM and the kernel,
@frap129 love the guide, so happens I have been trying to change the kernel toolchain to SaberMod 4.9 and currently building the the ROM and Kernel with toolchain Sabermod 4.8. I am compiling temasek build for the Oneplus One, and using archidroid optimizations, take a look here https://github.com/temasek/android_build/blob/cm-11.0/core/combo/TARGET_linux-arm.mk
This file I did not edit.
This one i did edit line 172, to toolchaindir=arm/sm-arm-eabi-4.9/bin
https://github.com/temasek/android_build/blob/cm-11.0/envsetup.sh
And here is a link to the toolchain I want to use https://github.com/RobbieL811tc/sm-arm-eabi-4.9
and here is my Tool Chain manifest
Code:
<!-- TOOLCHAIN SaberMod 4.8-->
<project path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" name="UBERUTILS/arm-linux-androideabi-4.8" remote="github" revision="master" />
<project path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" name="UBERUTILS/arm-eabi-4.8" remote="github" revision="master" />
<!-- TOOLCHAIN SaberMod 4.9-->
<project name="RobbieL811tc/sm-arm-eabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-eabi-4.9" remote="github" revision="master" />
<project name="RobbieL811tc/sm-arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-linux-androideabi-4.9" remote="github" revision="master" />
And last but not least is my terminal error
Code:
HOSTLD scripts/dtc/dtc
/home/katinatez/android/cm-11.0/kernel/oneplus/msm8974/Makefile:515: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/katinatez/android/cm-11.0/kernel/oneplus/msm8974'
build/core/tasks/kernel.mk:175: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
target StaticLib: libc_nomalloc (/home/katinatez/android/cm-11.0/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_nomalloc_intermediates/libc_nomalloc.a)
external/sqlite/dist/sqlite3.c: In function 'pcache1Fetch':
external/sqlite/dist/sqlite3.c:39405:25: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
external/sqlite/dist/sqlite3.c:39407:25: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
external/sqlite/dist/sqlite3.c: At top level:
external/sqlite/dist/sqlite3.c:98075:1: warning: missing initializer [-Wmissing-field-initializers]
external/sqlite/dist/sqlite3.c:98075:1: warning: (near initialization for 'sqlite3Apis.aggregate_count') [-Wmissing-field-initializers]
[[email protected] cm-11.0]$
Hope I gave you plenty of info to help me figure out my error in compiling.
Any help would be appreciated.
Thank You
katinatez said:
@frap129 love the guide, so happens I have been trying to change the kernel toolchain to SaberMod 4.9 and currently building the the ROM and Kernel with toolchain Sabermod 4.8. I am compiling temasek build for the Oneplus One, and using archidroid optimizations, take a look here https://github.com/temasek/android_build/blob/cm-11.0/core/combo/TARGET_linux-arm.mk
This file I did not edit.
This one i did edit line 172, to toolchaindir=arm/sm-arm-eabi-4.9/bin
https://github.com/temasek/android_build/blob/cm-11.0/envsetup.sh
And here is a link to the toolchain I want to use https://github.com/RobbieL811tc/sm-arm-eabi-4.9
and here is my Tool Chain manifest
Code:
<!-- TOOLCHAIN SaberMod 4.8-->
<project path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" name="UBERUTILS/arm-linux-androideabi-4.8" remote="github" revision="master" />
<project path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" name="UBERUTILS/arm-eabi-4.8" remote="github" revision="master" />
<!-- TOOLCHAIN SaberMod 4.9-->
<project name="RobbieL811tc/sm-arm-eabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-eabi-4.9" remote="github" revision="master" />
<project name="RobbieL811tc/sm-arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-linux-androideabi-4.9" remote="github" revision="master" />
And last but not least is my terminal error
Code:
HOSTLD scripts/dtc/dtc
/home/katinatez/android/cm-11.0/kernel/oneplus/msm8974/Makefile:515: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/katinatez/android/cm-11.0/kernel/oneplus/msm8974'
build/core/tasks/kernel.mk:175: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
target StaticLib: libc_nomalloc (/home/katinatez/android/cm-11.0/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_nomalloc_intermediates/libc_nomalloc.a)
external/sqlite/dist/sqlite3.c: In function 'pcache1Fetch':
external/sqlite/dist/sqlite3.c:39405:25: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
external/sqlite/dist/sqlite3.c:39407:25: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
external/sqlite/dist/sqlite3.c: At top level:
external/sqlite/dist/sqlite3.c:98075:1: warning: missing initializer [-Wmissing-field-initializers]
external/sqlite/dist/sqlite3.c:98075:1: warning: (near initialization for 'sqlite3Apis.aggregate_count') [-Wmissing-field-initializers]
[[email protected] cm-11.0]$
Hope I gave you plenty of info to help me figure out my error in compiling.
Any help would be appreciated.
Thank You
Click to expand...
Click to collapse
There might have been an error in compiling the toolchain itself, try switching
Code:
<!-- TOOLCHAIN SaberMod 4.9-->
<project name="RobbieL811tc/sm-arm-eabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-eabi-4.9" remote="github" revision="master" />
to
Code:
<!-- TOOLCHAIN SaberMod 4.9-->
<project name="SaberMod/arm-eabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-eabi-4.9" remote="github" revision="master" />
Related
Hi all,
I'm trying to compile the kernel inline with my CM9 build. It builds fine without in-lining the kernel. I added the following to my device/samsung/p4wifi/cm.dependencies file:
Code:
[
{
"repository": "android_device_samsung_p4-common",
"target_path": "device/samsung/p4-common"
},
{
"repository": "android_kernel_samsung_p4",
"target_path": "kernel/samsung/p4wifi"
}
]
Then i added the following to my device/samsung/p4wifi/BoardConfig.mk
Code:
TARGET_KERNEL_CONFIG := samsung_p4wifi_defconfig
And when i try to build i get this error:
Code:
/root/android/system/kernel/samsung/p4wifi/kernel/sysctl.c:362: error: 'sysctl_sched_autogroup_handler' undeclared here (not in a function)
make[3]: *** [kernel/sysctl.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/android/system/kernel/samsung/p4wifi'
make: *** [TARGET_KERNEL_BINARIES] Error 2
Any ideas? Thanks.
I guess you're using CyanogenMod repo for the kernel, I suggest that you use pershoot's repo instead, it has the latest changes.
If you want, add this to your local_manifest.xml :
Code:
<project name="pershoot/android_device_samsung_p4-common" path="device/samsung/p4-common" />
<project name="pershoot/android_device_samsung_p4wifi" path="device/samsung/p4wifi" />
<project name="pershoot/android_vendor_samsung_p4wifi" path="vendor/samsung/p4wifi" />
<project name="pershoot/android_kernel_samsung_p4" path="kernel/samsung/p4wifi" />
And change your BoardConfig.mk (my guess is that this is why you're getting that error):
Code:
TARGET_KERNEL_CONFIG := pershoot_samsung_p4wifi-ics_defconfig
Thanks MapleSyrup, you were right, the TARGET_KERNEL_CONFIG was what was screwing it up. Now i'm going to switch over to pershoots repo.
I'm assuming i just have to delete my current
kernel/samsung/p4wifi
device/samsung/p4wifi
vender/samsung/p4wifi
device/samsung/p4-common
Directories before i add pershoots projects in?
Thanks again.
Not really, because git takes care of the update, but if you want, do it.
BTW, if you read the README in the kernel repo:
Note:
This kernel must be built with Codesourcery's 2010.09.
You can find this toolchain here:
http://droidbasement.com/androidTO/arm-2010.09.tar.gz
Click to expand...
Click to collapse
Change the variable ARM_EABI_TOOLCHAIN in your build/envsetup.sh to the directory (full path) of the decompressed toolchain (e.g. /path/to/arm-2010.09/bin). Comment the toolchaindir and the related if condition.
Also, you'll have to alter the variable ARM_CROSS_COMPILE in build/core/tasks/kernel.mk, changing the "arm-eabi-" part to "arm-none-eabi-".
To be sure, do a "make clean" (in your work directory. It will delete the out/ directory, in case you're using cache to speed up builds) before doing a new build (just this time).
Thanks, I did read the readme but had no clue about setting those variables. Everything is building perfectly now.
Thanks again for the help.
I'm trying to compile an CM AOSP build using the Linaro toolchain and I get a build error.
Code:
target thumb C++: libmedia <= frameworks/base/media/libmedia/MediaProfiles.cpp
frameworks/base/media/libmedia/MediaProfiles.cpp: In member function 'void android::MediaProfiles::checkAndAddRequiredProfilesIfNecessary()':
frameworks/base/media/libmedia/MediaProfiles.cpp:521:16: error: redeclaration of 'size_t n'
frameworks/base/media/libmedia/MediaProfiles.cpp:505:24: error: 'size_t n' previously declared here
frameworks/base/media/libmedia/MediaProfiles.cpp: In static member function 'static android::MediaProfiles* android::MediaProfiles::getInstance()':
frameworks/base/media/libmedia/MediaProfiles.cpp:642:5: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'android::MediaProfiles*' [-Wformat]
make: *** [out/target/product/maguro/obj/SHARED_LIBRARIES/libmedia_intermediates/MediaProfiles.o] Error 1
As you can see by the last line I am attempting to build for maguro (GSM Galaxy Nexus) and when using the standard toolchain without Linaro the product compiles perfectly. I get the same result when compiling for different devices and there have been no recent changes to libmedia in the repo and since I can build fine without Linaro I'm completely certain that it is related to that toolchain.
The exact toolchain package I am using is linaro-android/toolchain-4.7-2012.06/android-toolchain-eabi-linaro-4.7-2012
toolchain export command: export TARGET_TOOLS_PREFIX=prebuilt/linux-x86/toolchain/android-toolchain-eabi/bin/arm-linux-androideabi-
Since it is libmedia that fails to build is this an issue with hardware acceleration support? Also, if I comment out the libmedia from the build can I extract the binary file for it from another ROM, and would that ROM need to be Linaro based as well?
Thanks
While I am not sure how to fix it you are now seeing why some are not using it. Encluding the CM team. It breaks things at random
Sent from my Inspire 4G using Tapatalk 2
Did somebody run a bunch of tests that proved all this "different compiler is better" stuff anyways? Let me go try and find the link...
Sent from my SCH-R760 using Tapatalk 2
Found it, read through this for more info.
http://forum.xda-developers.com/showthread.php?t=1371044
Sent from my SCH-R760 using Tapatalk 2
Github.com/teamhorizon
Check out the frameworks patches for linaro and cherry pick them. Don't forget to remove the current patches.
Github.com/teamgummy
Cherry-pick the linaro patches from all the external repositories.
Sent from my Galaxy Nexus using Tapatalk 2
I wanted to try and install Kubuntu 12.04 because they said it had MTP installed out of the box but when I checked it in vm and tried to get the build environment ready this is what I got. Make version was still 3.81 but it had the linaro toolchain . Should I install it locally or stick with 10.04?
$gcc --version
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Some info I found about building AOSP with Linaro, in case that helps you
Look at this script (or run it, it will do the job):
http://snapshots.linaro.org/android...nexus-linaro/231/linaro_android_build_cmds.sh
Some more info:
https://android-build.linaro.org/builds/~linaro-android/galaxynexus-linaro/
http://www.linaro.org/linaro-blog/2011/09/15/building-a-linaro-android-build-from-source/
Hello, i am trying to build a kernel using the linaro toolchain from here http://is.gd/Au5yrh . Kernel builds fine with gcc-4.4.3 from cyanogenmod but with linaro all the warnings are treated as errors like the one below.
Code:
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
I know one way to solve this is to actually edit the code and fix this warning but since this works and i might end up braking something i am looking maybe for an easier solution.
I have tried editing the Makefile CFLAGS removing -Werror but yet no luck.
The kernel tree is this if it helps https://github.com/ezeteze/kernel_huawei
Thanks in advance!
ezet said:
Hello, i am trying to build a kernel using the linaro toolchain from here http://is.gd/Au5yrh . Kernel builds fine with gcc-4.4.3 from cyanogenmod but with linaro all the warnings are treated as errors like the one below.
Code:
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
I know one way to solve this is to actually edit the code and fix this warning but since this works and i might end up braking something i am looking maybe for an easier solution.
I have tried editing the Makefile CFLAGS removing -Werror but yet no luck.
The kernel tree is this if it helps https://github.com/ezeteze/kernel_huawei
Thanks in advance!
Click to expand...
Click to collapse
edit and find "offset.un" and add = NULL; at the end
so code looks like this.. offset.un = NULL;
go ahead and try it..
OR
offset.un = 0;
I put this tutorial together in an attempt to create the most complete and easy to follow guide for building a ROM from source. Including steps for adding apps to your build, changing toolchains and more... The entire guide uses a single Linux terminal window from start to finish in an attempt to keep everything as user friendly as possible. Please feel free to PM me suggestions on where changes need be made.
If you find this guide helpful please press the Thanks button on my posts and rate the thread a 5.
Prerequisites1. This guide is for 64-bit, 32-bit machines will not work for building newer android versions, Ubuntu 12+ based machine, I run Linux Mint 15. Follow links at end of OP for alternate directions
Windows Users: Setup Ubuntu in Virtualbox Instructions
2. You need to know the location for your device, vendor, and kernel repos. This can be found fairly easily in the forum for your phone. Also take note of your phones codename.
For example the Optimus G is the e970 and its device repo can be found here https://github.com/CyanogenMod/android_device_lge_e970
Note*All terminal commands will be in Code boxes*
Part 1 - Setting Up The Build Environment
Install Java JDK
Code:
sudo add-apt-repository ppa:webupd8team/java
Code:
sudo apt-get update
Lollipop Roms:
Code:
sudo apt-get install oracle-java7-installer
Kit-Kat Roms:
Code:
sudo apt-get install oracle-java6-installer
Installing required packages
Ubuntu 14 based:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils
Ubuntu 12 based:
Code:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Set-up ccache This Is Optional
Code:
nano ~/.bashrc
Add these two lines
export USE_CCACHE=1
export CCACHE_DIR=<path-to-your-cache-directory>
Click to expand...
Click to collapse
Save and exit by pressing ctrl+x, selecting Y then enter.
Install ADB & Fastboot This is optional, as you may already have them working. If not, they're a good thing to have.
Code:
sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
sudo apt-get update
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
Setup Repo
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Create working directory
Code:
mkdir [I][B]working-dir[/B][/I]
(Replace working-dir with whatever you'd like to call it, ie. aokp)
Code:
cd working-dir
Part 2 - Get SourceROM Source
Choose which custom rom you are going to build and initialize the repo for it
Code:
repo init -u [I][B]chosen-manifest[/B][/I]
(Replace chosen-manifest appropriately from the list below)
AOKP: https://github.com/AOKP/platform_manifest.git -b Branch
Cyanogenmod: https://github.com/CyanogenMod/android.git -b Branch
CarbonDev: https://github.com/CarbonDev/android.git -b Branch
Liquid Smooth: https://github.com/LiquidSmooth/android.git -b Branch
Replace Branch with appropriate branch from github repo ie cm-10.2 or jb3
If unsure which branch click the link above to locate appropriate branch
Click to expand...
Click to collapse
Device Source
Go HERE and follow instructions on obtaining your device specific repos.
Sync the repo
Code:
repo sync
This will take a while as it downloads all the required source
Part 3 - Preparing SourceBefore you're ready to build your source needs to be configured to include your device. This preparation varies slightly for different custom Roms.
Go HERE and follow instructions for your ROM choice
Part 4 - Edit SourceThis Is OptionalThis is where you can make edits to the source before building to suit your needs.
Go HERE and follow the instructions to tweak source
Part 5 - Building ROM
Code:
. build/envsetup.sh
Code:
lunch
Locate your device on the list and enter appropriate number
Code:
make -j[B][I]# [/I][/B]otapackage
Replace # with the number of cores in your system (Is the number of jobs that will be done at once, more cores means more jobs)
Build Errors
This can be hard, especially if you're new to programming languages and building. Meet Google your new best friend.
Here is a basic overview to get you started, and if no more at least googling in the right direction.
FinishedWhen it's done you're rom will be in working-dir/out/target/product/codename/
Enjoy.
I used these sites while making this guide
http://source.android.com/source/initializing.html
http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html
http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html
Device Source As stated in the prerequisites you will need a device specific Device repo, Vendor repo, and Kernel repo. You can find links to them in the threads for your devices. Also take note of your device codename ie Nexus 4 is mako, Optimus G is gee.
There are two options for adding in device specific source, local manifest and git clone.
Local manifest syncs the device repos each time a repo sync is run. This is probably the better choice if you don't make edits and rely on the repo's maintainer for changes.
Git clone is a one time download of a specific repo to the directory indicated and is not affected by repo sync. This is probably the better choice if you make edits to the device source as they won't be over written or cause conflicts when syncing.
The local path for your phone's repos be device/manufacturer/codename, vendor/manufacturer/codename, kernel/manufacturer/codename regardless of method chosen.
Git Clone
Code:
git clone [B][COLOR="DarkOrange"]repo[/COLOR][/B] -b [B][COLOR="Magenta"]branch[/COLOR][/B] [B][COLOR=Lime]destination-path[/COLOR][/B]
here is and example for the vendor repo for the E973 from TeamPlaceHolder
git clone https://github.com/TeamPlaceholder/proprietary_vendor_lge_gee -b cm-10.2 vendor/lge/gee
Click to expand...
Click to collapse
Local Manifest
Code:
mkdir .repo/local_manifests
Code:
touch .repo/local_manifests/local_manifest.xml
Code:
nano .repo/local_manifests/local_manifest.xml
Add these lines replacing path, name and revision according to the repo's you are using.
This example is for E973 using TeamPlaceHolder repos, adding all device/vendor/kernel repos.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gh"
fetch="git://github.com/" />
<project path="kernel/lge/gee" name="TeamPlaceholder/android_kernel_lge_gee" remote="gh" revision="cm-10.2-merge" />
<project path="device/lge/geeb" name="TeamPlaceholder/android_device_lge_geeb" remote="gh" revision="cm-10.2" />
<project path="device/lge/gee-common" name="TeamPlaceholder/android_device_lge_gee-common" remote="gh" revision="cm-10.2" />
<project path="vendor/lge/gee" name="TeamPlaceholder/proprietary_vendor_lge_gee" remote="gh" revision="cm-10.2" />
</manifest>
Click to expand...
Click to collapse
Preparing SourceROM specific setup instructions prior to building. All source should be downloaded already.
Manufacturer and codename MUST be updated to reflect your device.
Cyanogenmod
Add this line to vendor/cm/vendorsetup.sh
cm_device-userdebug
Click to expand...
Click to collapse
device - The codename for your device. ie. mako for the Nexus 4
Code:
touch [COLOR="Purple"]path-to-device-tree[/COLOR]/cm.mk
path-to-device-tree - Example device/lge/mako for the Nexus 4
Code:
nano [COLOR="Purple"]path-to-device-tree[/COLOR]/cm.mk
Add these lines **This example is for the Nexus 4 Mako, change mako references to reflect your device**
## Specify phone tech before including full_phone
$(call inherit-product, vendor/cm/config/gsm.mk)
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Enhanced NFC
$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
# Inherit device configuration
$(call inherit-product, device/lge/mako/full_mako.mk)
## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := mako
PRODUCT_NAME := cm_mako
PRODUCT_BRAND := google
PRODUCT_MODEL := Nexus 4
PRODUCT_MANUFACTURER := LGE
# Enable Torch
PRODUCT_PACKAGES += Torch
Click to expand...
Click to collapse
Save and exit by pressing ctrl+x, selecting Y then enter.
Now you're ready to build! Go back to the OP and complete the guide from where you left off.
AOSP
AOSP requires a prebuilt kernel for your device. HERE is a guide for building a kernel if you do not have a prebuilt kernel for your device
The rest coming soon...
Liquid Smooth
Coming soon...
AOKP
Code:
nano vendor/aokp/vendorsetup.sh
Add this line
add_lunch_combo aokp_geeb-userdebug
Click to expand...
Click to collapse
Save and exit by pressing ctrl+x, selecting Y then enter.
Code:
touch vendor/aokp/products/geeb.mk
Code:
nano vendor/aokp/products/geeb.mk
Add these lines
If building for CDMA network change gsm.mk to cdma.mk
# Inherit AOSP device configuration for geeb
$(call inherit-product, device/lge/geeb/full_geeb.mk)
# Inherit AOKP common bits
$(call inherit-product, vendor/aokp/configs/common.mk)
# Inherit GSM common stuff
$(call inherit-product, vendor/aokp/configs/gsm.mk)
# Setup device specific product configuration
PRODUCT_NAME := aokp_geeb
PRODUCT_BRAND := google
PRODUCT_DEVICE := geeb
PRODUCT_MODEL := Optimus G
PRODUCT_MANUFACTURER := LGE
Click to expand...
Click to collapse
Save and exit by pressing ctrl+x, selecting Y then enter.
Code:
nano vendor/aokp/products/AndroidProducts.mk
Add this line
$(LOCAL_DIR)/geeb.mk \
Click to expand...
Click to collapse
Save and exit by pressing ctrl+x, selecting Y then enter.
Now you're ready to build! Go back to the OP and complete the guide from where you left off.
CarbonDev
Coming soon...
Now you're ready to build! Go back to the OP and complete the guide from where you left off.
Edit Source
If you plan to edit the device/kernel repos for your phone you should either have used git clone to obtain your repos, or created forks of the repos to your own Github account to use in your local manifest. This way you can still do a repo sync to update the source without overwriting your changes or creating conflicts.
That being said these are the items disscused so far:
Adding Prebuilt APK's to Build
Adding Apps Via Source Code
Changing Toolchain
Cherry Picking Commits
Fixing Conflicts From Cherry Picks
Syncing Repo with Upstream Repo
Syncing Your Local Changes to Your Github Repo
Click to expand...
Click to collapse
Adding Prebuilt APK's to Build
Open the device folder for your phone. ie device/lge/geeb
Add these lines to android.mk
include $(CLEAR_VARS)
LOCAL_MODULE := Name
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
Click to expand...
Click to collapse
Name - Any name you want to asign to this apk to call for it in the build process
**NOTE** LOCAL_SRC_FILES is the location of the apk file. Above assumes it is in the root of your device folder**
Then edit your device.mk to call for your newly assigned apk
PRODUCT_PACKAGES += \
name
Click to expand...
Click to collapse
If the apk you want to add requires additional files to be added along with it, also add this
PRODUCT_COPY_FILES += \
Path-to-additional-file:Destination-path-in-finished-build
Click to expand...
Click to collapse
Path-to-additional-file - Where the file is located in your device tree that you need to add to your build
Destination-path-in-finished-build - Where in the final rom structure this file needs to be
Here is an example for adding required libs for Terminal Emulator to the geeb device tree:
PRODUCT_COPY_FILES += \
device/lge/geeb/libjackpal-androidterm3.so:system/lib/libjackpal-androidterm3.so \
device/lge/geeb/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
Click to expand...
Click to collapse
Adding Apps Via Source Code
Adding apps to your build using source code is easier then adding prebuilt apks.
Example given is using Gallery2(I realize this is included with builds by default, just using it as an example)
Copy or clone your app's source code to working-dir/packages/apps in its own folder. ie. aokp/packages/Gallery2
Go into the source code folder for your app and open Android.mk
Look for this line LOCAL_PACKAGE_NAME , This will tell you what the call name for your app is
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_PACKAGE_NAME := Gallery2
LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D
Click to expand...
Click to collapse
Then open device.mk from your phones device tree and add the call name for the app.
Add these lines:
PRODUCT_PACKAGES += \
Gallery2
Click to expand...
Click to collapse
Changing Toolchain
Download a new prebuilt toolchain that you wish to use
Example: Linaro 4.7 toolchain
Copy unziped prebuilt toolchain folder to working-folder/prebuilt/gcc/linux-x86/arm
Open build/envsetup.sh
Find this block of code:
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/android-toolchain-eabi/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/android-toolchain-eabi/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
Click to expand...
Click to collapse
Replace bold text with your toolchain folder name
The following group of instructions are for making edits to your own repo. Before using any of the info below PLEASE create your own GitHub account and Fork the repo you'd like to edit. Then clone YOUR forked repo from YOUR github account and make edits to it.
If that didn't make sence then you may want to refrain from using this for the time being.
Cherry Picking Commits
Move to the directory for the git repo you wish to add the commit to. ie kernel/lge/geeb
Code:
cd path-to-git-repo
Add the remote repo that holds the commit - This only needs to be done the first time
Code:
git remote add [COLOR="Red"]name[/COLOR] [COLOR="SeaGreen"]url[/COLOR]
name - a name you choose to identify that remote repo
url - the location of the repo ie. https://github.com/TeamPlaceholder/android_kernel_lge_gee.git
Fetch the repo
Code:
git fetch [COLOR="Red"]name[/COLOR]
Cherry pick commit
Code:
git cherry-pick [COLOR="DarkOrange"]commit-id[/COLOR]
commit-id - An unique id given to every commit. It's a long alphanumeric id shown on the commit page of your repo. ie. cc3581ff8692b517ddda8baad73a5d110568f0da
Fixing Conflicts From Cherry Picks
Somtimes when you cherry pick a commit to your repo you'll have a conflict. This is just saying that it did not see what it expected to see when adding the commit to a certain file. To fix a conflict and commit the cherry pick do as follows:
Determine which file(s) contain conflicts.
Code:
git status
This will show you edits waiting to be commited from the cherry-pick. The files shown in green accepted the changes without conflict, the files listed in red contain conflicts that need to be addressed.
Open the file in red
Code:
gedit [COLOR="DarkOrange"]Path-To-File-In-Red[/COLOR]
Press crtl+f to bring up a find window and search for head. Conflicts will be shown in the file using the following structure
<<<<<Head
<Original Code>
=======
<Code from Cherry-pick>
>>>>>Name Of Cherry Pick Commit
Click to expand...
Click to collapse
Compare the original code to the code from the cherry pick and see if anything needs to be saved. If so, merge what needs to be saved into the code from the cherry pick. Then delete the original code and the <<<< ===== >>>>> lines(everything shown in red above). In the end you should be left only with the code from the cherry pick, plus anything you may have merged to it.
Search again for 'head' to see if there are any further conflicts within that file. If there is use the same method to resolve them, if there is not save and exit the file.
Add the newly edited file to the pending commit
Code:
git add [COLOR="DarkOrange"]Path-To-File-In-Red[/COLOR]
Check for any more files that need to be addressed
Code:
git status
If you still have files in red, repeat the process above for those files.
Once all files from git status are shown in green you are ready to commit the cherry pick.
Code:
git commit
Save and exit the commit log by pressing ctrl+x
Done. That cherry pick is now commited to your repo, you can move on to the next cherry pick you wish to add.
Sync Forked Repo with Upstream(Parent) Repo
If you would like to commit to your forked repo all the commits made upstream since you forked(or previously sync'd)
Add the upstream repo - This only needs to be done the first time
Code:
git remote add [COLOR="Red"]name[/COLOR] [COLOR="SeaGreen"]url[/COLOR]
name - a name you choose to identify that remote repo
url - the location of the repo ie. https://github.com/TeamPlaceholder/android_kernel_lge_gee.git
Fetch the upstream repo
Code:
git fetch [COLOR="Red"]name[/COLOR]
Merge upstream commits
Code:
git merge [COLOR="Red"]name[/COLOR]/[COLOR="DarkOrange"]branch[/COLOR]
branch - The branch from the upstream repo you are syncing up
Syncing Your Local Changes to Your Github Repo
Check to ensure you have everything in order to push your changes
Code:
git status
If there are no conflicts/changes that need to be commited you are ready to push. If everything is good it will simply state your are x number of commits ahead
Push your commits to your GitHub account
Code:
git push
Enter your github user name then password. All your local commits will then be applied to your github repo.
More to Come...
Build Errors
Build Errors
This is way to broad a subject to cover in a post, but here are some steps to take to help get you building again.
When your build output stops without clearly saying it's finished or directing you to the created zip file, it Failed.
Sometimes it will stop with the error right at the end of the output, but not very often. Most of the time you must look up through the build output in order to locate the actual error. Sometimes they can be buried very far up, depending on the number of jobs being built.
Here is an example of what you are looking for:
hardware/qcom/display-caf/libgralloc/framebuffer.cpp:116:39: error: 'MSMFB_DISPLAY_COMMIT' was not declared in this scope
Click to expand...
Click to collapse
File having the error
Line in the file where the error occurs
Error that has occured
The quickest way to locate the errors in the build output is the search 'ctrl+shfit+F' for ': error:'
Once you have located your error(s), you can begin troubleshooting to get past them. Start by opening the File having the error and going to the Line in the file where the error occurs. Though without programing knowledge you may not make much sense of it, it's always good to start familiarizing yourself with the code. If you're not able to correct the issue this is where google will come in very handy.
Quite often if you search simply for the Error that has occured exactly as it appears, you'll find its an error that has been encountered many times over and solutions are availible within the first couple of results in a google search.
Should all else fail Post a question and see what suggestions come up.
Here are a few common build errors that I have come across and some solutions for them, again this is by no means a one stop for build erros. Google...Google...Then try to post your error and see who can help if your still stuck. The more you fix by yourself the more it feels like YOUR build.
make: *** No rule to make target `Example_File'. Stop.
Click to expand...
Click to collapse
It can't find the file in question. This can be a incorrect path in a makefile, a missing file or a typo.
last one
Finally usefull guide! not only theory. Thank you very much!
Nice job. Just one thing: when using our sources, the cm-10.2-merge is the best kernel branch. Msm-3.10 is our bleeding edge and hopefully will be fully working soon (just got it to build today, so we'll see). The update branch is broken though. Let me know if you want to contribute to our Git so I can add you to the team, or if you have any suggestions on how to make our rom and kernel better.
Sent from my LG-LS970 using xda app-developers app
xboxfanj said:
Nice job. Just one thing: when using our sources, the cm-10.2-merge is the best kernel branch. Msm-3.10 is our bleeding edge and hopefully will be fully working soon (just got it to build today, so we'll see). The update branch is broken though. Let me know if you want to contribute to our Git so I can add you to the team, or if you have any suggestions on how to make our rom and kernel better.
Sent from my LG-LS970 using xda app-developers app
Click to expand...
Click to collapse
Thanks for the info, updated quide to reflect.
i have a cherry mobile burst phone its running ics,i a generic phone a clone i dont know where it came from i mean the build i cant find a source or a build repo , i really want to build a rom for my phone cause it seems ics is not compatible for the phone..it only has 512 ram and 1ghz dualcore processor..it could run smoothly i think with gingerbread but i cant find a tutorial to donwgrade it to gingerbread it seems impossible because of lack of support for the device and it came up with ics..i just dont know what to do any more my computer is linux mint 13 2gb ram 1ghz amd anthlon 2 ,70gb hd..i cant build a rom to this computer..
Changing Toolchain
Download a new prebuilt toolchain that you wish to use
Example: Linaro 4.7 toolchain
Copy unziped prebuilt toolchain folder to working-folder/prebuilt/gcc/linux-x86/arm
Open build/envsetup.sh
Find this block of code:
Quote:
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/android-toolchain-eabi/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/android-toolchain-eabi/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
Replace bold text with your toolchain folder name
Click to expand...
Click to collapse
Click to expand...
Click to collapse
I did what you said and i keep getting this error
"/arm-eabi-gcc: No such file or directory
make[4]: *** [scripts/mod/empty.o] Error 1
make[3]: *** [scripts/mod] Error 2
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs...."
Here's what my envsetup.sh looks like
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-eabi-linaro-4.6.2/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-linaro-4.6.2/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
Click to expand...
Click to collapse
my linaro folder is called "arm-eabi-linaro-4.6.2" and it is placed under "/prebuilts/gcc/linux-x86/arm/arm-eabi-linaro-4.6.2"
what am i doing wrong?
thanks!
ryukiri said:
I did what you said and i keep getting this error
"/arm-eabi-gcc: No such file or directory
make[4]: *** [scripts/mod/empty.o] Error 1
make[3]: *** [scripts/mod] Error 2
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs...."
Click to expand...
Click to collapse
Where did you get your linaro toolchain from?
go into your linaro directory/bin do you see arm-eabi**** files?
Sounds like it's only the arm-linux-androideabi*** files in there.
Get the prebuilt toolchains right from Linaro It will take a little looking around to find the 4.6. The prebuilt toolchains for each release are in Components>Android>Toolchain Most of them are 4.7 and 4.8 so like I said, it may take some looking around.
I believe(though not 100%) the arm-eabi are used for the kernel, the arm-linux-androideabi for the rom.
The top line you change in envsetup.sh is for the rom toolchain, second place you change is for the kernel toolchain. You can use two different toolchains here. I use sabermod 4.9 for my rom and linaro 4.7 for the kernel
Haze028 said:
Where did you get your linaro toolchain from?
go into your linaro directory/bin do you see arm-eabi**** files?
Sounds like it's only the arm-linux-androideabi*** files in there.
Get the prebuilt toolchains right from Linaro It will take a little looking around to find the 4.6. The prebuilt toolchains for each release are in Components>Android>Toolchain Most of them are 4.7 and 4.8 so like I said, it may take some looking around.
I believe(though not 100%) the arm-eabi are used for the kernel, the arm-linux-androideabi for the rom.
The top line you change in envsetup.sh is for the rom toolchain, second place you change is for the kernel toolchain. You can use two different toolchains here. I use sabermod 4.9 for my rom and linaro 4.7 for the kernel
Click to expand...
Click to collapse
hmm, i forgot where i got it from, i might have gotten it by following this http://forum.xda-developers.com/showthread.php?t=1988315
Can I use 4.7 or 4.8 though?
Ok so inside my linaro directory/bin, i see many arm-eabi**** files (attached screenshot)
Do you think you can link to me the exact toolchains you used so I can start with something that works and then start trying different ones later?
ryukiri said:
Can I use 4.7 or 4.8 though?
Do you think you can link to me the exact toolchains you used so I can start with something that works and then start trying different ones later?
Click to expand...
Click to collapse
I would stick with 4.7 toolchain. 4.6 is quite old, and 4.8 doesn't seem to play very nice. (i'm probably too noob to get it working)
This is the linaro 4.7 toolchain I use.
Hopefully that'll help ya get going.
Haze028 said:
I would stick with 4.7 toolchain. 4.6 is quite old, and 4.8 doesn't seem to play very nice. (i'm probably too noob to get it working)
This is the linaro 4.7 toolchain I use.
Hopefully that'll help ya get going.
Click to expand...
Click to collapse
alright thanks. Ill test it out and report back later
I got the same error.. D:
"/arm-eabi-gcc: No such file or directory
make[4]: *** [scripts/mod/empty.o] Error 1
make[3]: *** [scripts/mod] Error 2
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs...."
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/android-toolchain-eabi/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_EABI_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/android-toolchain-eabi/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
Click to expand...
Click to collapse
EDIT: after some research, i found out that all the files in my bin folder are 32 bit executable files. So i believe i need a 64 bit toolchain. Do you know where I could find one?
EDIT2: I found that for linux they need to install "ia32-libs" to run 32bit executables source. But the thing is, I'm using a mac...
EDIT3: nevermind, i got it to work. thanks anyway
aokp build error
Can you point me in the right direction to fix this error http://pastebin.com/GZmteWUu.
Recon Freak said:
Can you point me in the right direction to fix this error http://pastebin.com/GZmteWUu.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=47947423&postcount=175
Try this....
CarbonDev
Coming soon...
.
Click to expand...
Click to collapse
Thanks for the guide so far. Is there an eta for Carbon roms as I'm struggling to get my to build. Or AOSP?
Haze, to change tool chains, you can also set TARGET_TOOLS_PREFIX ?= prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8-linaro/bin/arm-linux-androideabi- in boardconfig (sub in the right path obviously).
Sent from my Optimus G using xda app-developers app
Background :
So I was asked by some people on how I compile kernels so I am just posting some stuff related to same .
This is a beginners' tutorial and is mostly relevant to Xperia 2011 MDPI section . It might work on other sections but I won't be offering any guarantee .
For whom is this tutorial designed for ?
People who like to read stuff and can read stuff ,people who have desire to learn something and would like a more hands on approach .
Index :
#post 1 = Introduction & Setup Environment
#post 2 =Index of Toolchains & sources+FAQ
#post 3 =Kernel Manipulation
#post 4=Compiling , Source Distribution
Click to expand...
Click to collapse
Requirements :
Linux Distro installed on PC .Thats preferrable . Search,read ,install.It's not rocket science .
I am using Linux Mint 13 in this tutorial . Ubuntu,Debian and Ubuntu/debian based distros should be similar to setup.
This tutorial should work on other distros too ...
Click to expand...
Click to collapse
I am not going to support questions/doubts regarding
Cygwin on Windows
Linux installed in Virtual machine
Live Linux distributions .
I would rather spend time fixing issue then figuring out how to do same thing in another environment .
Get tools for stuff you need not know
install these tools via relevant package manager
Code:
build-essential,bzip2,gcc-multilib,g++-multilib,git,gnupg,libncurses5-dev,lib32ncurses5-dev,lib32z1-dev,kernel-package,ia32-libs,zlib1g-dev,zip
e.g for Linux Mint it's
Code:
sudo apt-get install build-essential bzip2 gcc-multilib g++-multilib git gnupg libncurses5-dev lib32ncurses5-dev lib32z1-dev kernel-package ia32-libs zlib1g-dev zip
Next download Android SDK and configure adb and fastboot . Use the amazing service known as google to set up .Test run if they work properly .
Click to expand...
Click to collapse
Some information :
Q1:What is boot.img ,kernel and ramdisk ?
Boot.img or the file you flash to boot partion .It is actually made up of two parts.
zImage is the actual kernel .You can't edit it .You have to recompile it using the kernel sources
initrd.img is the ramdisk .Using tools like Android Kitchen or kernel-tools-master you can edit it .
More about each part in relevant section .
Q2:How do you manipulate ramdisk,change bootlogo ?
A: Check @dsixda 's Android Kitchen or @championswimmer 's kernel-tools-master
Q3:Where does BOOTCLASSPATH lie in ramdisk ?
A:It's present in init.rc
Q4:Where do you change the path to wifi libs ?
A:Check init.semc.rc
Steps I use to work with Boot.img
Modify Ramdisk with Android Kitchen completely .
Use Stock kernel
Repack using Android kitchen
Check if kernel boots
if it does than you have a working ramdisk.
Now you just have to change zImage after compiling it.
Click to expand...
Click to collapse
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 ) 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
Code:
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
Code:
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 @DooMLoRD and @wedgess
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
Code:
git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git
Code:
git clone https://github.com/garwedgess/toolchains.git
@Christopher83's thread
http://forum.xda-developers.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
Code:
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
Code:
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
Code:
/include/linux/netfilter/x_tables.h
and delete these lines
Code:
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
Making changes to source :
Governors,I/O schedulers & Overclocking :-
Check XDA university's thread
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
It's very well written and i don't want to repeat the same stuff
Making changes to Partition on MDPI
this is a post I made earlier :Read it for details ..
http://forum.xda-developers.com/showthread.php?t=2532418
Compiling the kernel :
First Open Terminal in the main kernel directory .
It is in kernel folder of stock sources .
Step no. 1
Export the architecture .Our phone use arm architecture . Some phones use x86 architecture like our phones .Hence the architecture must be defined before compiling .Do this by .
Code:
export ARCH=arm
Step no. 2
Export the Cross Compiler since thats what will be used to compile kernel .
Code:
export CROSS_COMPILE=/home/karan/a/android_prebuilt_toolchains/arm-linux-androideabi-4.7/bin/arm-linux-androidwabi-
Step no. 3
Clean earlier builds . Important before recompiling
Code:
make clean && make mrproper
Step no. 4
Specify the defconfig
The default config for xperia is in /arch/arm/configs ...they are like semc_mango_defconfig or whatever phone you are using
use
Code:
make semc_mango_defconfig
Step no. 5 Editing: optional
Make edits via menuconfig or xconfig :
This allows you to enable/disable governors,schedulers,filesytems ,modify other parameters which were predefined in defconfig
Code:
make menuconfig
OR
Code:
make xconfig
menuconfig is Command line tool while xconfig is the graphical interface .
You can save the config and use it later and use that as defconfig next time instead
Step 6: Compile
Initiate Compiling ....
Code:
make
If you are compiling for first time it's recommended to use
Code:
make
instead of
Code:
make -j2
or whatever . It will help you to troubleshoot errors .Else errors will be thrown ,you wouldn't be abele to view in terminal and there would be no zImage
Step no. 7: Grab zImage and pack it
after successful compiling zImage will be present in /arch/arm/boot folder
Then use Android kitchen to pack it .
Source Distribution :
1)In a tar ball like sony
Just use an archive manager and make a tar archive ...
Advantages : Easy ,hassle free
Disadvantages : Too large in size if modifying very few aspects
2.)Using diff patch
It's like a comparing tool
e.g If I am my base kernel source is Lupus and I have added some tweak then I can create a patch file which can be used on the Lupus source and the result will be my work .It's pretty handy if you are dealing with few files .
Advantages : small size ,pretty handy ,
Disadvantages : Without a proper text editor like Geany ,check patches is a nuisance .The Mesa patch for MDPI has over 1,500,000 lines ...enough to screw with normal text editors
3)Git with github or similar site
It's a fantastic way to upload source .It allows many features to a developer which makes life lot easier .
Advantages : Excellent Version Control
Disadvantages : Steep learning curve .
Git is quite complex for a newbie and it can overwhelm a person .I would suggest reading a lot about git and experimenting thoroughly before diving in .
Credits :
@pinkflozd
For helping me out when i needed
@DooMLoRD
@wedgess
@kast
@an0nym0us_
Peeked in their sources and learnt Stuff
Recommended Text Editor :If you want to seriously dabble with sources I would suggest to use Geany .
It saves a lot of time .It's a must have if you peek a lot into patch files and/or sources .
Reserved for future FAQ
Reserved Just in case
Reserved Just in case
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Thanx
@karandpr- a guide like this suits for the android general or appropriate forums!
Why keep it so inside? just a suggestion though
Thanx for this!
piousheart said:
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Click to expand...
Click to collapse
usually the error of unknown CPU architecture is because you're using linaro toolchain but without proper definition of CPU architecture in Makefile flags. stay away from linaro for first timer. i would strongly suggest using google vanilla 4.4.3 toolchain. abit old but always work given that the're no actual error in the source itself.
Finally karan:thumbup: Thanks a lot for the guide. Really helpful
Cheers,
Vatsal
piousheart said:
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Click to expand...
Click to collapse
add
Code:
-Wno-unused-but-set-variable
in the makefile in KBUILD_CFLAGS =
Didn't check the second error .
It's because you are using Linaro 4.7.3
Like i said above
Code:
/arch/arm/boot/compressed/Makefile
You need to change it a bit ...
Compare it with changes of Kappa or Lupus .
http://forum.xda-developers.com/showthread.php?p=36677987
an0nym0us_ said:
usually the error of unknown CPU architecture is because you're using linaro toolchain but without proper definition of CPU architecture in Makefile flags. stay away from linaro for first timer. i would strongly suggest using google vanilla 4.4.3 toolchain. abit old but always work given that the're no actual error in the source itself.
Click to expand...
Click to collapse
Thanks for the reply!
I'm not using linaro toolchain but ndk r9b (something 4.8)
i also modified makefile according to your solution i found when searching google in one of the xda thread.
---------- Post added at 11:20 AM ---------- Previous post was at 11:18 AM ----------
karandpr said:
add
Code:
-Wno-unused-but-set-variable
in the makefile in KBUILD_CFLAGS =
Didn't check the second error .
It's because you are using Linaro 4.7.3
Like i said above
Code:
/arch/arm/boot/compressed/Makefile
You need to change it a bit ...
Compare it with changes of Kappa or Lupus .
http://forum.xda-developers.com/showthread.php?p=36677987
Click to expand...
Click to collapse
I'm not using Linaro but ndk r9b. (correct me if ndk is also known as Linaro, im a Noob)
piousheart said:
Thanks for the reply!
I'm not using linaro toolchain but ndk r9b (something 4.8)
i also modified makefile according to your solution i found when searching google in one of the xda thread.
---------- Post added at 11:20 AM ---------- Previous post was at 11:18 AM ----------
I'm not using Linaro but ndk r9b. (correct me if ndk is also known as Linaro, im a Noob)
Click to expand...
Click to collapse
I will take a look at it but for time being ,I would recommend switching to 4.4.3 since it has least erros and the zImage boots fine .
Congratulations karan for finally making the guide will be very helpful for many of us :good:
[email protected] ~/13/kernel $ export ARCH=arm
[email protected] ~/13/kernel $ export CROSS_COMPILE=~/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
[email protected] ~/13/kernel $ make semc_haida_defconfig
#
# configuration written to .config
#
[email protected] ~/13/kernel $ make -j4
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
CC kernel/bounds.s
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected] ~/13/kernel $
Hey karan can you look into this error?
koradiavatsal said:
[email protected] ~/13/kernel $ export ARCH=arm
[email protected] ~/13/kernel $ export CROSS_COMPILE=~/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
[email protected] ~/13/kernel $ make semc_haida_defconfig
#
# configuration written to .config
#
[email protected] ~/13/kernel $ make -j4
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
CC kernel/bounds.s
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected] ~/13/kernel $
Hey karan can you look into this error?
Click to expand...
Click to collapse
Check Path to toolchains
Can i use the guide for 2010 devices? X10mini..
piousheart said:
Can i use the guide for 2010 devices? X10mini..
Click to expand...
Click to collapse
Yes... Except you will need different source...
Sent from my MT11i using Tapatalk 2
Attitude.SSJ said:
Yes... Except you will need different source...
Sent from my MT11i using Tapatalk 2
Click to expand...
Click to collapse
can you prefer any toolchain?