yashsingh1/xdaforums huggingface dataset:
[Android] Hacre:
You still don't need java to compile a kernel.

I wasn't the only one to give you valid advice on your OP:

D. Type "mkdir android"

E. Type "cd android"

G.Type "mkdir kernel"

mkdir -p android/kernel

I'd highly recommend that you turn the addition of the smartass governor into a patch. Anyone interested in kernel development will be picking up third party changes 99% of the time as patch files. You can still explain what the patch is doing (perhaps link to some kernel programming tutorials in reference to the actual C code that gets pulled in).

D. Type "adb pull /proc/config.gz"

The problem with this is very few handset manufacturers enable this option. Samsung don't and the last I looked, HTC don't (if they changed this, great). This would explain some of the "problems" other people have replied to this thread with. This is where you guide your prospective kernel maker into -reading- things, like the READMEs that usually come with the kernel source from the manufacturer, containing information on the defconfig file that already exists for the handset in that source tree.

"export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-"

I'd strongly suggest changing this to export CROSS_COMPILE=arm-eabi-

then adding export PATH=$PATH:~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin

Further to that, be very careful recommending unstable compilers. At time of writing, 4.5.3 is the stable version of GCC.

There's no need for make clean at this step, you haven't built anything so have nothing to clean. It would be a good idea to separate out "make defconfig" and "make menuconfig" into their own configuration section as well as making sure the user knows that you only need make defconfig once. Help them backup the .config file, prior to building, to arch/arm/configs/<name>_<new>_defconfig or something.

You also need a summation at the end of your guide, most XDA users trying this will either get to the end of the build process and think "urrr now what" or the build will fail. For the latter option, add to your instructions retrying the build but with make -j1 (saves scrolling back in the buffer to find the error), detailing how to revert to the unchanged config (make whatever_defconfig created earlier) and see if it builds then.

For the former, they should at least know that the zImage is in arch/arm/boot and that mkdir ../modules/ followed by find . -name *.ko -exec cp {} /path/to/modules/ will pull the modules out of the source tree and into one directory where they can start looking at building a kernel image. Then provide some sample links to tools that do this depending on phone manufacturer, already existing guides on doing this or at the very least, suggest some google terms to search for.

Yes, people at the stage of actually building a kernel should know most of this, but it's XDA and they don't. You've already had someone, with Linux installed, type Is instead of ls to list directory contents, so you can't take anything for granted, unfortunately.
[Android] thewadegeek:
Thanks I'll update/respond once I get back from work.
[Android] thewadegeek:
And I'm pretty sure I credited him, and explained my reasoning. However I made a note of it in the tutorial.

How about I do both?

Another point I overlooked, thanks I think I addressed the issue.

Umm...why? To me adding it to your path just increases the risk of using the wrong toolchain version , is there a reason I wouldn't want to do it my way? I did include a note about using a unstable toolchain though.

Did complete this well enough? Any other notes or bits of advice? Any spelling errors?
[Android] Deadly:
that script is only for splitting boot.img ... and in xda we should not waste our energy by typing thanks ;) and waste storage space :o

just hit thanks button and use xda features !! :D
[Android] forumber2:
I solved this problem. It's causing by wrong include file names.
[Android] triptosyll:
Hey eagleeyetom, can u tell me how to add the ability to overclock to a kernel? I wanna add the ability to a kernel that I've been playing with.

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] hell_lock:
There is no single way for overclocking a kernel.
[Android] triptosyll:
Well I understand that. And I'm willing to create all the files necessary, and do what I need. I'm just wondering if there is any links or places of knowledge that would b of any help

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] Adi_Pat:
Which device? You may need to look at the CPU clock drivers then make the necessary changes to it by either adding the new frequencies (won't always work) you may have to make changes to the source look in arch/arm/mach- and plat- folders of your device and study them closely.. not that easy, you need to study everything properly in there.
[Android] triptosyll:
Thanks for getting back to me, but I gave up on the task. Its way over my head. I like being able to compile kernels, but I don't really have a desire to learn the depths of kernels. Thank you tho!!

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] TheGreatSega:
??

arm-eabi-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.

