yashsingh1/xdaforums huggingface dataset:
[Android] thewadegeek:
Depends on your device, but well beyond the scope of this thread.

Getting your kernel to actually boot is beyond the scope of this thread, there isn't anything I can help you with here.
[Android] umberto1978:
Thanks for your answer. And yes, i edited my defconfig and load it before i build the kernel, but just to be sure that my modifications are right, ive taked a look in .config after loaded the defconfig and my choose are correct.

I want to add some specs about the trouble: my kernel supports init.d scripts; i put in init.d a script to change governor at boot and to set, for example, the default scheduler and voltages for frequencies. It works for i/o scheduler and voltages as well BUT not for governor, and ondemand is still the default governor at boot.

Waiting for a response here, ive tried flashing many custom kernel for galaxy sII and this seems to be a common problem (or issue, i cant evaluate this correctly): using Speedmod kernel i have the same attitude. The same script can set the I/O scheduler BUT not the governor (and voltages of course, because speedmod kernel doesn't support UV).

In the rom i'm running there is no other script, except the one mentioned above (putted only for testing purpouse).
[Android] thicklizard:
Look at the roms post boot.sh. It's located in system/etc. This usually calls for on demand as default and overrides tlyour settings.
[Android] umberto1978:
Solved. How? I take a look at init.rc and at the end of the document there's a section that recall a file named "DVFS.sh". Just comment the lines about dvfs and done!

Helped that I gift first a look at initramfs of some one else kernel (gokhanmoral) and I realize that.

Thanks anyway to all. :D

Inviato dal mio GT-I9100 con Tapatalk 2
[Android] WhiteDawn:
I would just like to thank the OP. My phone is currently running on a kernel built from source on my system. While much of the work was my own, your guide got me on the right foot and the right direction that just exploded into a success. Thanks so much for your time!
[Android] dany547:
so no one knows? ok
[Android] triptosyll:
So, I know this error is because I'm trying to build the kernel inline, and that's not what this threads about, per say, but you seem to know ur ****, so I'm hoping u can help.

http://pastebin.com/DH85zNJE

(Its in debug mode, so its kinda long. And its everything from the terminal that had to do with the kernel building incorporation, that I could see)

Thanks for any help u might want to provide. :thumbup:

________________________________

Bacon in my coffee, please? U don't have bacon?! Unacceptable!!
[Android] thewadegeek:
Looks like it is having issues finding some files. Have you ensured that all the files it is looking for are present? And that it has permission to access them?
[Android] triptosyll:
I'm in the process of checking all the appropriate files. I'm having a hell of a time figuring this out

________________________________

Bacon in my coffee, please? U don't have bacon?! Unacceptable!!

---------- Post added at 05:24 PM ---------- Previous post was at 04:37 PM ----------

I can't figure out from the error what files its having trouble with. You have any idea? I mean I know it can't open the ramdisk and the recovery-ramdisk, but why? It should b building those, so it should have no problem opening them, right? I checked permission, they're fine. I don't know if I have all the files I need, because I can't figure out which files might b missing.

________________________________

Bacon in my coffee, please? U don't have bacon?! Unacceptable!!
[Android] incarnation95:
File ../../ramdisk.img could not be opened for reading
line 53
File ../../ramdisk-recovery.img could not be opened for reading
line 54

i had the exact error while compilling the kernel for my samsung galaxy s2 i9100G.

what i did was went to root kernel>usr>initram.list (the only .list file)

there are two lines

../../recovery.cpio

and

../../ (other recovery file i forgot the name:P )

i just changed the ../../ to my correct location

../../ -----> /home/kernel

but what my problem is my zImage is just 2.9 mb whereas the kernel that i am compilling (cm10 kernel) is 4mb.

so i am not sure changing those ../../ did the trick or i am missing some files :/
[Android] triptosyll:
Well either way, thanks! Its a starting point, which is a lot farther than I've been in about a week. I'll see what I can do! Thanks yo! And when/if I get it, I'll let u know the size of the kernel .img.

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!
[Android] triptosyll:
Very freakin informational post. Thanks yo. That's a huge help!

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!
[Android] incarnation95:
I also tried compilling stock kernel.

Couldnt get the device to boot either.

And the logcat also doesnt work while in bootloop(at galaxy s2 screen).

And the size is good normal 6mb that i compared to a working kernel.

I flash kernels from odin and use the folloing command to tar it.

Tar cvf name.tar zImage.

Am i doing it right or i should make a flashable zip.?

And ALSO I TALKED TO ANOTHER DEV ABOUT THAT RECOVERY ERROR.

HE SAID IF YOU HAVE THE WHOLE AOSP ROM SOURCE, IT WOULD MAKE THINGS A LOOOOOT EASIER.
[Android] Deadly:
U don't have ramdisk file inside tar?

I mean zImage should be included in boot.img along with ramdisk.gz file.. the boot.img file should be in tar file..

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] incarnation95:
There is only a zimage in.my tar.

