[Q] Kernel builds - Nexus 7 Q&A, Help & Troubleshooting

Hello all, and befor all, sory for my poor english.
I just want to ask you for some help. I was trying to build my oun kernel for the nexus 7 (ba dum tsss) and want some information about this, since I never compile anithing for android.
I have knowledge about programming, and if I fin something I don't know, learn about it and try, like everyone I assume
I have readed a lot of guides here and there, but I can't find anything specific about how to create a custom kernel, mod voltages, frequencys, and the most important, create a recovery flashable zip.
So, if somebody can point me with some instructions on how to do it, I will be very thankful.
Thx for the help and have a nice day

Download the source and a toolchain in a Linux distro. Unpack the source, and navigate to the folder in Terminal. Type this:
Code:
export ARCH=arm
export CROSS_COMPILE=/path/to/toolchain/bin/arm-xxx-xxx (figure this part on your own)
Edit your defconfig from arch/arm/configs. Then type in
Code:
make xxx_defconfig (where xxx is the name of your defconfig)
make -j# (where # is the number of cores + 1)
This will take some time. Patiently fight out errors, and I'd recommend you start with a vanilla build.
After it's done, grab the zImage from arch/arm/boot/. Grab a flashable kernel that does not use boot.img. Delete the zImage from there and rpaste in your zImage. It should be flashable now.
Let me know if you need more help.

Thx for the info, I have some questions
How or where can I download the kernel source? (Yeah, I want to work with the google vainilla one for the stock rom)
Do you recomend the linaro toolchain or the google original one?
Sory, I work with eclipse and svn repos for years, never work with other programs or source code sistems xD
Sent from my Nexus 7 using xda app-developers app

http://source.android.com/source/building-kernels.html
This link's got much more details. Plus if it supports Linaro, go with Linaro toolchain.

Im stuck in the defconfig making part, how can i know the name of my defconfig file?
Sent from my Nexus 7 using xda app-developers app

If I rember correctly to build the kernel its
make grouper defconfig
But its been a few months since I've touched my source codes
But the defconfig is just the codename of the device your building for (aka WiFi nexus 7 is grouper gsm is tilapia)
Sent from my Nexus 7 @1.60 GHz on Stock 4.2.2

Ok, when I try to run the make grouper command, it say defconfig not found or something like that (sory, I am not om the dev ,achine right now xD).
Apart, any help about adding frequency to cpu steeps and gpu steeps (oc support for 1,7 single core, 1.6 quad and 520 gpu with 1.7 default frequency).
Yeah, I know, it's a lot of information, but I never touch linux kernel on the past, and don't know anything about it some directory info will be great xD
Sent from my Nexus 7 using xda app-developers app

All of it is found in the /arch/arm/mach-msm directory. Some files are linked so you'll have to update both. And for the defconfig, navigate to the /arch/arm/configs directory (not in Terminal) and note down the name of the defconfig you want to use. It varies with different kernel sources.

THX for all, I viewthe faux123 kernel source for reference, and found the files I need to edit to allow cpu and gpu oc, and the defconfig for nexus 7 are the tegra3_android_defconfig, strange name jaja
I am installing ubuntu x64 12.04 LTS because of compatibility things over 13.04 Thx for all the info and all the help guys
Sent from my Nexus 7 using xda app-developers app

Actually for faux kernel it's better to use faux_grouper_defconfig if you want your kernel to have features that faux-kernel has.

Related

Kernel Checkouts.

