Compile COJ3 from source N910F - Galaxy Note 4 Developer Discussion (Devs., Only)

Hello friends,
I wanted to start kernel developing for the N910F. So i wanted to start compiling the original samsung sources.
Please excuse me, I'm pretty new to android/linux development.
I managed to get the kernel compiling, which gives me an output folder with some GB of stuff and as i could point out a zImage-file, which is hopefully the compiled kernel
To get my kernel working, extracted a stock boot.img with umkbootimg, which gave me a warning, that i can't repack the boot.img without using a modified mkbootimg executable.
A mkbootimg is included in the sammy-source so i used this to pack my zImage together with the extracted initfs.gz, resulting in a boot.img.
Which I flashed ofc, but the reason why i opened this thread is the result of this
The kernel is obviously not booting, it shows for maybe 0.5s the sammy logo and directly starts into download mode.
I guess it has something todo, how i pack my kernel. because i didnt even manage to unpack the stock kernel and repack it and get it booting.
So where is my mistake? Do i miss something?
greez d4rk

Deleted - I notice I replied to an old thread

Related

Inquiry about rebuild android for Hero

Hi all:
I am going to rebuild the android source and flash the new generated image to my Hero for research purpose, right now I have read tons of information about rebuild source for Dream, but few for Hero. and For Dream, there is specific configuration containing information about dream-specific files under source directory, but no configuration for hero.
So I was wondering is there any standard steps for rebuilding kernel image for Hero? Seems like direct "make" won't work, anybody can share idea on this?
Thanks a lot.
Currently HTC has not released the kernel source code for HTC Hero so we can't compile our own kernel.
HTC has said they are close to releasing the source though.
packetlss said:
Currently HTC has not released the kernel source code for HTC Hero so we can't compile our own kernel.
HTC has said they are close to releasing the source though.
Click to expand...
Click to collapse
can you prove that?
packetlss said:
Currently HTC has not released the kernel source code for HTC Hero so we can't compile our own kernel.
HTC has said they are close to releasing the source though.
Click to expand...
Click to collapse
we can compile our own hero but the main problem is "is it going to work?"
im still working on custom boot.img
I see. Thanks to you guy's reply
Drizzy Drake Rogers, hopefully you will get it done soon
I used to generate my boot.img like this, but failed finally:
download the update.zip in modaco custom ROM
unzip it
unpack boot.img, do whatever modification I want
repack it, zip it into update.zip, just replace the original boot.img
reboot with it
It simply didn't work, stuck in screen displaying "Android", that's all.
Donno if it's the same procedure as yours, just one reference. In theory, doing like this has nothing to do with source code, so it's strange to me.
lk_517 said:
I see. Thanks to you guy's reply
Drizzy Drake Rogers, hopefully you will get it done soon
I used to generate my boot.img like this, but failed finally:
download the update.zip in modaco custom ROM
unzip it
unpack boot.img, do whatever modification I want
repack it, zip it into update.zip, just replace the original boot.img
reboot with it
It simply didn't work, stuck in screen displaying "Android", that's all.
Donno if it's the same procedure as yours, just one reference. In theory, doing like this has nothing to do with source code, so it's strange to me.
Click to expand...
Click to collapse
Try to boot your boot.img through fastboot and read the console debug messages to find out what's wrong with the boot.img
This thread can be useful:
http://forum.xda-developers.com/showthread.php?t=541522
Thanks! Pretty useful information!
I really need a compiled mkbootimg to repack the boot.img with, but all the one's in other threads are not up to date, therefore no --base parameter support which is the one thing missing for me to repack the modified boot.img. And I don't want to go through the whole hassle of installing the 2.9GB Android Source :/

Compiling a working kernel

Hi all,
I recently began editing the Galaxy S kernel, from the downloadable open source package.
After some time I compiled my changes into a zImage. My problem is, it won't flash when i put it in the most recent PHONE_I9000XWJG5.tar.
Odin3 just hangs at Flashing zImage...
My zImage is about 2.5MB in size, and the original JG5 zImage is 4.6MB, so I guess I am missing something.
I think I am missing the modules (which you can also compile). But I'm not sure.
Does anyone know how to compile a working kernel for the Samsung Galaxy S?
Thanks in advance!
First:
Read here: http://www.cianer.com/androidg1/28-building-android-kernel-images
Then here: http://www.receptorblog.com/wordpress/howto-compile-a-linux-kernel-for-samsung-galaxy/
and finally here: http://forum.samdroid.net/f9/dev-vmware-image-build-i5700-kernel-2-6-29-android-2-1-a-984/
not update.zip,why?
In recovery, no sd update.zip option, how can I tune out?
I'm also trying to make a new kernel based on JM5.
My goal is to fix the BlueTooth issues.. I think i've found the problem in a kernel's .c file...
I'm following this link:
HERE
I'm downloading the GT-i9000 opensource ZIP from Samsung, but i don't quite understand where can i get the Android Toolchain....
Is It really 6GB as it says HERE ?
I wish there was a XDA-like tutorial for this