I AM MAKING KERNEL FOR SAMSUNG MOBILE. SO IT MIGHT BE DIFFERENT FROM oTHER DUE TO HEADERS DIFF. I GUESS
[Android] Deadly:
See my sign... I built it for Samsung galaxy y duos... u need to get ramdisk from boot.img file from stock kernel if you have backup of it.. or someone else's kernel zip file...

Go to this thread.. this will help you do the extract of ramdisk and repack it with zImage to get boot.img.. Link

flash that boot.img by putting it in tar compression.. i mean making a tar file of it...

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] incarnation95:
i tried it and get this error

Android Magic not found in boot.img. Giving up.
gzip: ../boot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
mv: cannot stat `boot.img-kernel': No such file or directory
mv: cannot stat `boot.img-ramdisk.gz': No such file or directory
Find zImage, initrd.img, incarnation.cfg and ramdisk-contents inside 'bootimg-contents' in output folder
[Android] Deadly:
K.. I will upload a perl script for you.. it has the ability to extract ramdisk from boot.img file.. File link

Extract the script 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..

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] incarnation95:
Ll try it asap .

thanks for your help bro
[Android] incarnation95:
Same error :/

Android magic not found. Giving up.
[Android] Deadly:
ok.. guess your device has something different.. try talking to any kernel dev of your device.. see if they have any different method.. sorry couldnt help :(
[Android] incarnation95:
https://github.com/fuss132

See this.

This is the source i am using.

And he has some different folder of initramfs as well as ramdisk. Could you guide me if this is any useful
[Android] ciscogee:
http://forum.samdroid.net/f28/modify-zimage-without-recompiling-2664/#post56761

try this^ (u would have to edit scrpits based on device and sizes)

let me know cause i will have to do the same when i get time since my device only has zImage also

if works, make tut :P, i got classes starting monday so ill be down on dev'n

also found this: https://github.com/xiaolu/galaxys2_kernel_repack

repack zImage
[Android] incarnation95:
I ll dont worry wont forget you. I am talking to 3 kernel devs side by side.

They are sooooo busy... lol

They told me that they ll talk tomorrow.:D

Ll let you know the outcome:D

Ll try this too.

Thanks
[Android] triptosyll:
Yeah let us know. I've tried three different scripts to extract the files from the boot.img, and still can't. I've been researching like crazy, and can't get anywhere. This is much needed info haha

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!
[Android] thicklizard:
Have you tried using dsixadas kitchen to unpack and repack the boot img?
[Android] incarnation95:
Dsixadas kitchen is sadly not supported by my s2 variant i9100g.

So only devs are last option.

And in the spirit of open source and their helpfull nature i hope we could succeed in what we all are are trying to do.

I know we all have searched alot and dont even have anything else to read more. I am trying my best and the devs i know will surely help me that i have faith in.

Now its just when they are free.

I ll post their advice asap.
[Android] hell_lock:
Where are you stuck bro? I am also a kernel developer for samsung phones so I can be of some assistance.
[Android] incarnation95:
this is the error that i and another person get while compiling a kernel.

File ../../ramdisk.img could not be opened for reading
line 53
File ../../ramdisk-recovery.img could not be opened for reading
line 54

ACTUALLY I HAVE ALSO given a link to a github a few posts back from which i have downloaded source.

The dev has things only for my phone yet. So everything there is for my phone too. So maybe you could tell what am i doing wrong and if i need to repack it with ramdisk how to?

Beacuse i just saw that he has a seperate ramdisk folder in his git. Maybe that is for recomlilling it with zimage?

I am confused a bit.
[Android] ciscogee:
Disixdas kitchen can be updated manually to support ur variant.

Look through kitchen folders and edit appropriatly. I had to with my galaxy s variant.

This will help with everything in kitchen except zImage upack/re
[Android] triptosyll:
This is the error that we have. (Its long winded, I know, I wanted to make sure it had all possible info. Oh, and its in debug mode :P ) For some reason we can't get inline kernel building to work right. And were also trying to figure out how to split Samsung boot.img's. None of the perl scripts work for extracting things.

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!
[Android] incarnation95:
hey mate do you have the whole cyanogenmod source? and the teamhacksung's buildscript too?

we differ a bit. I AM JUST DOING THE KERNEL COMPILING. NO INLINE COMPILING.

anyway i talked to dev as he promised :)