Hi guys,
I can not seem to find the links to where I can checkout the latest available kernel sources.
Anyone has some gits where I can checkout the latest hero kernel sources?
Thanks in advance,
Unfortunately there are no recent Kernel sources :/ The latest version HTC released is for 1.5 but here you go man
http://member.america.htc.com/download/RomCode/Source_and_Binaries/kernel_hero_0078c992.tar.bz2
Yea I got this one. This is the 2.6.27.. I see a lot of roms using the 2.6.29 sources.
I am having issues flashing my kernel.
These do not work:
These give me a Failed, not allowd:
Code:
fastboot flash boot newBoot.img
fastboot flash zImage zImage
These give me a kernel panic or something as the phone keeps rebooting at Hero boot screen.
Code:
adb push newBoot.img /sdcard
adb shell
cat /dev/zero > /dev/mtd/mtd2
flash_image boot /sdcard/newBoot.img
I have followed a lot of different guides but all are the same.
If someone could give me some pointers on how this is exactly being done please do.
Thanks in advance,
http://forum.xda-developers.com/showthread.php?t=551711
all you need is in there. try with a working kernel first, so you are sure that you rebuild the boot.img correct. then try your own kernel.
Thanks. Will try that one out.
Are you sure you're flashing a kernel appropriate for your device?
If you're using a GSM Hero, you can't flash a kernel from, for example, sprint hero.
If you compiled your kernel by hand, check if you have the proper modules enabled (check against someone else's config).
You can also try getting the running kernel's config by:
zcat /proc/config.gz > /sdcard/good_kernel_config
and load this into your kernel tree (provided the chef enabled export kernel config by config.gz)
Hi,
Yeah I did take the config out of the default htc hero. I kept it before to try other roms out
I am sure I have been using the correct 2.6.27 hero kernel to compile, I just can not find the 2.6.29 hero sources anywhere.
Anyone has a clue where I can find those?
is not released yet , only a early build of 2.6.29 is leaked...
I just checked 2.6.29 out. Compiled it correctly and testing it out now
Only problem at the moment is the wlan module is not being build correctly.
may i ask what sources you used?
goldfish sources
you do know that these are sources for the kernel for the emulator?
bet you a case of beer that you won't boot these on the hero!
kendong2 said:
you do know that these are sources for the kernel for the emulator?
bet you a case of beer that you won't boot these on the hero!
Click to expand...
Click to collapse
Ah too late with this thread. Is the bet still on?

Kernel location

I was wondering if some kind person could tell me how to get to where the kernel is located using root explorer and what the exact name of the kernel is,or are there more than 1 files that make up the kernel .I would really appreciate it,thanks
Currently running 2.3.5 / nscollab
sent from my Nexus NScollab
Its made up of many files none of which will give you the name. The closest you will get is settings/about phone.
Sent from my Nexus S 4G using xda premium
Download the kernel zip and see the files that are in there.
By the way, don't post the questions in the Development section, there is s Q&A section.
What brainmaster meant to say was post in q&a forum instead of general
Sent from my Nexus S 4G using xda premium
mike216 said:
I was wondering if some kind person could tell me how to get to where the kernel is located using root explorer and what the exact name of the kernel is,or are there more than 1 files that make up the kernel .I would really appreciate it,thanks
Currently running 2.3.5 / nscollab
sent from my Nexus NScollab
Click to expand...
Click to collapse
So, technically the kernel file name is going to be zimage - and depending on your kernel build you may have one or more modules that will be loaded (at the very least you will have the bcm4329 module for wifi).
However, you won't find zImage within the filesystem - it's contained within the boot.img and written to the boot partition.
The modules will be present usually in /system/modules - but this can change depending on your ROM if someone really wants to change it and update the init scripts.
If you're just curious of the build check about phone under kernel version. However, the is configurable as well at build if desired.

[B928] SIO scheduler + SmartassV2 & OndemandX

EDIT: Use these at your own risk! These modules are built from the U8860 source, which is almost the same as the U8800pro one but not quite. In theory corruption may occur as something else may be located at a certain position in memory where the module expects something else to be there. I have yet to notice anything on my phone, but the risk is still there.
EDIT 2: My phone randomly rebooted. I haven't yet determined if these modules were the cause, but, still.
Hi,
Since the SIO IO scheduler is the one I favourite, I built the module for the B928 U8800pro firmware (tested on bronxitas' CWM variant).
1. gunzip the attached sio-iosched.ko.gz in /system/lib/modules
2. chown root.root /system/lib/modules/sio-iosched.ko && chmod 644 /system/lib/modules/sio-iosched.ko
3. Add "insmod /system/lib/modules/sio-iosched.ko" to /system/etc/install-recovery.sh
4. Reboot (or insmod now :shrug and use SetCPU or No Frills CPU to change the IO scheduler.
If you want to use SmartassV2 and/or OndemandX, insmod symsearch.ko first and then the cpufreq modules. Thanks to AnDyX, Skrilax_CZ and whirleyes.
What Is This? Give Me Brief Detail What This Thing Do?
husen4u said:
What Is This? Give Me Brief Detail What This Thing Do?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1558153
qwerty12 said:
Hi,
Since the SIO IO scheduler is the one I favourite, I built the module for the B928 U8800pro firmware (tested on bronxitas' CWM variant).
1. gunzip the attached sio-iosched.ko.gz in /system/lib/modules
2. chown root.root /system/lib/modules/sio-iosched.ko && chmod 644 /system/lib/modules/sio-iosched.ko
3. Add "insmod /system/lib/modules/sio-iosched.ko" to /system/etc/install-recovery.sh
4. Reboot (or insmod now :shrug and use SetCPU or No Frills CPU to change the IO scheduler.
If you want to use SmartassV2 and/or OndemandX, insmod symsearch.ko first and then the cpufreq modules. Thanks to AnDyX, Skrilax_CZ and whirleyes.
EDIT: These were built from the U8860 3.0.8 kernel source which isn't the same as the U8800pro kernel, but close enough. Use at your own risk.
Click to expand...
Click to collapse
Did you use the honor kernel??cos geno release a 3.0.8 kernel from honor source and the usb didnt work and also it corrupt my sdcard...if you have knowlage release a proper kernel working with sio and o/c inside...until then this isnt much help!! :/
pikachukaki said:
Did you use the honor kernel??cos geno release a 3.0.8 kernel from honor source and the usb didnt work and also it corrupt my sdcard...if you have knowlage release a proper kernel working with sio and o/c inside...until then this isnt much help!! :/
Click to expand...
Click to collapse
They're modules - not an entire kernel - built from the Honor source, but tricked into loading on our original Huawei U8800pro 3.0.8 kernel...
It is possible that something can go wrong because this isn't built from the original source (you're not meant to do this - kernel structures in memory may be located somewhere else etc.), but I haven't noticed any corruption on the internal eMMC so far on my U8800pro with OndemandX governor and SIO I/O scheduler [and logcat kernel module built from this source] & USB is working fine
qwerty12 said:
They're modules - not an entire kernel - built from the Honor source, but tricked into loading on our original Huawei U8800pro 3.0.8 kernel...
It is possible that something can go wrong because this isn't built from the original source (you're not meant to do this - kernel structures in memory may be located somewhere else etc.), but I haven't noticed any corruption on the internal eMMC so far on my U8800pro with OndemandX governor and SIO I/O scheduler [and logcat kernel module built from this source] & USB is working fine
Click to expand...
Click to collapse
so you compile the honor source...add the modules and had a working kernel??so its easier to release the boot.img and if you can add o/c but its funny that geno compile honor source and it didnt work properly!!!
pikachukaki said:
so you compile the honor source...add the modules and had a working kernel??so its easier to release the boot.img and if you can add o/c but its funny that geno compile honor source and it didnt work properly!!!
Click to expand...
Click to collapse
No, no! Genokolar actually did some proper work to try and get the Honor source working for the U8800pro but too much is missing (drivers that the U8800pro needs)
My approach was to take the Honor source and bastardize it into getting these modules built (files that let you introduce code into a running kernel after it's been built) and trick them into loading on the original kernel
This is a dangerous trick (there's a reason why the kernel checks to see if the version stored in the module matches your running kernel) because you're not meant to do this (corruption can occur) but so far everything has been working OK for me and I'd rather be using the phone with the modules as it feels a bit smoother. It is possible to add OC support through modules without having to replace the kernel (http://hex.ro/wp/blog/overclocking-an-android-phone-running-with-an-msm-core/) but it's harder to do and more dangerous to do with the Honor sources because it's not the original kernel source. Actually I should edit the first post...
qwerty12 said:
No, no! Genokolar actually did some proper work to try and get the Honor source working for the U8800pro but too much is missing (drivers that the U8800pro needs)
My approach was to take the Honor source and bastardize it into getting these modules built (files that let you introduce code into a running kernel after it's been built) and trick them into loading on the original kernel
This is a dangerous trick (there's a reason why the kernel checks to see if the version stored in the module matches your running kernel) because you're not meant to do this (corruption can occur) but so far everything has been working OK for me and I'd rather be using the phone with the modules as it feels a bit smoother. It is possible to add OC support through modules without having to replace the kernel (http://hex.ro/wp/blog/overclocking-an-android-phone-running-with-an-msm-core/) but it's harder to do and more dangerous to do with the Honor sources because it's not the original kernel source. Actually I should edit the first post...
Click to expand...
Click to collapse
I see that you have the knowlage...and also you can let us try if you want the kernel...but if you manage to o/c it this will be wonderful..and also there is a english word bastardize??? i willing to give your kernel a try although!!
pikachukaki said:
I see that you have the knowlage...
Click to expand...
Click to collapse
I wish I know only the basics - people like dzo and genokolar know what they're doing
and also you can let us try if you want the kernel
Click to expand...
Click to collapse
The Honor kernel is useless - I don't think it would even boot... I just take the modules
...but if you manage to o/c it this will be wonderful..and also there is a english word bastardize???
Click to expand...
Click to collapse
I would like to OC, I admit, but it's very risky to attempt when the person (me) is lacking a lot of knowledge about kernels, CPU clocks and assembly, and when the kernel source isn't the original - I'd have to attempt to guess things from the 2.6 source
And, yes, bastardize is a real word, meaning to corrupt, make illegitimate and reduce the quality of something. It's an apt word for the stuff in the first post!
qwerty12 said:
I wish I know only the basics - people like dzo and genokolar know what they're doing
The Honor kernel is useless - I don't think it would even boot... I just take the modules
I would like to OC, I admit, but it's very risky to attempt when the person (me) is lacking a lot of knowledge about kernels, CPU clocks and assembly, and when the kernel source isn't the original - I'd have to attempt to guess things from the 2.6 source
And, yes, bastardize is a real word, meaning to corrupt, make illegitimate and reduce the quality of something. It's an apt word for the stuff in the first post!
Click to expand...
Click to collapse
hmm at least you have some knowlage.. so you didnt edit the boot.img you edit sideways! hmm if you manage to play with this a bit it will be great....we also have the word basardise and i never heard of it until now...by bastardise (Bastarde) its a curse a "bad" word...we mean someone that isnt his parents child!
Honor boot.img works on our phone almost perfectly, phone boots but some diferent hardware (wifi, camera, bluetooth) doesn't work (ril OK). Cpu has clocked to 1,4GHz and works very stable. We find it moth ago, but with other hardware didn't work we dropped this work. Maybe you could find something usefull from that.
Sent from my ragelis
great job qwerty12!
Trust me what you've done needs more than just basic knowledge
I'll also tell that honor kernel boots up correctly on u8800pro(in my occasion touchscreen just didn't work, so I could only see a beautiful lockscreen there xD).
I think you should try also adding OC. Although I kinda understand you don't want to risk damaging your phone, but I'm pretty much sure that you'll manage to add OC correctly.
Anyways, keep it up!
Again great job and thanks!
Crazy talk...but we can't took rils from GB kernel...or even desire hd or some other similar phone and make our way??and geno again didnt release his honor/u8800+ source kernel code so someone can fix the sd bugs!!
also..good news everyone...(profesor furnworth) i found cm9 device tree for u8800+ dont know if its working properly but someone with linux can give it a try
https://github.com/ivan19871002/cm9_device_u8800pro
https://github.com/ivan19871002/cm9_vendor_u8800pro (Im not quite sure what this is but maybe its needed!)
@pika
great news about cm9. I hope someone is gonna give it a shot and build it. Better post it on anzhi too.The more people see it, the better.
@qwerty12
I had an idea for OC in u8800 pro. The good thing about this one, is that I think is more safe to try out.
I think you can use dzo kernel source!
boot.img from latest dzo aurora works just fine on our phone(only bt + wifi don't work at all - camera works partially)
OC on dzo kernel also works correctly on u8800pro(personally tried this).
I think with your knowledge, you can just grab dzo kernel source and build the appropriate modules.
Please give it a try if you want to.
Again thanks for your great work.
the guy is chinese and he is known in anzhi i dont know why they arent compiling it... i try last night until 8 in the morning with no success! :/
Moihack said:
I had an idea for OC in u8800 pro. The good thing about this one, is that I think is more safe to try out.
I think you can use dzo kernel source!
boot.img from latest dzo aurora works just fine on our phone(only bt + wifi don't work at all - camera works partially)
OC on dzo kernel also works correctly on u8800pro(personally tried this).
I think with your knowledge, you can just grab dzo kernel source and build the appropriate modules.
Please give it a try if you want to.
Again thanks for your great work.
Click to expand...
Click to collapse
The thing is, (I/O) schedulers can be built as modules - load them, and you're adding new functionality. However, the difference with OC support: CPU regulation (probably the wrong term) is built into the kernel - it has to be. With dzo's kernel, overclocking works because the "CPU regulation" code has been directly modified to allow the user to support higher frequencies. With a module designed to enable overclocking for phones where you can, you don't add new functionality like with the schedulers - you're patching the kernel code in memory that controls the CPU.
I will look into it (people infinitely more clever than me have done it for other phones and produced code and, believe it or not, I do actually want to OC my U8800pro and I don't mind the risk personally), but it's unlikely I'll be able to come up with anything since:
I am not a proper programmer (this is probably reason enough to stay away )
Loading modules designed for another kernel is already risky enough, but even more so since I'm dealing with a kernel designed for another model so,
I'd have to look at the 2.6 kernel source to see what the frequencies etc. assigned to the U8800pro are and hope that Huawei didn't change anything for the 3.0 kernel
There is a ics boot.img with OC to 1.8GHz already, but needs to fix sd card mounting bug, on some phones sd card mounts normaly, on other ones didn't mount my phone no maunting sd
Sent from my ragelis
bronxitas said:
There is a ics boot.img with OC to 1.8GHz already, but needs to fix sd card mounting bug, on some phones sd card mounts normaly, on other ones didn't mount my phone no maunting sd
Sent from my ragelis
Click to expand...
Click to collapse
And at mine scruew my sdcard (( it needed format after installing geno kernel
Sent from my U8800Pro using xda premium
Tomorow giris said that look at oc boot.img and will try to fix sd card mounting problem. The new OC boot.img is not geno's work we are in one step further than geno
Tommorow giris will upload to chinese developers my and kamatozko work and... i think that europeans are leaving china customers/developers behind in this situation
I can't upload here kamatozko OC boot.img because it is not finished yet and I even didn't asked his permissions to do that.
Sent from my ragelis
bronxitas said:
Tomorow giris said that look at oc boot.img and will try to fix sd card mounting problem. The new OC boot.img is not geno's work we are in one step further than geno
Tommorow giris will upload to chinese developers my and kamatozko work and... i think that europeans are leaving china customers/developers behind in this situation
I can't upload here kamatozko OC boot.img because it is not finished yet and I even didn't asked his permissions to do that.
Sent from my ragelis
Click to expand...
Click to collapse
chinese cant make nothing except for geno and geno took all the chinese he can get and make miui for them he just can't or won't work with our phone..anyway thats good news let hope more devs pop out!!for once in my life i want cm based rom!

[Q] Compiling Custom Kernel From Source

Hey there
I'm trying to compile some custom kernels posted by members. However I've been having issues with compiling.
I'm using the latest Linaro toolchain, 4.7.
The error I receive is
Code:
lib1funcs.o unknown CPU architecture
and
Code:
piggy.gzip.o unknown CPU architecture
Anyone got any solutions?
I've found a solution for a different device (Samsung I think) however it doesn't work :/
I would be willing to change toolchains
Thanks
Start off with a different toolchain
Sent from my Nexus 7 using xda app-developers app

Q

How to use toolchain for edit kernel?
Sent from my GT-S5360 using xda premium
You use toolchain to build kernel from source. Not to edit it.
And questions should be posted in Q&A section
In simple words Toolchain is a set of tools used to compile a kernel/rom...
Their are 3 toolchains AFAIK! One is normal one which can be found on www.codesourcery.com second is Linaro Toolchain and third is SaberMod Linaro!
For linaro > www.linaro.org
for SM Toolchain you have to search

Categories

Resources