Backporting kernel - Android Q&A, Help & Troubleshooting

Hey all,
I thought I knew what I was doing when backporting but now I am lost.
I am trying to integrate Bluez 5.18 into Dirty Unicorns kitkat for my Galaxy note 2. I thought I could copy the backport 3.14 compat, backport includes and the drivers into my kernel source but I am now unsure I am doing it right. If anyone has any info on backporting for android I would really appreciate it. Things I am unsure of is if I am doing it right by copying the files into the kernel source or if I need to use the backport differently.
Any help is greatly appreciated and needed.
Thanks
Brian

Related

[REF] Galaxy S II Kernel source code repository. Please use it instead of .tar

Hi everyone.
git repositories is the best modern way to work with Linux Kernel sources, designed by Linus himself in this purpose.
Today Samsung release sources as plain tarballs, often with a few missing files and it makes collaboration between developers difficult: instead of merging branches or patch in 2 commands, it creates a lot of headaches.
But also community fragmentation!
Sources are available now, source code will be shared here here as common reference point.
Also, benefit of this approach is free cleaned up upgrades when Samsung releases new sources for everyone.
Stay tuned, and contact me if you're an experienced developer that want to be involved in this source organization: https://github.com/GalaxySII
Galaxy S II Kernel sources
Galaxy S II Initramfs
Sample compile script template:
https://github.com/project-voodoo/scripts/blob/supercurio/galaxysii_build_kernel.sh
Sample flashing script:
https://github.com/project-voodoo/scripts/blob/supercurio/galaxysii_flash_kernel.sh
git remotes used:
origin git://github.com/GalaxySII/samsung-kernel-galaxysii.git (fetch)
origin [email protected]:GalaxySII/samsung-kernel-galaxysii.git (push)
android-common git://android.git.kernel.org/kernel/common.git (fetch)
android-common git://android.git.kernel.org/kernel/common.git (push)
linux-2.6-samsung http://git.kernel.org/pub/scm/linux/kernel/git/kki_ap/linux-2.6-samsung.git (fetch)
linux-2.6-samsung http://git.kernel.org/pub/scm/linux/kernel/git/kki_ap/linux-2.6-samsung.git (push)
longterm-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.35.y.git (fetch)
longterm-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.35.y.git (push)
stable-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.35.y.git (fetch)
stable-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.35.y.git (push)​
So samsung will publish the source code on there or you will? Sorry I had trouble understanding - if samsung is that's great news!
good deal dude
jaju123 said:
So samsung will publish the source code on there or you will? Sorry I had trouble understanding - if samsung is that's great news!
Click to expand...
Click to collapse
Samsung will very probably release sources as a plain tarball.
But we are working to fully integrate the Galaxy S II sources they will release with Samsung mainline kernel repository on kernel.org.
http://git.kernel.org/?p=linux/kernel/git/kki_ap/linux-2.6-samsung.git;a=summary
In order to get the best quality source, easiest to upgrade etc.
Okay Galaxy SII sources are not available yet, but I messed with different source repo to make a clean starting point that will serve as base for the Samsung source drop.
Contains stuff from Linux 2.6 , Linux 2.6.35 stable (2.6.35.7) and linux-2.6-samsung.
Added initramfs !
https://github.com/GalaxySII/initramfs-galaxysii/tree/master/i9100-2.3.3-xwkdd
message to moderators: STOP RENAMING MY THREADS!
Especially with the most useless, unrelated and stupid name: "[KERNEL] coming soon..."
Thank you.
Sources are UP!
I somehow manually re-created commits from Samsung archive.
Before merging Samsung ED24 SHW-M250S sources, I created on a big merge branch named 2.6.35.7-samsung-android, containing
- 2.6.35
- Samsung mainline repository 2.6.35 (merged)
- 2.6.35.7 (merged)
- android 2.6.35.7 (merged)
Awesome!!! Wow! With developers like these we are sure in for a wonderful time ahead. Device got released in UK on May First and already we are seeing such development!! Thank you!
you actually took the time to split the commits by hand into categories
thats cool!
I just threw 5 euros your way for your work on Voodoo for the i9000, and also for the new work on the i9100. Seems fair since I used the kernel for the entire life of the i9000. My next step to pick up the i9100.
Merged manually M250K ED25 sources: https://github.com/GalaxySII/samsung-kernel-galaxysii/tree/shw-m250k-gingerbread
Merged manually M250L (WCDMA phone) ED27 sources: https://github.com/GalaxySII/samsung...0k-gingerbread
http://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=I9100
Galaxy S II source code
Rawat said:
http://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=I9100
Galaxy S II source code
Click to expand...
Click to collapse
Thanks! Just waking up.
Hold on with the tarball guys, you'll get it clean from the git repository very soon!
Galaxy S GT-I9000 source now all merged manually, with split categorized commit !
https://github.com/GalaxySII/
supercurio said:
Galaxy S GT-I9000 source now all merged manually, with split categorized commit !
https://github.com/GalaxySII/
Click to expand...
Click to collapse
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
OneTwoPi said:
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
Click to expand...
Click to collapse
Interested in knowing the same thing - how much control do "we" got over updates and sorts now? I heard this makes it really easy to update to the latest Linux kernel. Is that true?
OneTwoPi said:
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
Click to expand...
Click to collapse
kind of but not really. the consensus is that not everything is included in the source that samsung released. i'm just not clear on to what extent this is true.
i'm looking thru to try to find the audio files that could be easily edited to increase volume output, but i couldnt find it yet. maybe someone can shed some light.
RogerPodacter said:
kind of but not really. the consensus is that not everything is included in the source that samsung released. i'm just not clear on to what extent this is true.
i'm looking thru to try to find the audio files that could be easily edited to increase volume output, but i couldnt find it yet. maybe someone can shed some light.
Click to expand...
Click to collapse
There is no such consensus.
Galaxy S II kernel is 100% open source.
Some driver are partially Kernel partially user-space as usual, and we don't have source for those but speaking of the kernel we have everything. (already proven with custom kernels using arbitrary version numbers and no pre-compiled binary kernel module like mine)