so this is his reply.

WHICH IS YOUR DEVICE?. AND I AM JUST CONFIRMING THATS THESE FILE ARE NOT DEVICE SPECEFIC :)so that you could also use the same!
[Android] triptosyll:
My device is the fascinatemtd. No I don't have cm source, I have aosp, and no I don't think I have teamhacksung build script. Going to fetch it now. Can u see if that kernel dev has those files for this device? Or if he can give me a name of someone who might.

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!

---------- Post added at 02:30 AM ---------- Previous post was at 02:05 AM ----------

None of those scripts are for my device. I'll look some more tom.

---------------------------

Bacon in my coffee, please? u don't have bacon??!! Unacceptable!!
[Android] incarnation95:
http://xdaforums.com/showthread.php?t=1778984

have a look at this and he is the dev i was talking to, he is helpful, ask him where could you find your files.

btw are you tryna compile an ics or jb kernel?
[Android] triptosyll:
Thanks I'll do that. And I'm after that jb goodness. ;)

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] cj360:
Most kernels have an output that's generated upon boot right?

I'm pretty sure the ram disk I'm trying to use is bad but I'm not sure. Looking for why to enable a debug mode or something to point me in the right direction.

Sent from my Xperia Play
[Android] thewadegeek:
Look into the documentation on ADB, and you can boot into recovery and pull the last kmsg.
[Android] einsteinecker:
Hi, sorry if this was asked before, but is it possible to build a kernel this way using cygwin? I have spent days looking into this, all I'm trying to do is build a zimage and I haven't found any sort of documentation if it's possible without using ubuntu/linuxwhatever + an active internet connection.

Obviously I'm trying to use Windows 7 + cygwin, and I have yet to see anyone or any mention of someone being able to build a zimage using cygwin. Is it possible? Thanks for replying.
[Android] cj360:
He touches on it here idk if its what ur lokking for

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

Sent from my R800x
[Android] einsteinecker:
Thanks, but no cigar. That was my first destination, and it clearly says near the top:

"This does NOT enable you to compile the kernel binary (aka zImage)."
[Android] umberto1978:
My point of view: Unfortunately cygwin is only an ensemble of commands to emulate Linux enviroment.

But to compile a zImage you need to use a cross compiler, which is a set of precompiled programs: they just Will not work under Windows, cygwin or not.

Inviato dal mio GT-I9100 con Tapatalk 2
[Android] einsteinecker:
I figured as much. I went ahead and downloaded the Ubuntu version listed on the first post, but I wasn't sure about these:

I have to search and download these, right?
[Android] Deadly:
If you are imstalling ubuntu.. i recommend latest one.. 12.0.4

Or 11.10.. you will have those pre installed even with cd version..

hit thanks button! If above post helps you..

