[Q] How come that specific userlands do require a certain kernel to work? - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

I'm very new to Android as an OS with the Linux kernel at its heart, but fairily proficient with GNU/Linux and a plethora of its distributions for what has been more than a decade by now. So, what I (amongst other things) find a bit bewildering is that very many of custom firmware images seem to require a very specific kernel version or build for handsets to actually work. For my Xperia Mini (Smultron), there are ROM images based on CyanogenMod that won't work with the "vanilla" CM7 kernel, for instance.
With a proper GNU/Linux system, you don't have that kind close coupling of userspace and kernel versions at all. Barring some minor incompatibilities between certain (old) releases of udev and modern releases of the Linux kernel (and vice versa), there's very little (if anything) that stops you from supplanting your three years old distro's kernel with something that Linus released a few days ago.
However, whenever I've come across a guide how to install/set up this and that ROM for some kind of phone, and someone (more or less prominently) states that that image will require a specific kernel build, I've _never_ been so lucky to have been offered a technicial explanation as to why exactly this is the case. Can anyone reading this thread tell me, or point me to where I can find out more about the underlying reasons for these subtle incompatibilities?

I refuse to believe noone can answer that question...

Some features are not available in stock kernel, that are needed for custom ROM.
I am personally not fully familiar with kernels.

Related

[Q] Kernels and Android Versions