[Q]Using Linaro toolchain for kernel build - getting 'Image' not zImage'?

I hope this is just me being stupid. I wanted to start using the linaro toolchain to build my kernel, having fixed the errors that appeared it now only produces an 'Image' file instead of a 'zImage'.
Please tell me I am just being thick! I cannot work out for the life of me what to do to fix it.
Any help anyone can give any advice will be greatly appreciated, my git hub is here: https://github.com/vidoardes/XS-ICS
BTW: These errors don't occur if I use the standard android 4.4.3 toochain.

[Q]Building ICS from AOSP Source on P7510

Hi all devs for P7510:
I'm following guides all over the place in my attempt to learn a thing or two by building AOSP ICS (specifically the 4.0.4_r1 branch) from source. I know that Google states building anything other than master on a version of Ubuntu higher than 11.10 is experimental and not really supported - seen many Google Groups threads indicating this. I've been able to patch and fix some of the errors that I'm seeing, but others that I'm searching for are answered with links back to the AOSP website where it's simply saying building anything other than the master branch on Ubuntu 12.xx is not officially supported.
I am getting ready to re-do my dev environment with Ubuntu 10.04 to see if that really does make a difference somehow, but had a couple of questions that I'm hoping someone can answer as I get ready to try again.
1) Has anyone out there built AOSP 4.0.4, from a branch other than master, successfully for the P7510 device?
2) If so, with what version of Ubuntu/Linux and were there many errors encountered when compiling that required fixes via manual code revision rather than simply applying a missing dependency or toolchain fix?
I've searched high and low and it's proving particularly difficult to find info on whether or not someone has been able to build a non-master branch of AOSP ICS 4.0.4 for this particular device. I know I could just abandon it and try to build JB or something instead but really want to see if I can pull this off. Hoping someone out there can help me out!
Update: I was able to complete a build today!! Please disregard the questions, self answered.
Sent from my GT-P7510 bleeding CM10 inverted awesome

[Q] How to build CM11 for a legacy device?