Sent from my GT-S6102
[Android] thewadegeek:
Possible...yes. Recommended, no. If you aren't a experienced Linux user I wouldn't even attempt it. Take a look at Wubi for a easy Windows/Ubuntu dual boot.
[Android] thewadegeek:
Yep, use apt-get or a similar tool and install them.
[Android] militantmind:
very nice guide.
[Android] hackergnome:
Getting this error :(

Ubuntu 10.10 32bit

Dual Core
[Android] Jazz Like That:
Many thanks for this tutorial.
[Android] thewadegeek:
Do you have cc1 installed?
[Android] hackergnome:
Fixed by setting execution to true for the toolchain folder :D
[Android] thewadegeek:
That would do it.
[Android] einsteinecker:
So, I finally got to make a zImage kernel, can't say this tutorial helped me, rather they all helped here and there:laugh:, but I'm wondering, it comes out 500KB smaller than zImage's from other folks, and it won't boot of course. Obviously that means I didn't do something correctly, right? (such as, configuring stuff when doing "make menuconfig").

What I was doing was using the htcleo_defconfig, and the source used was this, I simply picked up where the previous developer left.

By the way, I honestly don't know where to ask, but how do I apply changes from this source such as this one? Is it for the Android ROM or the kernel?
[Android] thewadegeek:
Well was the kernel source ever booting? Or was it a work in progress? You just told me:

1. I think my zImage is too small.

2. My kernel doesn't boot.

Did you try getting any logs? What debugging steps have you already gone through?

Ok before you start trying to do kernel work, I would do some reading on what a kernel is/does in the Android system. That is a device tree not any kernel source and the changes are N/A. If you don't do some reading about it you are just going to have problems.
[Android] tharizdun_uk:
hi i was wondering is it possible to edit my kernel config and compile cm10 with the linaro toolchain (ive been compiling cm10 for about 8 weeks)?

would i have to edit the make file?

sorry for being a bit off topic its the only tut ive seen with people using it.
[Android] thewadegeek:
I suggest looking into the difference between your kernel config and the makefile before you start trying to use different toolchains. Once you understand what exactly a toolchain is(plenty of results in google for you) you'll be able to answer your question about compiling CM10.
[Android] Jwtiyar:
i got this message while patching:

http://paste.ubuntu.com/1265914/

any help?
[Android] thewadegeek:
There were some pieces of the patches that didn't play well with your source. You'll need to undo the changes and then compare what's in the patch to what's is in the applicable files of your source.
[Android] thewadegeek:
Assuming you are configured correctly, I would try a older toolchain and see if that helps.
[Android] TheGreatSega:
??

when you say configured correctly.... what all does that involve?
[Android] thewadegeek:
That you are in fact using the correct cross-compiler, with the correct ARCH set, and that your defconfig file is correctly setup for your device.
[Android] Karim Kahale:
How can I build a kernel for windowsmobile devices that run android unofiicially ?
[Android] thewadegeek:
Beyond the scope of this thread, but get a book about the Linux kernel and start googling.
[Android] coolsandie:
Refer:

- http://stackoverflow.com/questions/...droid-kernel-porting-from-one-device-to-other

- http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Porting-Android-to-a-new-device/
[Android] TheGreatSega:
i think

i think im having alot of problems..

could you link me to the correct linaro cross compiler and

what is the correct ARCH set??
[Android] thewadegeek:
Nope. If you can't figure it out for yourself then you shouldn't be messing with kernels. Sorry to sound harsh but these are things you should be able to find out with some research.
[Android] Jwtiyar:
thANK you very much , but sory i didnt get understand good.
[Android] thewadegeek:
I would start here.

drivers/cpufreq/Kconfig:8:warning: multi-line strings not supported
[Android] espaciosalter20:
ok... how i fix it?
[Android] KOala888:
I don't get zImage after following your guide. Any idea or logs are needed?

Send from samsung galaxy s wifi 5.0 running paranoidandroid.
[Android] ciscogee:
If you read the OP it states what he can help you with. Each person has their own sources, own device, and a happy trigger finger when it comes to menuconfig. This thread is the only active kernel building thread I know of. I have been working with sources for almost 8 months now, only been compiling for about 4. ONLY ONCE, have I compiled a kernel that ACTUALLY BOOTS! I have over 100 successfully compiled zImages under my belt that don't boot, the one that does was a shot in the dark, it doesn't have any network though, but a milestone non the less cause no one has seen a bootable kernel from sources outside of samsung for our device.

Long post short,

This thread has a sort of requirement of knowledge that is aquired through research and applied knowledge. I'm not trying to be a **** or anything, but post like these are gonna slow this threads response rate I believe.

Tips:

TAKE NOTE OF ALL CHANGES (I fell victim to this cause I have no notes or back up of the config that my booted kernel was built on) so I'm pretty much back to sqaure one yet do have more know how to get it done, time is more the factor now.

Google : port android kernel

There are a bunch of pdfs on the fundementals of kernels
[Android] thewadegeek:
By figuring out what that error means and then implementing a fix for it. Sorry man not holding your hand here, with some searching and the like you can figure it out.

You tell me, what looked out of place in your build log?
[Android] thewadegeek:
This precisely. My guide isn't going to make you a kicka$$ developer or even get you close. All it will do is give you a idea of the process and some general knowledge. If you ask a question that goes beyond that then I'll try to point you in the right direction but I'm not going to go find a exact fix for your issue.
[Android] triptosyll:
Don't let it get you down yo! You've been helpful as hell just MAKING the guide. And on top of that, Uve been damn good at getting back to everyone. People need to understand that your here to help them get a build going, not to develop a kernel for them. Some of these people seem to think that if the guide doesn't produce a working kernel right away, that u have all the answers. Well anyhow, keep it up dude, its guides like this that got me into this stuff, cuz u guys lay out the whole procedure for us. A great stepping stone. That's what this guide is!

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] KOala888:
Ok guys, so this time:

