Hello mates. I hope everything is okay ... I wanted a little help with this:
http://hastebin.com/eyowumanuc.pl
Please help me, this is really serious
Bump! Please this is really important !!
MZO said:
Bump! Please this is really important !!
Click to expand...
Click to collapse
Here it is one possible cause of that error:
http://forum.xda-developers.com/showthread.php?t=2357126
Specifics of the build?
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Ciuffy said:
Here it is one possible cause of that error:
http://forum.xda-developers.com/showthread.php?t=2357126
Specifics of the build?
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Click to expand...
Click to collapse
Specs:
Intel i7 3770 3.4GHz with 2x hyperthreads ( -j8 )
4GB DDR3 RAM (1600MHz)
512GB HDD (60MB/s RW rate)
nVidia GT740 ( 2GB ) - not necesaary
Build environment is complete. I have successfully compiled 3ROMS. PAC, CrDroid, and Carbon... Downloaded nameless code and got same exact error. This one too :/
This is UBERSLIM 5.1.1
MZO said:
Specs:
Intel i7 3770 3.4GHz with 2x hyperthreads ( -j8 )
4GB DDR3 RAM (1600MHz)
512GB HDD (60MB/s RW rate)
nVidia GT740 ( 2GB ) - not necesaary
Build environment is complete. I have successfully compiled 3ROMS. PAC, CrDroid, and Carbon... Downloaded nameless code and got same exact error. This one too :/
This is UBERSLIM 5.1.1
Click to expand...
Click to collapse
It looks like a tree source error at first look. Have you tried the solution I provided? Same error? The problem is most likely on the source code side.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Ciuffy said:
It looks like a tree source error at first look. Have you tried the solution I provided? Same error? The problem is most likely on the source code side.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Click to expand...
Click to collapse
I am resyncing other ROM. Thank you for help brother.
MZO said:
I am resyncing other ROM. Thank you for help brother.
Click to expand...
Click to collapse
Uh, sorry, are you starting from scratch again? Or, are you telling me that you think it won't work because it is about another ROM?
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Ciuffy said:
Uh, sorry, are you starting from scratch again? Or, are you telling me that you think it won't work because it is about another ROM?
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Click to expand...
Click to collapse
I am doing another ROM. And starting from scratch. That is the best way to eliminate errors from my side. :/
MZO said:
Hello mates. I hope everything is okay ... I wanted a little help with this:
http://hastebin.com/eyowumanuc.pl
Please help me, this is really serious
Click to expand...
Click to collapse
Look at hardware/broadcom/wlan/bcmdhd/wpa_supplicant_8_lib/Android.mk. You probably need to add "lib_driver_cmd_bcmdhd" to the list of modules you're building.
-----Edit-----
In BoardConfig.mk, you should have entries like the following (and possibly more). Check BoardConfig.mk from someone else's build for your device to identify precisely what's needed.
Code:
# Wifi
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
dolorespark said:
Look at hardware/broadcom/wlan/bcmdhd/wpa_supplicant_8_lib/Android.mk. You probably need to add "lib_driver_cmd_bcmdhd" to the list of modules you're building.
-----Edit-----
In BoardConfig.mk, you should have entries like the following (and possibly more). Check BoardConfig.mk from someone else's build for your device to identify precisely what's needed.
Code:
# Wifi
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
Click to expand...
Click to collapse
Thanks man! I don't have the code now so I will be sure to pass it on to the code developer!
Related
So I'm working on some lock screen stuff in frameworks/base/policy/src/com/android/internal/policy/impl/ for CyanogenMod 9, and I was wondering how I would go about compiling it? Would I just run something like `make -j4 impl`, like I would for something like SystemUI? Then how would I go about applying it to my device?
Sorry for the noob question, but thanks for the help!
Chiggins said:
So I'm working on some lock screen stuff in frameworks/base/policy/src/com/android/internal/policy/impl/ for CyanogenMod 9, and I was wondering how I would go about compiling it? Would I just run something like `make -j4 impl`, like I would for something like SystemUI? Then how would I go about applying it to my device?
Sorry for the noob question, but thanks for the help!
Click to expand...
Click to collapse
If you look here:
https://github.com/CyanogenMod/android_frameworks_base/tree/gingerbread/policy
You will see Android.mk
Code:
LOCAL_PATH:= $(call my-dir)
# the library
# ============================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := android.policy
include $(BUILD_JAVA_LIBRARY)
# additionally, build unit tests in a separate .apk
include $(call all-makefiles-under,$(LOCAL_PATH))
The local module you will need to call this is "android.policy"
It will build what it needs to. When it finishes compiling you will see a list of "Install:" Push those to your phone.
Code:
make -j$ android.policy
So to my understanding, if something that I'm working on has an Android.mk by it, I could build JUST that thing using the name defined by LOCAL_MODULE, right?
Chiggins said:
So to my understanding, if something that I'm working on has an Android.mk by it, I could build JUST that thing using the name defined by LOCAL_MODULE, right?
Click to expand...
Click to collapse
Yup just about. There might be issues at some point... but I have never had issues testing bits like this.
Alright sweet deal, thanks mate!
Hi all,
I used the device, hardware, and kernel trees as given in the pastebin link in the legacy-xperia github
After applying munjeni's patches, I tried to compile. I got this error.
bootable/recovery/ui.c: In function 'update_leds':
bootable/recovery/ui.c:768:42: error: 'RED_LED_FILE' undeclared (first use in this function)
bootable/recovery/ui.c:768:42: note: each undeclared identifier is reported only once for each function it appears in
bootable/recovery/ui.c:769:42: error: 'GREEN_LED_FILE' undeclared (first use in this function)
make: *** [/home/fadhil/android/pac/out/target/product/nypon/obj/EXECUTABLES/recovery_intermediates/ui.o] Error 1
Click to expand...
Click to collapse
From what I saw in ui.c, the affected section is telling the colour of the charging led to change from red to green when battery level increases above 90%.
How do I resolve this error?
I think I have found the reason for the error. When the patches were applied, they produced errors.
What is the cause of this? Does another working set of patches exist?
MuffinIsCute said:
I think I have found the reason for the error. When the patches were applied, they produced errors.
What is the cause of this? Does another working set of patches exist?
Click to expand...
Click to collapse
see here
https://github.com/munjeni/android_hardware_semc/blob/master/patches/bootable_recovery.patch#L30
this is the line causing problem.
alwaysadeel said:
see here
https://github.com/munjeni/android_hardware_semc/blob/master/patches/bootable_recovery.patch#L30
this is the line causing problem.
Click to expand...
Click to collapse
You mean it should be changed to pac_nypon?
One more question here: I tried to use the device hardware and kernel trees from the aosx project instead. However, it was unable to compile as the file cm.mk was missing. Is it alright to just copy the cm.mk file over from the sources suggested in percy's pastebin? Or do I have to modify it to point somewhere else?
MuffinIsCute said:
You mean it should be changed to pac_nypon?
One more question here: I tried to use the device hardware and kernel trees from the aosx project instead. However, it was unable to compile as the file cm.mk was missing. Is it alright to just copy the cm.mk file over from the sources suggested in percy's pastebin? Or do I have to modify it to point somewhere else?
Click to expand...
Click to collapse
xperiaste github is already setup to build cm, it uses aosx trees. use it!
github.com/XperiaSTE
Sent from my Nexus 7
Cherrypick this- https://github.com/XperiaSTE/androi...mmit/bf7216061b2da51c18ecbe4d8f980e8a7c85be01
Cheers,
AJ
Abhinav2 said:
Cherrypick this- https://github.com/XperiaSTE/androi...mmit/bf7216061b2da51c18ecbe4d8f980e8a7c85be01
Cheers,
AJ
Click to expand...
Click to collapse
Stupid question here: How do I cherry pick?
Never mind. I'm still wondering why the change got reverted.
alwaysadeel: You're a lifesaver. I didn't know that XperiaSTE existed. Here's a thank you.
MuffinIsCute said:
Stupid question here: How do I cherry pick?
Never mind. I'm still wondering why the change got reverted.
Click to expand...
Click to collapse
Because when I was part of that team, I told i4g to do that since we were testing something.
AJ
Abhinav2 said:
Because when I was part of that team, I told i4g to do that since we were testing something.
AJ
Click to expand...
Click to collapse
Noob question: The only trees needed are the nypon, the montblanc, the kernel and hardware sources and the vendor tree right? Is that correct?
MuffinIsCute said:
Noob question: The only trees needed are the nypon, the montblanc, the kernel and hardware sources and the vendor tree right? Is that correct?
Click to expand...
Click to collapse
Yeah, more or less.
Cheers,
AJ
Abhinav2 said:
Yeah, more or less.
Cheers,
AJ
Click to expand...
Click to collapse
I tried compiling with the XperiaSTE trees and got this error
[email protected]:~/android/zz$ ./build-pac.sh nypon
No external out, using default (/home/fadhil/android/zz/out)
./build-pac.sh: command substitution: line 117: syntax error near unexpected token `fi'
./build-pac.sh: command substitution: line 117: `shellif[-s~/PACname];thencat~/PACname;elseecho"Beta-1.0";fi)'
Building P A C v..
Looking for PAC product dependencies
Check for XperiaSTE/android_device_sony_nypon in local_manifest
XperiaSTE/android_device_sony_nypon already in local_manifest
Check for XperiaSTE/android_device_sony_montblanc-common in local_manifest
XperiaSTE/android_device_sony_montblanc-common already in local_manifest
Check for XperiaSTE/android_kernel_sony_u8500 in local_manifest
XperiaSTE/android_kernel_sony_u8500 already in local_manifest
Check for XperiaSTE/android_hardware_ste-sony in local_manifest
XperiaSTE/android_hardware_ste-sony already in local_manifest
Check for XperiaSTE/android_vendor_sony in local_manifest
XperiaSTE/android_vendor_sony already in local_manifest
Downloading prebuilts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 456 0 --:--:-- --:--:-- --:--:-- 656
100 502k 100 502k 0 0 413k 0 0:00:01 0:00:01 --:--:-- 413k
Archive: vendor/cm/proprietary/Term.apk
inflating: vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so
inflating: vendor/cm/proprietary/lib/mips/libjackpal-androidterm4.so
inflating: vendor/cm/proprietary/lib/x86/libjackpal-androidterm4.so
Setting up environment
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/goldfish/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/sony/nypon/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including vendor/pac/vendorsetup.sh
including vendor/pa/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
Lunching device
Looking for dependencies
Dependencies file not found, bailing out.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
CM_VERSION=11-20140606-UNOFFICIAL-nypon
TARGET_PRODUCT=pac_nypon
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-41-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=/home/fadhil/android/zz/out
============================================
Starting compilation
Using the default GCC Optimization Level, O2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
CM_VERSION=11-20140606-UNOFFICIAL-nypon
TARGET_PRODUCT=pac_nypon
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-41-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=/home/fadhil/android/zz/out
============================================
Checking build tools versions...
/home/fadhil/android/zz/out/target/product/nypon/obj/APPS/SignatureTest_intermediates
external/chromium_org/GypAndroid.linux-arm.mk:109: external/chromium_org/third_party/WebKit/Source/bindings/bindings_sources.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:120: external/chromium_org/third_party/WebKit/Source/core/make_core_derived_sources.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:135: external/chromium_org/third_party/WebKit/Source/devtools/concatenated_devtools_layers_js.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:147: external/chromium_org/third_party/WebKit/Source/heap/blink_heap.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:148: external/chromium_org/third_party/WebKit/Source/heap/blink_heap_asm_stubs.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:150: external/chromium_org/third_party/WebKit/Source/platform/blink_arm_neon.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:151: external/chromium_org/third_party/WebKit/Source/platform/blink_common.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:152: external/chromium_org/third_party/WebKit/Source/platform/blink_platform.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:153: external/chromium_org/third_party/WebKit/Source/platform/blink_prerequisites.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:154: external/chromium_org/third_party/WebKit/Source/platform/make_platform_derived_sources.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:159: external/chromium_org/third_party/WebKit/public/blink_generate_devtools_grd.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:161: external/chromium_org/third_party/angle/src/preprocessor.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:162: external/chromium_org/third_party/angle/src/translator.target.linux-arm.mk: No such file or directory
external/chromium_org/GypAndroid.linux-arm.mk:228: external/chromium_org/v8/tools/gyp/generate_trig_table.host.linux-arm.mk: No such file or directory
"ebtables is disabled on this build"
find: `src': No such file or directory
build/core/base_rules.mk:134: *** prebuilts/misc/common/ub-uiautomator: MODULE.TARGET.JAVA_LIBRARIES.ub-uiautomator already defined by frameworks/uiautomator. Stop.
/home/fadhil/android/zz/out/target/product/nypon/pac_nypon-ota-eng.fadhil.zip doesn't exist!
Click to expand...
Click to collapse
I have no idea what happened.
MuffinIsCute said:
I tried compiling with the XperiaSTE trees and got this error
I have no idea what happened.
Click to expand...
Click to collapse
there are changes in uiautomator in 4.4.3 . repo sync again maybe u have a broken sync
Sent from my Nexus 7
MuffinIsCute said:
I tried compiling with the XperiaSTE trees and got this error
I have no idea what happened.
Click to expand...
Click to collapse
We(PAC team) are currently merging 4.4.3 changes so please don't build until repos are stable.
Cheers,
AJ
MuffinIsCute said:
I tried compiling with the XperiaSTE trees and got this error
I have no idea what happened.
Click to expand...
Click to collapse
from base source directory
cd prebuilts/misc
git revert -m1 490e397ee8b37485ac19967974758dee1db28673
or
rm frameworks/uiautomator
the issue is CM is using a prebuilt version and PAC still has the AOSP from source method in place. I'm using git revert because I prefer the from source method over a prebuilt method. Haven't tested either, but both are technically correct....
skeevydude said:
from base source directory
cd prebuilts/misc
git revert -m1 490e397ee8b37485ac19967974758dee1db28673
or
rm frameworks/uiautomator
the issue is CM is using a prebuilt version and PAC still has the AOSP from source method in place. I'm using git revert because I prefer the from source method over a prebuilt method. Haven't tested either, but both are technically correct....
Click to expand...
Click to collapse
Same error appeared after I used rm -rf frameworks/uiautomator.Resyncing repo.
MuffinIsCute said:
Same error appeared after I used rm -rf frameworks/uiautomator.Resyncing repo.
Click to expand...
Click to collapse
Even after you do that, a crap ton of things need to be merged. Check the gerrit, but all the 4.4.3 merges need to be picked in as well as the main repo manifest being majorly updated. Just got a build error 192 mins in with frameworks/base, that's with all the 4.4.3 picks, Archidroid, gcc 4.8, and the main manifest updates. I normally suck with Java, but I actually figured the error out on my own -- illegal statement start -- CM had the same fix my non-programming self came up with...removing a ")". Time to clean and start a new build.
I'm also doing my builds with Archidroid's Optimizations. Once I get it successfully building, I'm gonna submit that to gerrit along with builder selectable GCC (4.6 to 4.10 with some linaros too) versions (I'm currently hiding his Optimizations in the -o3 option, but I'll make his o4 because I can
If you resync the repo after doing the rm -rf command, it'll add that right back in and you'll still get that error...oh, and rm -rf is the fix in PAC's gerrit right now...sync, do modifications, compile,,,,not mod, sync, compile (I made that mistake plenty of times when I first started out kanging)
skeevydude said:
Even after you do that, a crap ton of things need to be merged. Check the gerrit, but all the 4.4.3 merges need to be picked in as well as the main repo manifest being majorly updated. Just got a build error 192 mins in with frameworks/base, that's with all the 4.4.3 picks, Archidroid, gcc 4.8, and the main manifest updates. I normally suck with Java, but I actually figured the error out on my own -- illegal statement start -- CM had the same fix my non-programming self came up with...removing a ")". Time to clean and start a new build.
I'm also doing my builds with Archidroid's Optimizations. Once I get it successfully building, I'm gonna submit that to gerrit along with builder selectable GCC (4.6 to 4.10 with some linaros too) versions (I'm currently hiding his Optimizations in the -o3 option, but I'll make his o4 because I can
If you resync the repo after doing the rm -rf command, it'll add that right back in and you'll still get that error...oh, and rm -rf is the fix in PAC's gerrit right now...sync, do modifications, compile,,,,not mod, sync, compile (I made that mistake plenty of times when I first started out kanging)
Click to expand...
Click to collapse
Wow... that scared me. If I wait a month, do I still have to do this?
MuffinIsCute said:
Wow... that scared me. If I wait a month, do I still have to do this?
Click to expand...
Click to collapse
Maybe for the next week or two, it usually doesn't take that long in-between minor Android version updates...
All the 4.4.3 gerrit picks can be done inside a half an hour, so it's not like it's that hard.
Try a build now.
AJ
Abhinav2 said:
Try a build now.
AJ
Click to expand...
Click to collapse
While I wait for the repo to sync, let me ask a question, regarding ROMs in general. Besides PA, which ROMs allow you to launch an app in floating mode from the recents list? Does PAC have it yet?
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" />
Hey guys,
I'm trying to build a unofficial version of CM12.1, but it fails while building with following error:
Code:
build/core/package_internal.mk:351: *** target pattern contains no '%'. stop.
the corresponing line from package_interal:
Code:
[348] private_key := $(LOCAL_CERTIFICATE).pk8
[349] certificate := $(LOCAL_CERTIFICATE).x509.pem
[350]
[351] $(LOCAL_BUILT_MODULE): $(private_key) $(certificate) $(SIGNAPK_JAR)
[352] $(LOCAL_BUILT_MODULE): PRIVATE_PRIVATE_KEY := $(private_key)
[353] $(LOCAL_BUILT_MODULE): PRIVATE_CERTIFICATE := $(certificate)
If you need further information about device (i don't think that's revelant?) etc. just ask.
revide said:
Hey guys,
I'm trying to build a unofficial version of CM12.1, but it fails while building with following error:
Code:
build/core/package_internal.mk:351: *** target pattern contains no '%'. stop.
the corresponing line from package_interal:
Code:
[348] private_key := $(LOCAL_CERTIFICATE).pk8
[349] certificate := $(LOCAL_CERTIFICATE).x509.pem
[350]
[351] $(LOCAL_BUILT_MODULE): $(private_key) $(certificate) $(SIGNAPK_JAR)
[352] $(LOCAL_BUILT_MODULE): PRIVATE_PRIVATE_KEY := $(private_key)
[353] $(LOCAL_BUILT_MODULE): PRIVATE_CERTIFICATE := $(certificate)
If you need further information about device (i don't think that's revelant?) etc. just ask.
Click to expand...
Click to collapse
Sorry for this bump, but being on the fourth site without any replies kinda frustrates me..
cmon guys, halp
Okay, solved problem.
For all of you who experience the same issue, my proprietary-blob list got entries that were not real files. update yours and you should be good.
Hi Guys,
I'm trying to build CM-13 for an arm device (x86_64) on Marshmallow (6.0.1), but my build always fail on an incompatible target error...
The so files seems to be built for a different arch than the target
I'm using a prebuilt kernel (yes I know, i'll change that a bit later), do you think that the problem is coming from thit point?
Here is the brunch's splat :
pastebin.com/wrH2sckE
Thanks in advance for your help and if you need any details, just ask !
============
Solved :
My BoardConfig.mk was targeting arm instead of arm64.
My best