what does that mean??
[Android] thewadegeek:
It means your toolchain can't find liblto_plugin.so. Check and see if it is in your toolchain directory anywhere and if not you'll need to get the correct version.
[Android] ptmr3:
Hey guys so I figure someone might have sine insight. Both kernel source for Samsung galaxy s2 skyrocket and Samsung Galaxy s2 Hercules (source for kernel version 3.0.8{ics 4.0.4}) compile with camera failing. I have dug through github, Google, and have tried trial and error for a week. Official source killing camera? Makes no sense. Btw this is using sourcery tool chain recommended in official source read me file(2009q3), following normal procedure (I have tried a few different tool chains/ and differing procedures but all come out the same) Now I am not running blind here. I can build, modify and write c. I have already added OC/UV/BLN etc .... any insight would be much appreciated
[Android] hell_lock:
Logcats will be more benificial in this case. Tried using things from other sources?
[Android] ptmr3:
Yes I have tried merging certain things from known working sources. I will get some logs when I get a chance. I have heard from one other user and found one hit on google with someone experiencing the same issue with Samsung source
[Android] FAT_TONI:
edit the Makefile like here worked for me :)
[Android] wantowan2:
Hi, Ive been trying to use your tut here for samsung skyrocket. I'm coming from project rookie in the dev section here==> http://xdaforums.com/showthread.php?t=1798056&page=234

This is a quote from my post there but I thought that I would repost here as this is what I'm following.

The skyrocket doesn't use a zImage I don't think. It seems to compile ok, however I have to start from Part A-B everytime. Moduels seem to compile ok too. "Outcome: A-D,E does not work for me either...

....one more.....I am trying to cross compile with cm10skyrocket source

Great tut and thanks in advance....

and/or feel free to drop by our thread there anytime. =-)
[Android] ptmr3:
Skyrocket most definitely uses zImage
[Android] wantowan2:
Only Odin right? Otherwise flashable zip. (best of my knowledge)

META-INF

system

tmp

boot.img

....is what I'm hoping for. I just don't know how
[Android] ptmr3:
You have to pack the boot.img ... boot.imd is the ram disk/zImage
[Android] wantowan2:
Exactly. The tut stops working for me near the end where the "magic"("find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;") is supposed to take place. This doesn't gather the *.ko files.The comands (Type "cp arch/arm/boot/zImage ../<your_kernel>_output/zImage") I believe makes a file named after my out folder....? I don't fully understand what/where all of them are. The tut stops and states that "...assemble a kernel image containing a initramfs....along with the kernel binary and such. That however is beyond the scope of this tutorial...." So I am trying to learn this.
[Android] KOala888:
What does it mean?

error during compilation

bus error (core dumped)
make *** [vmlinux] Error 135

Do you have guys any idea about the problem and how to solve it?
[Android] wantowan2:
Hey, have you been able to get by this yet?
[Android] hell_lock:
Compiled a kernel but stuck on splash image. Any reasons? It was showing errors in usb n proximity sensor so I swapped the folder and it compiled sucessfully. Both the phones are 98% similar
[Android] Adi_Pat:
Which device? Any proprietary modules? If yes, check vermagic.
[Android] Adi_Pat:
NO DONT! I suggest you define the function prototype. This is not recomended for Kernels.
[Android] hell_lock:
What is vermagic now? lol!! I made it for galaxy pocket n i hav galaxy y sources. Both phones are very similar, we even hav same cpu n gpu.. Only screen size n internal mem differs
[Android] Adi_Pat:
LOL! A lot of stuff may be different xD .. Do a diff between the sources and check!

Vermagic string is the kernel version string in the module, if it doesn't match with propriatary modules, your kernel will not boot. (SAMSUNG ****)

Do, strings module.ko | grep vermagic, make sure it matches with EXTRAVERSION in Makefile.
[Android] hell_lock:
Seems complicated.. Will try it out when I get hands on my pc.

Where are all the modules on a kernel? Also, samsung had a bug in the sources so I had to change the files.. What should I do incase the extraversion doesnt match wid d module?

Thankz bro! Today i learn something new!
[Android] coolsandie:
Vermagic looks like 2.6.35.7-perf-CL650682

And that "CL650682" (it maybe different for your device) should be written in def_config file found in /arch/arm/configs in the line CONFIG_LOCALVERSION="-perf-CL650682"

For my device, to find vermagic was :

strings fsr.ko | grep vermagic
[Android] TheGreatSega:
???