complied from source without any changes and I got same error

make: *** [prepare0] Error 2
koala888@koala888-VirtualBox:~/android/kernel/AMBRICES$ make
make: -/android/kernel/toolchains/arm-eabi-4.6.2/bin/arm-eabi-gcc: Command not found
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/bin/sh: 1: -/android/kernel/toolchains/arm-eabi-4.6.2/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
koala888@koala888-VirtualBox:~/android/kernel/AMBRICES$

any idea?
[Android] thewadegeek:
Thanks man.

It can't find your toolchain at the above location. Check for spelling errors and make sure the binaries are named like the ones it is expecting.
[Android] einsteinecker:
Hey, I just wanted to let you folks know that I was doing it right all this time, and my kernel was a good one, I just needed some WM files from the previous developer. I'll have you know thewadegeek that your tutorial here is the only one I keep open when I do kernel work, as your command line commands are the only ones that worked. So, if I ever do end up making a kick-a$$ kernel, you'll know you had a hand in it ;)
[Android] Deadly:
I think u need to write it like this.. if your tool chain is in that place only..

~ /android/kernel/toolchains/arm-eabi-4.6.2/bin/arm-none-eabi-

In the makefile edit the path.. file will be under common folder..

hit thanks button! If above post helps you..

Sent from my GT-S6102
[Android] KOala888:
Guys, am I noob, blind or what?

typed it many times, as for me path seems to be same...

http://www7.zippyshare.com/v/63466050/file.html
[Android] thicklizard:
Your pic doesn't show up
[Android] thewadegeek:
All of the above possibly,...but don't sweat it we all make those sort of mistakes. We can't help with the limited information provided, you need to double check all paths and names.
[Android] KOala888:
pic repaired
[Android] hell_lock:
How does the toolchain version matter? And wats its use?
[Android] thewadegeek:
Awesome thanks.

Looking at your original output though is your path supposed to be

-/android/kernel/toolchains/arm-eabi-4.6.2/bin/arm-eabi-gcc

or

~/android/kernel/toolchains/arm-eabi-4.6.2/bin/arm-eabi-gcc

The tilde character is short for the user's home directory, so if you are using a minus sign instead then that would cause a problem.
[Android] thewadegeek:
In what context? Different compilers and different versions of compilers handle code differently, and just because your code was verified to build and compile with one version does not mean it will work with all versions of that toolchain.
[Android] Deadly:
Try compiling it from 4.6.* version of gcc for our y series.. it wont boot.. ours has issues with it..

Galaxy y series kernels successfully compile with 4.4.3 version gcc..

hit thanks button! If above post helps you..

Sent from my GT-S6102