I have a LG P350 which development has stopped but i want to keep it updated, i have my computer ready for building, also i have kernel sources, Cyanogenmod 11 and 10.1 sources too, (I don't know exactly if 10.1 sources could help) and i know that i need to apply patches to work on Armv6 but i don't know how to apply them to the source code, also i don't know if i would just need the pure source code to build or i need to do more modifications to it and finally, i don't know if the rom would work with 2.36 kernel which it's the most stable one for this device, i'm very new in this but i know that i can keep update my little phone, thank you all in advance for help.
DiegoConD said:
I have a LG P350 which development has stopped but i want to keep it updated, i have my computer ready for building, also i have kernel sources, Cyanogenmod 11 and 10.1 sources too, (I don't know exactly if 10.1 sources could help) and i know that i need to apply patches to work on Armv6 but i don't know how to apply them to the source code, also i don't know if i would just need the pure source code to build or i need to do more modifications to it and finally, i don't know if the rom would work with 2.36 kernel which it's the most stable one for this device, i'm very new in this but i know that i can keep update my little phone, thank you all in advance for help.
Click to expand...
Click to collapse
Hello, looking at your situation here is what I can conclude. First off you will need to change things for building on ARMv6 architecture, check this out for example. But your biggest problem will be that Android 4.0+ uses Linux kernel version 3.0+, and with the 2.36 kernel you have a lot of things will be broken and need fixing. That being said if your up for the challenge for it cause that's what were all about .
shimp208 said:
Hello, looking at your situation here is what I can conclude. First off you will need to change things for building on ARMv6 architecture, check this out for example. But your biggest problem will be that Android 4.0+ uses Linux kernel version 3.0+, and with the 2.36 kernel you have a lot of things will be broken and need fixing. That being said if your up for the challenge for it cause that's what were all about .
Click to expand...
Click to collapse
Well, i got this http://forum.xda-developers.com/showthread.php?t=2144790 that is the most similar phone talking about hardware, it has 3.0 kernel working well so i thought i could port it, i found this http://stackoverflow.com/questions/15961306/porting-kernel-from-another-device so i think i would have less problems due hardware similarities (Look here http://www.gsmarena.com/compare.php3?idPhone1=3516&idPhone2=3735 ) so, if i have cm11 pure sources, i add this kernel sources and some patches i would have it booting? Sorry for this very dumb question but, i didn't get at all about the armv6 part, how to apply patches, which i would need and all that, i really want to learn about this so thank you for this answer and the next ones :good:
DiegoConD said:
Well, i got this http://forum.xda-developers.com/showthread.php?t=2144790 that is the most similar phone talking about hardware, it has 3.0 kernel working well so i thought i could port it, i found this http://stackoverflow.com/questions/15961306/porting-kernel-from-another-device so i think i would have less problems due hardware similarities (Look here http://www.gsmarena.com/compare.php3?idPhone1=3516&idPhone2=3735 ) so, if i have cm11 pure sources, i add this kernel sources and some patches i would have it booting? Sorry for this very dumb question but, i didn't get at all about the armv6 part, how to apply patches, which i would need and all that, i really want to learn about this so thank you for this answer and the next ones :good:
Click to expand...
Click to collapse
The best way to start is use the ARMv6 branch of Cyanogenmod 11, replace the CM 10.1 in the previous linked build guide with cm-11.0 ("repo init -u git://github.com/androidarmv6/android.git -b cm-11.0"), and then to direct the build to use your kernel take a look at this guide on integrated kernel building with Cyanogenmod.

Android kernel how to make compatible with higher os? (+Where can I find the patch?)

Hello, I'm newbie dev trying to build CM13 for Lenovo Phab plus.
I think I'm almost finished with device and vendor, but I cannot figure it out what to do with kernel.
The circumstance is,
I have a stock kernel source which runs in 5.1.1 LP, with version of 3.10.49.
What I want is to make kernel compatible with 6.0.1.
I already know that linux kernel version doesn't have to be exactly same with new Android OS versions and I can just make a few patches in order to run kernel in higher OS.
So I googled and studied(?) for 2-3weeks, but got not many useful informations and I still cannot figure out where to find required patches for 6.0.1 .
So here's what I am not sure about.
1. I found that I can either upstream, merge, cherry-pick kernel sources from higher OS. For instance, if I merge kernel patches (starting from 3.10.50 to 3.18 step by step) and check if the kernel compiles successfully, is this a right thing to do? I am confused whether merging or cherry-picking is required for my situation.
2. I see lots of commits when comparing with other kernel sources in github. How do you find those kinds of patches? -> just keep compiling kernel and if error comes out->search->commit
Always this pattern goes again and again till boot properly?
3. i'm quite curious with backports. What i know is that "backports" are the files which is compatible for lower version kernels. For example, backported audio driver originally based on 4.9 can be used in kernels with version below 4.9. Is it right?
4. If there is an useful links, anything could be helped a lot.
THANKS IN ADVANCE.

Categories

Resources