kernel/softirq.c: In function 'local_bh_disable':
kernel/softirq.c:130: error: 'SOFTIRQ_DISABLE_OFFSET' undeclared (first use in this function)
kernel/softirq.c:130: error: (Each undeclared identifier is reported only once
kernel/softirq.c:130: error: for each function it appears in.)
kernel/softirq.c: In function '_local_bh_enable':
kernel/softirq.c:152: error: 'SOFTIRQ_DISABLE_OFFSET' undeclared (first use in this function)
kernel/softirq.c: In function '_local_bh_enable_ip':
kernel/softirq.c:166: error: 'SOFTIRQ_DISABLE_OFFSET' undeclared (first use in this function)
make[1]: *** [kernel/softirq.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....

what does that mean.. ??
[Android] cdesai:
Learn C first, then work with kernels.

Kgraciasadios

Sent from my GT-P1000
[Android] forumber2:
This error causing by include files,you must define the definitions in include files.
[Android] ptmr3:
Yep, using 4.4.3 tool chain. The one specified in the source doesn't build the modules right(tricky bastards lol)
[Android] einsteinecker:
I just thought I'd ask, but is there any way to de-compile someone else's zImage? I spent the past month working on a source that is nothing like the previous member's work, and I feel it's rather pointless trying to fix something that is incredibly buggy, when their last work was mighty fine as it is. The config.gz from it obviously doesn't help either.
[Android] cdesai:
Nope, you simply ask for the source, GNU GPL ftw!

Sent from my GT-P1000
[Android] einsteinecker:
Sadly, that's not an option. It's that typical unfortunate story you see around these parts, user starts working on something, no longer has device and quits development, except the only source he managed to upload was apparently an incomplete work. Due to the lack of response to PM's, I can guess several outcomes:

-The member was making changes without any backups, and unable to fall back to a working source, he uploaded what he had, a buggy source.

-Member lost most of their files, and can no longer share them (I've seen this happen many times).

-Member no longer has said device, and apparently deleted the relevant files from the device.
[Android] PANCHOMATASANO:
Modulo touchscreen

Hello.

I have a problem. I found this "source code" :

https://github.com/vurrut/android_kernel_rockchip_rk2918

or here

https://github.com/yatto/Smartpad-810c-Kernel-3.0.8

But does not contain the "source code" of the module touch my tablet .

How do I add it to the compilation?

I have compiled the module apart and also I have the "source code".

Thank
[Android] PANCHOMATASANO:
any idea?

He added drivers sources.

I modified the kconfig; each folder where I put the new fonts.

When compiling nothing is created, not zImage or kernel.img

Help!
[Android] triptosyll:
Hey guys. Does anyone know how to compile JUST the zimage? I need a precompiled kernel for a build, and Samsung boot.img's are put together strange, and I don't know how to split it and extract the zimage. So I'm hoping there's a way to compile just the zimage, and not the whole boot.IMG. thanks for the help
[Android] PANCHOMATASANO:
Why panchomatasano quote, if not you answer?

The answer to your question is old: dsixda kitchen. Open boot.img and replace zImage with your zImage compiled. (http://source.android.com/source/building-kernels.html)

Thanks? for nothing
[Android] Deadly:
Above post answers it.. but you can also use splitboot img file.. which is perl script..

Extract the script file.. from downloaded file

use this command to extract ramdisk from boot.img using the script..

Keep boot.img and split_bootimg.pl file in same folder.. in terminal go to that folder.. then execute the command..
[Android] triptosyll:
No, none of the scripts work. I've tried everyone I can find. And I can't find a Samsung kernel dev to ask.

---------- Post added at 12:53 PM ---------- Previous post was at 12:50 PM ----------

Like I said, Samsung boot.IMG are packed way different than most. The scripts can't find the 'magic number', and I don't know jack with hex editors.
[Android] Deadly:
just give me that boot.img file of yours.. i will see if its possible to get ramdisk for you... pm me the link... may be you dont have perl installed in your system?
[Android] triptosyll:
K I'll pm it to u when I'm done with work.
[Android] blazingwolf:
It will be different for you but here is a command that I can use to build zImages.

make -C ~/android/source/kernel/acer/a500ics/AcerTabKernel/ ARCH=arm CROSS_COMPILE=~/android/source/platform_prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- zImage

I have no idea if it will work correctly for samsung phones though.
[Android] szezso:
Error with building JB kernel

Hi Devs!

I'm trying to build kernel for CM10 for my Incredible S. But I've got some problems with the toolchain. I already downloaded the CM10 source, and the arm-eabi-4.4.3's path is: home/cm10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3

So, I wanted to export the compiler, I wrote this into the Terminal (when I was in my kernel source, of course): export CCOMPILER=${HOME}/cm10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

But it says this: make: arm-eabi-gcc: Command not found

And that's the reason why I can't build kernel..

Have you got any idea? :)
[Android] einsteinecker:
Did you remember to do export ARCH=arm?
[Android] szezso:
I only wrote what i said into the Terminal... What should I write?
[Android] einsteinecker:
What it says in the first post. I always do cd into my kernel directory, then i type export ARCH=arm, then I type make device_defconfig, then I type make menuconfig to make changes, then when I'm done with that, I type a similar command like you did for your toolchain.
[Android] szezso:
Huge thanks, it works now! :) Another question: somebody knows, how can I put OC in my kernel source? Is there a patch, which can make it? :)
[Android] einsteinecker:
We're talking about an HTC device, right? My guess is to look for a kernel that does have it, and then the hard work of porting it over :p (well, to me I have a hard time porting drivers, maybe it'll be easy for you!)