I'm not understanding how kernels and ROMs connect. Can someone give me some extra insight?
[Hardware] <-- Unique to every phone
--
[Kernel] <--- Tells the OS how to talk to the hardware
--
[ROM] <--- Slightly confused. Is the OS in the Read only Memory, or has this term changed its "street" meaning?
I understand that most ROMs (e.g. CM7 and CM9) include both the kernel and the ROM, but can you flash these separately too?
I have a 1.5 year old thunderbolt that's rooted, and has CM7 which is based on gingerbread. I believe HTC has also released the kernel as open source, which is probably the reason I have CM7
Anyway, I guess what I'm looking for is an answer/guide/forum that explains why I can't install newer versions of android onto the already working/open source kernel I'm already running. Is it accurate to view the kernel as all the phone's drivers, or just the CPU driver? If that statement is true, why can't I load ICS or Jelly Bean onto my already existing set of drivers?
I'm thinking about starting a Wiki on this if 1) it doesn't already exist, and 2) I can wrap my brain around it enough to share with others!
Thanks to anyone with a response!
shadowrelic said:
I'm not understanding how kernels and ROMs connect. Can someone give me some extra insight?
[Hardware] <-- Unique to every phone
--
[Kernel] <--- Tells the OS how to talk to the hardware
--
[ROM] <--- Slightly confused. Is the OS in the Read only Memory, or has this term changed its "street" meaning?
I understand that most ROMs (e.g. CM7 and CM9) include both the kernel and the ROM, but can you flash these separately too?
I have a 1.5 year old thunderbolt that's rooted, and has CM7 which is based on gingerbread. I believe HTC has also released the kernel as open source, which is probably the reason I have CM7
Anyway, I guess what I'm looking for is an answer/guide/forum that explains why I can't install newer versions of android onto the already working/open source kernel I'm already running. Is it accurate to view the kernel as all the phone's drivers, or just the CPU driver? If that statement is true, why can't I load ICS or Jelly Bean onto my already existing set of drivers?
I'm thinking about starting a Wiki on this if 1) it doesn't already exist, and 2) I can wrap my brain around it enough to share with others!
Thanks to anyone with a response!
Click to expand...
Click to collapse
You are correct about the ROM, but ROMs also include the kernel (if it didn't, or no kernel was flashed separately, the device would not boot). Yes, other kernels can be flashed on your existing ROM, but it's not necessarily going to be compatible.
Sort of, but there's a lot more than that. See here and here. Later versions of Android will require newer drivers,etc. which the existing kernel won't provide (they'll be outdated). Back porting and additional coding is theoretically possible, but insanely difficult (many times). Even after this some things may still not work.
Thanks for the insight, I was able to get a lot deeper into this with those links. For anyone else wandering down a similar path, you might as well stop now! Here are a few links:
http://forum.xda-developers.com/showthread.php?t=1039217&page=2#17
http://www.cs.uwc.ac.za/~mmotlhabi/avmk.pdf
http://www.iteachandroid.com/2012/01/what-is-firmware-rom-and-firmware.html
So, if anyone else is still listening, I do have two more questions:
Do any phones have truly open source drivers? (a.k.a. higher probability of allowing old hardware to work with new android OS)
Is there any way to determine which phones will be supported by the custom-ROM community early on? I know the Nexus line doesn't have vendor modified code, is that the direction which would have the highest probability to stay at top of the Custom ROM curve without upgrading devices every year?
Thanks again for any insight! I hope I'm posting this in a Newb-Friendly forum!
shadowrelic said:
Thanks for the insight, I was able to get a lot deeper into this with those links. For anyone else wandering down a similar path, you might as well stop now! Here are a few links:
http://forum.xda-developers.com/showthread.php?t=1039217&page=2#17
http://www.cs.uwc.ac.za/~mmotlhabi/avmk.pdf
http://www.iteachandroid.com/2012/01/what-is-firmware-rom-and-firmware.html
So, if anyone else is still listening, I do have two more questions:
Do any phones have truly open source drivers? (a.k.a. higher probability of allowing old hardware to work with new android OS)
Is there any way to determine which phones will be supported by the custom-ROM community early on? I know the Nexus line doesn't have vendor modified code, is that the direction which would have the highest probability to stay at top of the Custom ROM curve without upgrading devices every year?
Thanks again for any insight! I hope I'm posting this in a Newb-Friendly forum!
Click to expand...
Click to collapse
For both your questions, the Nexus-line devices would be the way to go. They usually have everything working on new Android versions the soonest, and Google always releases their code, etc.
Hi
i can use linux kernel (zimage) to update android kernel if yes ,how ?
thnx

[Q] Kernels - what is there to know about them ?

OK, so here's the thing... I'm kind of new in the Android acknowledgement, so I hope that here will be the place where I will get my answers. So here's what I know...
At first I didn't know that Android was Java-based, using a modified Linux kernel which we all know it's C-based (entirely). After a while, I found that there were different firmwares (ROMs) from the original ones, called Stock ones and also different kernels. After reading lots of info about how things actually are, I've decided to root my stock and then I moved to a custom MIUI for my SGSII with a JB implementation. At first it was great, but I had some issues which left me disappointed. Then I moved on to the official MIUI (China - English one). Things got better after I got used to it. The major bugs disappeared, only small ones left and a few crashes, but in time most of them got fixed. Later it crossed my mind, "Why are there so many different kernels and which is the best one for my phone or ROM to be precise?" Well this is where I need your help. I've read some topics that siyah kernel is probably the best kernel, which fits the MIUI rom. The pointing of concrete kernels isn't the kind of answer I was actually searching for. To be honest, I need answers to questions like:
How many kernels are there ?
Which ones are safe ? (I've read that there are badly written ones, so yeah, it needs to be asked)
Statistically, which is the best kernel and is it for the MIUI rom ?
How can I tell that it's suitable for the MIUI rom ? (Since I've read that not all are)
What are the risks of changing the kernel?
How can you test the kernel's behaviour, an app which makes statistics in time or some other methods ?
Believe me, as annoying this topic might seem, lots of us (the newbie users) are burning up the google servers, just to find these answers. I'm really hoping for a reply spam with answers (if possible , spare the trolling ones). Thanks for reading my annoying topic, anyway
Since most of the source is available, basically anyone can build their own kernel at home, so it is hard to tell how many kernels are there.
what isn`t available as open source are most of the OEM-specific drivers. Samsung, for one, doesn`t make most of the drivers' source publicly available, so kernel developers have to make a binary kernel around the binary drivers and literally pray their work well together.
Siyah is safe, but I prefer the stock kernel (I like the stock ROM... go figure). The stock kernel is the only one that is sure to work properly with all the hardware in the phone, because it is the only built from sources for the drivers as well (read my previous paragraph).
Which ones are safe (other than stock and Siyah): you gotta try them for yourself, read other users' remarks and feedbacks, and so on.
Risks:
Very low. As long as the bootloader is good, if the kernel totally malfunctions, just reboot in download mode and flash something else.
Some app may work very well in one kernel and bomb in another. It may crash in some kernels. It is very empyrical.
The problem is that custom kernels don't undergo the same type of quality testing as stock kernels. Developers have very limited resources to do that, and some developers are more interested in having a short time-to-market than a quality product (well, many large corporations act like that as well). At the end of the day we - power users - are the beta testing and quality assurance teams for the kernel developers.

[Q] General question regarding kernels and android releases

Hi! This is maybe a general dev question, but I'd like to get an answer anyway:
what is exactly the link between an Android release and the kernel it works upon?
I noticed most recent releases use 3.0+ Linux kernels, and others (like the DSCs) use the Phoenix Universal Kernel, which is based on a 2.6.35... So I wonder: is ICS/JB in any way dependant on "newer" kernels?
I understand the answer must be closer to "no", since the pre-alpha build also uses a fork of the PUK, but the fact that it uses a *different version* makes me wonder how much work does it take to get a kernel ready for a newer release, and most importantly... why?
Thanks a lot! Total n00b here, but eager to know more.
Newer kernel not required at least for ICS.
All GB/ICS kernels are based on this kernel (and it's a Dell's lie about using same sources for 407 release as SoD was fixed there without switching timer source):
http://opensource.dell.com/releases/streak/4.05_and_4.07/
kibuuka successfully applied kgsl/genlock patch and it's the only thing actually needed for ICS.
List (a bit old) of changes in Phoenix kernel and later derivatives:
http://forum.xda-developers.com/showpost.php?p=25291276&postcount=3812

possible fix for broken features on new roms - run two kernels?

I realize that one can run and install linux on an android device (which is running it's own kernel on top of android's kernel), so wouldn't it be just as possible to run a factory kernel on top of a modded kernel to regain access to device specific features that only the factory kernel can currently utilize (4g, 3d cameras, etc.)? As far as I understand, linux has access to those features and can interface with them (whether it can do anything with them is another topic, but...), so wouldn't this be a viable solution to make custom ICS, JellyBean, Cyanogenmod roms work 100% with each device? Sorry for the lack of specific technical mumbo-jumbo lingo, just a newbie brainstorming here.

[Q] How do I upgrade a device tree and kernel for Lollipop?

I know it's not as simple as it looks, otherwise everybody could do it, but at least can someone point me in a vague direction?
Just out of interest, how do you upgrade a device tree to support newer Android versions? Anything in particular which might prevent Android from functioning correctly?
I've acknowledged SELinux as a problem already.
I'm new to running device trees and kernels but I do know my way around Linux (I know how toolchains works, and I can build Android and kernels, for example) and I know C++, C and Java.
I've 'Google-d' the matter, but to no avail – there appears no clear way to do it.
+1 this question
i want its answer too:good:

Categories

Resources