[Q][Help] B5510 - Building Kernel/boot.img Problem

Hi there.
First: Im a noob, so unless i have fewer than 10 posts i can only post in general forum - otherwise i would post on an existing thread (i will mention later).
Last week i got a new phone: Samsung Galaxy Y Pro (GT-B5510).
Its a nice phone, but im missing a thing: a firewall.
I tried droidwall and other, but they arnt working. So there is something wrong with the netfilter/iptables modul and ive to rebuild the kernel.
After a quick search i found this thread and this post.
I already set up a Ubuntu (10.04.4), downloaded the source from samsung and the toolchain from Sourcery (like they mention inthe infofile from samsung).
I build the kernel, like irfanbagus in his post, but for my device.
I got lots of compilerwarnings, but in the end i have had my zImage without errors.
I split my boot.img, which i got from my device with Terminal Emulator, with split_bootimg.pl.
Now ive got a kernelimage and a initrd and ive to put them together.
Presumably with mkbootimg, but ive to know the baseadress.
I tried the offset from the thread mentiond above.
I made a tar and flashed it with Odin1.85 and half bricked it.
[I only can see a grey battery on the diplay and if i reboot it it stuck on bott/splashscreen]
Maybe somebody can help. (please)
Is the problem the compiled kernel, due to the warnings?
Or is it the wrong baseaddress? Well i could not find the address inside the sourcecode (like kconfig), like i read somewhere, thats why i tried the one from s5360.
There is no problem with odin or the cable, cause i can flash my backup with it to 'unbrick' it.
And why is the bootimg around 700kb smaller than the original?
Thanks a lot in advance.
havocinside said:
Hi there.
First: Im a noob, so unless i have fewer than 10 posts i can only post in general forum - otherwise i would post on an existing thread (i will mention later).
Last week i got a new phone: Samsung Galaxy Y Pro (GT-B5510).
Its a nice phone, but im missing a thing: a firewall.
I tried droidwall and other, but they arnt working. So there is something wrong with the netfilter/iptables modul and ive to rebuild the kernel.
After a quick search i found this thread and this post.
I already set up a Ubuntu (10.04.4), downloaded the source from samsung and the toolchain from Sourcery (like they mention inthe infofile from samsung).
I build the kernel, like irfanbagus in his post, but for my device.
I got lots of compilerwarnings, but in the end i have had my zImage without errors.
I split my boot.img, which i got from my device with Terminal Emulator, with split_bootimg.pl.
Now ive got a kernelimage and a initrd and ive to put them together.
Presumably with mkbootimg, but ive to know the baseadress.
I tried the offset from the thread mentiond above.
I made a tar and flashed it with Odin1.85 and half bricked it.
[I only can see a grey battery on the diplay and if i reboot it it stuck on bott/splashscreen]
Maybe somebody can help. (please)
Is the problem the compiled kernel, due to the warnings?
Or is it the wrong baseaddress? Well i could not find the address inside the sourcecode (like kconfig), like i read somewhere, thats why i tried the one from s5360.
There is no problem with odin or the cable, cause i can flash my backup with it to 'unbrick' it.
And why is the bootimg around 700kb smaller than the original?
Thanks a lot in advance.
Click to expand...
Click to collapse
upload your boot.img
boot.img
Here it is.
boot.tar = compiled
boot-stock.tar = original from my device
Size is not problem as long running well.
In my sgy always fail when size >
5.5mb
For boot-stock.tar u get from dd or pda stock-rom ??
Mmm i thing irfan has answer so ur save dude.
its dd.
i don't find any problem with boot.img. offset is equal (0x81600000). the problem maybe in your zImage. make sure you build with correct defconfig. mine is bcm21553_totoro_05_defconfig, i don't know yours, see in text info inside zip file from samsung. and make sure using the same compiler version with text info said. using different version make prebuild kernel module inside initramfs not working. start with default config from xxx_defconfig just to make sure your step is correct. and if still not working your best hope is build your module as loadable module (.ko), add init.d support in init.rc (inside initramfs), and load your module using init.d script.
about the size, it's nomal boot.img from dd command bigger than normal boot.img because it's copy whole partition and include unused bytes behind the original boot.img.
hm, ok.
thank you irfan.
i followed the instructions from the txt inside the archive:
"bcm21553_luisa_03_defconfig" with "g++ 2009q3-68 arm eabi"
ill try again.
my bad. i download wrong files, and end up with comparing the same original boot.img
your compiled boot.img don't have md5 checksum. i am not sure it have effect, i make that tutorial based post from harish2704 here. mkbootimg from harish2704 have --kernelMD5 param. try use that one.
savie said:
Size is not problem as long running well.
In my sgy always fail when size >
5.5mb
For boot-stock.tar u get from dd or pda stock-rom ??
Mmm i thing irfan has answer so ur save dude.
Click to expand...
Click to collapse
our kernel partition only 5 mb my friend...
Boot.img from dd not work with me so i pick from pda stock-rom
(i use from doky thread).
Mmm that why i fail when boot.img more than 5mb.
Trying other method to compile, irfan say merruk use lzma or someting like that.
I can only suggest the method irfanbagus described (loadable kernel modules) because the source code Samsung released probably isn't up to date. The benefits of compiling the needed modules into the kernel are too little compared with possible bugs which are in the released code but not in the stock kernel.
mikstev said:
I can only suggest the method irfanbagus described (loadable kernel modules) because the source code Samsung released probably isn't up to date. The benefits of compiling the needed modules into the kernel are too little compared with possible bugs which are in the released code but not in the stock kernel.
Click to expand...
Click to collapse
i find relative new kernel for sgy, but still cannot make running. it's from galaxy pocket source. there is small change related to power management, but still don't have time to studying.
After a weekend full of trouble, today i found time to continue the bootimg-thing.
I now compiled only the modules and load them now with initd, because i was unable to build a runnable kernel from source.
(Thank you irfan and mikstev)
irfanbagus said:
i find relative new kernel for sgy, but still cannot make running. it's from galaxy pocket source. there is small change related to power management, but still don't have time to studying.
Click to expand...
Click to collapse
are you sure that we can use that kernel for our sgy?