There's something fun that I've been doing the past few days. Go to github.com, and search for "Incredible S", or maybe just "incredible", as I'm not sure if they can search the S as well. Maybe there's something there.
[Android] szezso:
Okay, I will try it! :)
[Android] souravmohuri:
Please don’t ignore this post. At least read it for once.

Sorry for disturbing you.

Please don’t ignore this post. At least read it for once.

I am an xda forum member having handset Spice Mi-355.

It’s a Chinese rebranded phone (k-touch w650), having clones like Mobistar S01, Karbonn A7.

The phone came with gb 2.3.6.

Now Mobistar devs have made an ics ROM 4.0.4 for their S01.

As previously we used gb ROM of S01 in our Spice Mi-355 without any problem so we spice users were confident that this time we can have ics too.

But when we flashed the ics ROM of S01, everything went well but after reboot we stuck at lockscreen.

The touch sensor is not working at all.

Then as a tweak we replaced the boot.img of s01 ics rom with another ics boot.img from an almost similar handset karbonn a5 which has similar hardware specifications except camera.

Our Mi-355 has 5mp back camera with flash and a 0.3mp front camera whereas Karbonn A5 has 2mp back camera without flash and a 0.3mp front camera.

So replacing the boot.img we got the ics rom working for us but camera is not working.

I have tried in several ways to make the camera working, but none worked for me.

Even I tried to edit ramdisk files for permission issues but this didn’t work for me.

I am not a developer and my sources are very limited.

I used Cygwin and dixda’s kitchen for boot.img but it has its own limitation.

I cannot modify “boot.img-kernel” with those tools.

As a windows user, I am not comfortable with linux distros like Ubuntu.

So can you give it a try to modify the kernel for us to make the camera working?

Preciously we want you to modify the boot.img of S01 ics rom so that we don’t get stuck at lock screen.

I have attached here the boot.imgs of original s01 ics rom and the working karbonn A5 (Rebranded K-touch w619) ics rom.

Also I have provided the boot.img of our gb stock rom together with build.prop of stock gb and s01 ics rom.

The attachment file is only 5mb and it won’t eat your bandwith.

We are 200% sure that the problem is due to boot.img.

The s01 and karbonn a7 users do not have the touch sensor issue and they have their camera working.

So please take this job. We spice mi-355 users are eagerly waiting for our working ics camera.

Please modify the boot.img of S01 ics rom and make it working for us.

http://xdaforums.com/showthread.php?t=1752589

If possible you can post your reply in the above forum too or you can mail me @

sourav.mohuri@gmail.com

It would be great if you join our forum. We will have your guidance then.

We are eagerly waiting for your reply.
[Android] TheGreatSega:
I'm getting this error

