I hope this is just me being stupid. I wanted to start using the linaro toolchain to build my kernel, having fixed the errors that appeared it now only produces an 'Image' file instead of a 'zImage'.
Please tell me I am just being thick! I cannot work out for the life of me what to do to fix it.
Any help anyone can give any advice will be greatly appreciated, my git hub is here: https://github.com/vidoardes/XS-ICS
BTW: These errors don't occur if I use the standard android 4.4.3 toochain.
Related
Hello everyone, I'm trying to compile a version of CM10.1 with Linaro Toolchain, but so far only managed to set the Linaro for part of the ROM (JAVA), while for the Kernel (C/C++) has not been successful.
In the link below, infected_ posted a brief tutorial on how to configure the environment to use Linaro, but only for part of the ROM (and works well :good. As for the kernel, it was unclear how to perform the configuration.
http://forum.xda-developers.com/showpost.php?p=42976693&postcount=12
Could anyone give me some help on how to configure Linaro to compile the Kernel CM10.1 along with the rest of the ROM?
Before someone politely send me to Google... I searched and got many errors... (I even "kill" my phone, but already revived her.).
Note: I have no interest in publishing my work, I'm just looking for knowledge because I am very curious!
New informations about Linaro configurations to compile the CM10.1 Kernel released by infected_:
http://forum.xda-developers.com/showpost.php?p=43649447&postcount=449
All information gathered here are authored by infected_, then give thanks to him!:good:
Sorry for my English and thank you!:highfive:
Someone, somewhere?
Ask the devs on here to help you mate. A few on here using that way of building . Im sure they will help out. Just ask really nice :thumbup:
andrewwright said:
Ask the devs on here to help you mate. A few on here using that way of building . Im sure they will help out. Just ask really nice :thumbup:
Click to expand...
Click to collapse
Thank you my friend, I tried to ask a few things for some devs via PM, but usually they do not respond, because there are many requests all the days.
I found it interesting to create this topic because I've seen some people with the same question that I, and perhaps could be kept here a discussion.
But anyway I appreciate your interest!:good:
To be honest mate that sounds like a great idea. Keep trying pms and when you have compiled a working rom come bk and tells us (me) how. Soon im going to build a rom and am looking for all the info I can get on it. If I find what you need il come bk here. I read its smoother ui and better battery this way. It that why you choose this way of building?
Precisely, I read about it, and as I understand, when using Linaro Toochain, we get a gain of over 30% in performance, but I believe that the secret of all this performace is in the compilation of Kernel. And it is this part that I "got stuck" hehehe...
Currently my environment works well with Linaro Toochain 4.8-13.06 (compiling part of the ROM), and with Official Google GCC 4.7 (compiling the kernel).
At that moment I did not notice a significant gain in performance compared to the CM10.1 Official Nightly Builds.
Hey all,
I thought I knew what I was doing when backporting but now I am lost.
I am trying to integrate Bluez 5.18 into Dirty Unicorns kitkat for my Galaxy note 2. I thought I could copy the backport 3.14 compat, backport includes and the drivers into my kernel source but I am now unsure I am doing it right. If anyone has any info on backporting for android I would really appreciate it. Things I am unsure of is if I am doing it right by copying the files into the kernel source or if I need to use the backport differently.
Any help is greatly appreciated and needed.
Thanks
Brian
I tried compiling the original kernel I have running on my Nexus 7 2013.
So I did
git clone https://android.googlesource.com/kernel/msm -b android-msm-flo-3.4-kitkat-mr2
git checkout -f ac9222cf61b2646a1862fb222365e52a0d1c498d
export ARCH=arm flo_defconfig
export SUBARCH=arm
export CROSS_COMPILE/home/armtoolchain-prebuilt-4.8/bin:$PATH
make -j2
Click to expand...
Click to collapse
that last checkout of commit ac9222cf61b2646a1862fb222365e52a0d1c498d is the one my Nexus 7 2013 Wi-Fi originally came with. Now since I used the prebuilt binaries of GCC 4.8, it has some stricter rules for compilation so I had to remove some flags like -Wall from the main Makefile so my compile would continue, furthermore I had to edit a Makefile in arch/arm/boot/compressed so that -Wa,-march=armv7-a instead of -march=all otherwise again I could not compile due to some errors.
After this I get a nice zImage, then I do fastboot boot zImage and my tablet hangs on the bootloader menu, nothing happens at all, I have to hold down power to fix it. Basically my kernel does NOT work in the least and I am unsure what the problem is. I am hoping somebody with experience here could help me.
The reason I posted in this subforum is because more devs would see it, however if Moderators are against it, please move the thread to the appropriate forum rather than deleting it, thank you!
dikidera said:
I tried compiling the original kernel I have running on my Nexus 7 2013.
So I did
that last checkout of commit ac9222cf61b2646a1862fb222365e52a0d1c498d is the one my Nexus 7 2013 Wi-Fi originally came with. Now since I used the prebuilt binaries of GCC 4.8, it has some stricter rules for compilation so I had to remove some flags like -Wall from the main Makefile so my compile would continue, furthermore I had to edit a Makefile in arch/arm/boot/compressed so that -Wa,-march=armv7-a instead of -march=all otherwise again I could not compile due to some errors.
After this I get a nice zImage, then I do fastboot boot zImage and my tablet hangs on the bootloader menu, nothing happens at all, I have to hold down power to fix it. Basically my kernel does NOT work in the least and I am unsure what the problem is. I am hoping somebody with experience here could help me.
The reason I posted in this subforum is because more devs would see it, however if Moderators are against it, please move the thread to the appropriate forum rather than deleting it, thank you!
Click to expand...
Click to collapse
Hi, I assume you're using kitkat branch for kitkat kernel?
You'll need these two commits to boot with a toolchain above GCC 4.7 regardless
https://github.com/poondog/kernel_msm/commit/c6f209b4ac195fbc19286ebe6d77bae939ac00b7
https://github.com/poondog/kernel_msm/commit/ea510c9b9dba084332ca88acee4a2064c9c80056
That will fix your zImage.
Is that by any chance related to this? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 Apparently 4.8 and a few other versions after 4.8 are affected.
dikidera said:
Is that by any chance related to this? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 Apparently 4.8 and a few other versions after 4.8 are affected.
Click to expand...
Click to collapse
Not sure, I haven't looked into it. But those patches seem to do the job fine
Hi
Can anyone tell me a way to use clang instead of GCC for ROM devlopment? Particularly because I would prefer a colored output of the compile processes (and no, I tried coloredgcc but it doesnt work no matter what methods I try. So clang is my only hope, I think).
I can try manually changing compiler name in build mk files but there are so many linked files.... kinda confused if thats even possible. Some help would be appreciated.
So, I recently got a ASUS Zenfone 4 Selfie Pro, the phone is stuck on android 7.1 and doesn't have any roms, nothing, just TWRP. So I'm on a journey trying to build stuff for this device from the ground up, I already made a device tree based on Zenfone 3 (which has the same SoC) and I tried to build lineage/cyanogenmod 14.1 for it and got a lot of kernel errors, so I went to try to compile the kernel from the source ASUS gave on their website and uploaded it to my github. In this past 3 days was able to fix and workaround some of the errors I got while building, but now I'm stuck on this one: https://hastebin.com/iqisuzegeg.coffeescript | any help would be greatly apreciated .
For easier access to the kernel source I uploaded it to my github and made some fixes/workarounds for some errors: https://github.com/2003Frost/android_kernel_asus_Z01M_stock
I'm using Linaro 7.5.0 as arm64 toolchain.
I'm using Zorin OS 15.2 as OS.
If any more information is needed I'll be glad to give out.
0
Seppppx said:
Hmm. There is probably no definition for 'drivers/platform' and 'drivers/platform/msm' . But there is a reference (probably). Also have you tried to build the kernel with the defconfig "the manual way". If there is something wrong with the kernel I have almost no way of helping you because I'm not a real developer.
EDIT : There is a kernel source for your phone that on a developer's github https://github.com/shakalaca/android_kernel_asus_zd552kl . That is also the person who is the maintainer for official twrp. He has some large commits on the kernel so his kernel should build.
Click to expand...
Click to collapse
I already tried his kernel and got the same exact error :/
I didn't understand fully what you said with "the manual way" but I'm trying to compile the kernel outside the rom build environment, by using my device's defconfig and compiling with linaro.
0
Seppppx said:
By the manual way I mean the with the defconfig. Also I made a pull request to your Device Tree (adds persist partition and Shakalaca's kernel).
Also if you're trying to build with defconfig there is a tutorial by google. https://source.android.com/setup/build/building-kernels-deprecated .
After that you will have to put it to the boot image. Another guide for that. https://source.android.com/setup/build/building-kernels#embedding-into-Android .
Edit : Isn't the Android kernel build with the defconfig when you run a source build? I think it actually builds the kernel when you build android so you don't build the kernel separately.
Click to expand...
Click to collapse
I accepted your pull request. Yes when you build a rom from source it also compiles the kernel, but I wasn't able to build the rom because it gave me kernel errors, so I went and started compiling separately because it's easier to fix kernel errors like this.
I am not using Google's tutorial, I'm following one that has almost the same steps and I'm using the same toolchain.
0
Seppppx said:
By toolchain you mean tools that you need to compile a kernel? Why doesn't one just install the tools needed to compile a kernel source.
The guide I linked doesn't specify any toolchain (thus idk if I need one). It also doesn't have anything to do with build.sh script used to compile a kernel. Instead it uses the defconfig. The commands are actually very simple.
cd kernel-source_code
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
make ZD552KL-Phoenix_defconfig
make
Also have you tried to build another kernel that you are sure builds? If another kernel builds. The issues have to do something with the kernel itself. If it does not it's most likely something else.
Click to expand...
Click to collapse
To compile a kernel from source you need something a cross compiler or toolchain in my case I'm actually using the exact same commands you commented with linaro toolchain/cross compiler (aarch64-linux-android). As far as I know you need that to compile a kernel and I don't think the toolchain is the problem but the kernel itself. I can try another kernel later to see if it compiles.
0
Seppppx said:
Okay thanks!
If you manage to compile the kernel for your device make sure to mention/quote me. I would like to contribute. I'm on my way to make another pull request (now about cameras).
Click to expand...
Click to collapse
If you want to talk to me more quickly you can message me on telegram https://t.me/Frost_2003
0