[HELP][KERNEL]WiFi / Bluetooth Not working After Compiling kernel

Hello xda,
I am new into kernel development.Recently I downloaded the kernel sources for my phone Zenfone 2 Laser -ZE550KL
After that I compiled the stock kernel, since It is based on arm64 I got a file named Image instead of zImage.
After searching I found a way to convert that to a boot.img (using the ramdisk from stock kernel).I could get the kernel to boot on the device using
Code:
fastboot boot boot.img
The device booted successfully with the kernel, I could see change in the name of Kernel in About Phone.
But the problem is Wifi/Bluetooth and Soft keys do not work.Wifi turns on But cannot see any AP.
BT works(A BT enabled watch vibrated )but no device can be seen in bletooth settings.
Please help me with this kernel.
here is the link to my source=>
https://github.com/abhishekr700/ZE550KL_KERNEL
I am using ze550kl_defconfig present in /kernel/arch/arm64/configs to make .config file for building kernel.
Thanks.
You have a thread for this topic already in the correct section (Q&A):
http://forum.xda-developers.com/android/help/help-wifi-bluetooth-compiling-kernel-t3368463
Please only create one thread per topic, thread closed.

[KERNEL][WIP][DEV] Quintus Kernel = Kcal

Hi all !
After many years of "xda looting", i'm trying to contribute a little.
I'm a begginer, just learned 3 days ago how to use github ! So be cool guys, not a dev here.
Now i successfully compiled a Kernel, with addition of KCAL for now, but...
I got the Image.gz-dtb and i don't succeed in repacking it in a boot.img, if someone want to try, be my guest. (It's untested obviously, but compilation was without errors/warnings (we are close to stock for now.).
I tried mkboot, anykernel2, lazyflasher.... Always flash error, and i don't have time for the next few days, so if we could put a team together...
Here is the link to my compiled files (arch/arm64/boot) except dto folder. //Update to my Dev folder
Theorically you just have to rename, put it in a stock boot.img, "fastboot boot newboot.img" and test if Kcal is working with ex kernel manager, then more to come (governors, maybe OC, etc.)
Poke @d1ngh, you could help here after your work on twrp ?
Cheers guys, we could have our first custom kernel soon !
----------------------------------------
Source : [url]https://github.com/WiwiWillou/Xiaomi_Kernel_OpenSource.git[/URL]
Defconfig used = defconfig daisy-perf_defconfig (with the kcal=Y addition not commited for now) // branch daisy-o-oss
Thank you very much! That´s what I waited for. Unfortunately 7zip says error: unknown compression method... Perhaps you can repack? Thx.
That is all we need ! A custom kernel thant can handle GSI !
Voodoojonny said:
Thank you very much! That´s what I waited for. Unfortunately 7zip says error: unknown compression method... Perhaps you can repack? Thx.
Click to expand...
Click to collapse
I've updated the link, you should see the uncompressed file in folder !
Or direct link : https://drive.google.com/file/d/1TvihsIa_XbtC66yaWRZ1EPY5UR6LLD5g/view?usp=drivesdk
Thanks
WiwiPouPou said:
Hi all !
After many years of "xda looting", i'm trying to contribute a little.
I'm a begginer, just learned 3 days ago how to use github ! So be cool guys, not a dev here.
Now i successfully compiled a Kernel, with addition of KCAL for now, but...
I got the Image.gz-dtb and i don't succeed in repacking it in a boot.img, if someone want to try, be my guest. (It's untested obviously, but compilation was without errors/warnings (we are close to stock for now.).
I tried mkboot, anykernel2, lazyflasher.... Always flash error, and i don't have time for the next few days, so if we could put a team together...
Here is the link to my compiled files (arch/arm64/boot) except dto folder. //Update to my Dev folder
Theorically you just have to rename, put it in a stock boot.img, "fastboot boot newboot.img" and test if Kcal is working with ex kernel manager, then more to come (governors, maybe OC, etc.)
Poke @d1ngh, you could help here after your work on twrp ?
Cheers guys, we could have our first custom kernel soon !
----------------------------------------
Source : [url]https://github.com/WiwiWillou/Xiaomi_Kernel_OpenSource.git[/URL]
Defconfig used = defconfig daisy-perf_defconfig (with the kcal=Y addition not commited for now) // branch daisy-o-oss
Click to expand...
Click to collapse
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
wertus33333 said:
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
Click to expand...
Click to collapse
I've tried, maybe my image is bad, strange (I originally tried my stock source too, Google 4.9 toolchain, no luck). Can you test with the one in the link please ?
I will have access to my PC only next week...
Thanks a lot for your feedback !
wertus33333 said:
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
Click to expand...
Click to collapse
Could you please share your build script ? Did you use an alternate defconfig ?
Learning here
EDIT : Which UberTC did you use ?
WiwiPouPou said:
Could you please share your build script ? Did you use an alternate defconfig ?
Learning here
EDIT : Which UberTC did you use ?
Click to expand...
Click to collapse
I used the original source code with some small changes (which are now included in official source) to make it compile.
Don't mind about the toolchain for the moment, gcc4.9 is most stable.
I don't have time trying this out atm, busy compiling los 15.1 but if you share exactly how you did it, (terminal log in pastebin and most importantly the exact errors, "doesn't work" doesn't help ) me or someone else might be able to help you (and you don't have to ask next time you get the error.
If you want you can start adjusting the lineage kernel, so i could build with los kernel which could save time towards working custom roms.
I successfully repack. But phone don't boot. (9.11 ROM)
Hello , can you help me with conpiling kernel source code? I tryed a lot of time but same issues , that could find same files.
I successfully repack image of kernel that you publish, but phone don't boot , they reboot in stock kernel(if i write fastboot boot boot.img) and I trying flashing image. They dont boot.
I vary want to create collection of custom kernel's on my device. And of course becouse i vary interested in this sphere, but new this.
Can you describe how you fix issues, or your compiling go without issues.
With best regards. Please help.
artyom5613 said:
Hello , can you help me with conpiling kernel source code? I tryed a lot of time but same issues , that could find same files.
I successfully repack image of kernel that you publish, but phone don't boot , they reboot in stock kernel(if i write fastboot boot boot.img) and I trying flashing image. They dont boot.
I vary want to create collection of custom kernel's on my device. And of course becouse i vary interested in this sphere, but new this.
Can you describe how you fix issues, or your compiling go without issues.
With best regards. Please help.
Click to expand...
Click to collapse
On which roms did you test your kernel?
Voodoojonny said:
On which roms did you test your kernel?
Click to expand...
Click to collapse
8.1 stock. 9.11
I compile stock kernel , repack him , ans this work fine. Now i need help to add kcal support. Author, can you help?
artyom5613 said:
I compile stock kernel , repack him , ans this work fine. Now i need help to add kcal support. Author, can you help?
Click to expand...
Click to collapse
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
WiwiPouPou said:
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
Click to expand...
Click to collapse
Thanks! O try to add kcal with this commits.
Yea, source for pie is not pushed. Xiaomi cant fix 8.1 kernel... Stock compiled kernel issue: wifi don't work...
WiwiPouPou said:
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
Click to expand...
Click to collapse
Can you tell me what version of kernel you use whyle compile kernel? I tryed on new 9.11, but phone dont boot.
Maybe when you compile version be 9.10 or ealier.
becouse ramdisk and kernel image can conflict
I hope this can support settings for "display temperature" so that we dont need app for calibrating warmth or coolness of display
Current state:
Kernel builded.
Kcal included.
Wifi don't work , searching fix
artyom5613 said:
Current state:
Kernel builded.
Kcal included.
Wifi don't work , searching fix
Click to expand...
Click to collapse
Kcal is working ?
Strange for WiFi, module not compiled ?

Categories

Resources