CC arch/arm/boot/compressed/misc.o
arch/arm/boot/compressed/piggy.S: Assembler messages:
arch/arm/boot/compressed/piggy.S:4: Error: file not found: arch/arm/boot/compressed/piggy.gz
make[2]: *** [arch/arm/boot/compressed/piggy.o] Error 1
make[2]: *** Waiting for unfinished jobs....
MODPOST 21
LD [M] arch/arm/mach-msm/dma_test.ko
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....

Some plz help me!!!
[Android] thicklizard:
You are missing a file in your arch/arm/boot/compressed folder.
[Android] TheGreatSega:
It's there

Nope the file piggy.S is there
[Android] thicklizard:
Is piggy.gzip?
[Android] TheGreatSega:
Nope

No... That's not there... But where do I get it from??

I also switched from 4.4.3 to 4.7.2 tool chain
[Android] thicklizard:
You can browse github.com for one not sure why that would not be in your source, gzip is usually the default compression used
[Android] TheGreatSega:
Ok So I did that.. But now I'm getting another error...

Arch/arm/boot/compressed/vmlinux: file not found...

What's missing now??
[Android] ktempleton:
ok so when i try to apply the patch this is what i get

ken@ken-VPCEH32FX:~/android/kernel/msm8660-common/kernel$ patch -p1 < ../kernelPatch

bash: ../kernelPatch: No such file or directory

ken@ken-VPCEH32FX:~/android/kernel/msm8660-common/kernel$

i have trie putting under kernel also under msm8660-common is the kernel folder the root of msm8660,,,,???ive been messing with this for a while... im new to this but i have searche and cant seem to find what i need..thanks for your help
[Android] thicklizard:
Seems like vmlinux.lds.in
[Android] TheGreatSega:
That's there for sure I checked.. And the file hasn't been modified either... Do you think it could be a arch/arm/boot/compressed/makefile issue?? Or head.S
[Android] thicklizard:
Idk hard to tell
[Android] TheGreatSega:
Ok thanks... I'll figure it out.. But if you find out just pm me.. Cheers
[Android] nicholaschw:
Cmon man, Need serious help here. The battery drain is extreme and apart from that, i have a poor AnTuTu Result for CPU float point, RAM and 2D. Any tips for improvements to RAM etc?
[Android] neectron:
neectron@neectron-VirtualBox:~/pepper/kernel$ export ARCH=arm
neectron@neectron-VirtualBox:~/pepper/kernel$ export CROSS_COMPILE=/home/neectron/toolchains/linaro/bin/arm-eabi-
neectron@neectron-VirtualBox:~/pepper/kernel$ make riogrande_pepper_defconfig
#
# configuration written to .config
#
neectron@neectron-VirtualBox:~/pepper/kernel$ make menuconfig
scripts/kconfig/mconf Kconfig
drivers/input/misc/Kconfig:646:warning: type of 'INPUT_LPS331AP' redefined from 'tristate' to 'boolean'
warning: (CW1200) selects CFG80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && (RFKILL || !RFKILL))
warning: (CW1200) selects MAC80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && CFG80211)

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

neectron@neectron-VirtualBox:~/pepper/kernel$ make
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/input/misc/Kconfig:646:warning: type of 'INPUT_LPS331AP' redefined from 'tristate' to 'boolean'
warning: (CW1200) selects CFG80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && (RFKILL || !RFKILL))
warning: (CW1200) selects MAC80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && CFG80211)
warning: (CW1200) selects CFG80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && (RFKILL || !RFKILL))
warning: (CW1200) selects MAC80211 which has unmet direct dependencies (NET && !COMPAT_WIRELESS && WIRELESS && CFG80211)

*** Error during update of the configuration.

make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.

Any idea what might be causing it?
[Android] espaciosalter20:
Hi neectron! I see that you are trying to work out with source code provided by Sony in 6.1.1.B.10, well I'm also getting this errors compiling the kernel but I figured out that there is some missing pointers in general kconfig all related with wireless drivers. I didn't yet debug those errors because I had been working with building just modules and I had disabled wireless part in config to make modules without errors.

Enviado desde mi MT27i usando Tapatalk 2
[Android] neonoafs:
With this guide, can I Boost m Wifi Chip? I have a Chinese tablet and already did my own ROM with Kitchen process, but since the original Stock ROM, Wifi wont go Higher than 1Mbps and cut connections all the time =(. Building a Kernel can I boost it up?