What is a kernel? - Nexus One General

this might be a stupid question, but what is a kernel and how do u use them? i know what a rom is and how to install but not a kernel....

Wikipedia definition:
"In computing, the kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components).[1] Usually as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to applicationprocesses through inter-process communication mechanisms and system calls."
Since Android is based on Linux: (don't know if this relevant)
"The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems.[6] It is one of the most prominent examples of free and open source software.[7]
The Linux kernel is released under the GNU General Public License version 2 (GPLv2),[4] (plus some firmware images with various licenses), and is developed by contributors worldwide. Day-to-day development takes place on the Linux kernel mailing list.
The Linux kernel was initially conceived and created by Finnish computer science student[8] Linus Torvalds in 1991. Linux rapidly accumulated developers and users who adopted code from other free software projects for use with the new operating system.[9] The Linux kernel has received contributions from thousands of programmers.[10] Many Linux distributions have been released based upon the Linux kernel."

I have a question too.
When I boot ubuntu 10.04, the kernel comes up as 2.6.32, I think this is the same number as a previous android kernel. So how close is the android kernel to the linux kernel, us it a fork? When the new linux kernel comes out, will the android kernel be updated to reflect that?

What the little brown things are in a popcorn bag before you pop it XD

I thought it would be better to ask here than start a new thread but i have never installed a kernal before and was wondering how, do you just flash it in recovery? I have the desire rom and would like for my speaker to be a bit louder.

With kernels, I usually do ADB command.

liam.lah said:
So how close is the android kernel to the linux kernel, us it a fork?
Click to expand...
Click to collapse
It's the same with some Android and phone specific patches applied. A config file decides what architecture to build for and what drivers to include. That's what lets us bring in cutting edge features like compcache and BFS quickly.
Nice to think that your phone is running the exact same code that the world's fastest supercomputer is.

Related

[Q] Building your own kernel

Hey all. This is my first post here on XDA.
I've been thinking of compiling my own kernel image for my HTC Legend. I've spent hours googling and reading different forums and blog's. But without greater success, most of the guidelines are not spot on and some things are not cristal. So I have a few questions regarding this.
I have read that a specific radio image is just "comptabile" for compilation with a specific kernel version. So let's say I have HTC_LEGEND_RADIO_7_083521_sign.zip, how do I know what kernel version this is made for? In my ears this sounds pretty strange . I would not be able to build a kernel from that radio image and the 2.6.35.5 Linux kernel?
I've also tried to figure out what exactly the radio image is from various boguos posts on different forums, and what I belive it is from the tiny bits of information I've found is that It's modules for the phones hardware?
Oh, and what is the latest radio image version available for the HTC Legend?
Hope someone can help me clear some of my questions
I can only answer the very last question lol, it's 7.08.35.21
Latest RUU:
RUU_Legend_Vodafone_AU_2.10.178.1_Radio_47.39.35.09_7.08.35.21_release_138238_signed.exe
First seen in:
RUU_Legend_HTC_WWE_2.03.405.3_Radio_47.39.35.09_7.08.35.21_release_130330_signed.exe
Hi tonper,
First... where did you get that radio has something to do with kernel??? Radio image is basically a firmware (operating system of its own that interacts with radio hw) and has nothing to do with Android kernel which is in fact patched Linux kernel. One can access all functions of radio through userspace Android apps that communicate with radio via native libraries. That's all that it is to say about radio in conjunction with kernel.
To be able to build a kernel one should first master basics of Unix/Linux system principles and first try to build own kernel for some Linux distro. One need to know also how to boot this kernel and use it with the rest of the operating system. Last thing to master is cross-compiling as you will be building kernel for ARM architecture most possibly on your x86 PC. In short the topics to search for would be:
* knowing Linux (principles)
* booting Linux (process)
* compiling Linux kernel
* cross-compiling
Android powah!
Thanks for your answer BlaY0!
Will check into it some more this weekend with this new information.
BlaY0 said:
* knowing Linux (principles)
* booting Linux (process)
* compiling Linux kernel
* cross-compiling
Click to expand...
Click to collapse
Been running Linux for 10 years and Debian for 7 years. So got the basic knowledge I just can't find any good documentation on this topic
Cyanogenmod wiki have some guides
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
snakehult said:
Cyanogenmod wiki have some guides
Click to expand...
Click to collapse
How could I have missed that page? Have been googling like a maniac. That was pretty much exactly what I was looking for. Thanks alot snake
tonper said:
Been running Linux for 10 years and Debian for 7 years. So got the basic knowledge I just can't find any good documentation on this topic
Click to expand...
Click to collapse
OK, then you're set m8 you just need to grab some ARM cross-compiling toolchain for x86. Your first bet would be Android NDK. You can also use CodeSourcery or even build your own toolchain with Buildroot... but for compiling kernel really doesn't matter which one U use.
Happy compiling

[Q] What is a Kernel?

Just wondering what it does and what kernel everyone else has?. Only coz i been learning to install the different custom roms ...but in the "About Phone" options the Kernel Version never seems to change...even tho the custom roms i install say that they have added a new kernel?...
anyway my kernel version is 2.6.32.9-perf
thats what it says anyway...does that mean anything? should i update it somehow?
what are you using?
Thanks.
xxguestxx said:
Just wondering what it does and what kernel everyone else has?. Only coz i been learning to install the different custom roms ...but in the "About Phone" options the Kernel Version never seems to change...even tho the custom roms i install say that they have added a new kernel?...
anyway my kernel version is 2.6.32.9-perf
thats what it says anyway...does that mean anything? should i update it somehow?
what are you using?
Thanks.
Click to expand...
Click to collapse
m using franco's kernel..
i think kernel is related to power...
"In computing, the kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components). Usually as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls."
Wikipedia
AlexxxR said:
"In computing, the kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components). Usually as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls."
Wikipedia
Click to expand...
Click to collapse
if i upgrade from 2.3.3 to 2.3.5 can i keep using then old kernel with the new version 2.3.5 or not ?
You chudakkar
Sent from my Desire HD using xda premium

XDA-Developers and the GPL

Dear Developers
I'm sure you already heard about the GPL around the forums. In case you did not, the GPL ("GNU General Public License") is the most common license that affects many projects, like the Linux Kernel (the Linux Kernel is licensed under the GPLv2). This affects us, XDA and its members, as we are often working with the Linux Kernel (every Android platform runs on top of the Linux Kernel).
You may ask yourself now "Well, that's nice, but how does this affect me and what does the GPL do?" The answer is pretty simple actually: The GPL guarantees users to examine, modify and share their and others code by enforcing open-sourceness. This means you are free to use any GPL'ed sourcecode for your project, but you must make your used code publically available again.
Now, as many advantages this has, it also means quite some work for us developers. All used sources must be completely public by the time the compiled binary (like a Kernel) goes online. Another requirement is, that the OP must include all information to compile the exact same binary as uploaded by the developer. This means you need to specify:
The used toolchain including its version (linking to your toolchain source is always a good idea)
The used defconfig
The link to your sourcecode (including the used branch, tags,...)
If used, also upload your scripts used for the compilation
If you upload a kernel, publish the source, but the source is not compilable, it means you are breaking the GPL as you did not release the used source. Breaking the GPL actually means breaking the law, which means the sanctions on XDA could possibly be the least of your problems...
Example:
GPL:
- Used sources (cm-10.1 branch)
- Used defconfig
- Used toolchain
- Used scripts
Click to expand...
Click to collapse
@ROM devs, using a precompiled kernel
As you are not compiling the kernel yourself, you do not have to give the above information. However, you have to link to the source of your kernel binary (for example: link to the OP of the used kernel). If you use the stock kernel, you must state this. Linking to the stock sources is not a requirement, but it is not the worst idea.
Keep in mind; if the kernel used is not GPL compliant, your ROM is not GPL compliant either. This may cause your thread to be closed and/or further action on your account may be taken.
Example:
GPL:
The kernel included in this ROM is located HERE. I have not altered anything.
Click to expand...
Click to collapse
If you need/want further information, you might want to take a look at THIS news article written by our Developer Admin pulser_g2

XDA-Developers and the GPL

Dear Developers
I'm sure you already heard about the GPL around the forums. In case you did not, the GPL ("GNU General Public License") is the most common license that affects many projects, like the Linux Kernel (the Linux Kernel is licensed under the GPLv2). This affects us, XDA and its members, as we are often working with the Linux Kernel (every Android platform runs on top of the Linux Kernel).
You may ask yourself now "Well, that's nice, but how does this affect me and what does the GPL do?" The answer is pretty simple actually: The GPL guarantees users to examine, modify and share their and others code by enforcing open-sourceness. This means you are free to use any GPL'ed sourcecode for your project, but you must make your used code publically available again.
Now, as many advantages this has, it also means quite some work for us developers. All used sources must be completely public by the time the compiled binary (like a Kernel) goes online. Another requirement is, that the OP must include all information to compile the exact same binary as uploaded by the developer. This means you need to specify:
The used toolchain including its version (linking to your toolchain source is always a good idea)
The used defconfig
The link to your sourcecode (including the used branch, tags,...)
If used, also upload your scripts used for the compilation
If you upload a kernel, publish the source, but the source is not compilable, it means you are breaking the GPL as you did not release the used source. Breaking the GPL actually means breaking the law, which means the sanctions on XDA could possibly be the least of your problems...
Example:
GPL:
- Used sources (cm-10.1 branch)
- Used defconfig
- Used toolchain
- Used scripts
Click to expand...
Click to collapse
@ROM devs, using a precompiled kernel
As you are not compiling the kernel yourself, you do not have to give the above information. However, you have to link to the source of your kernel binary (for example: link to the OP of the used kernel). If you use the stock kernel, you must state this. Linking to the stock sources is not a requirement, but it is not the worst idea.
Keep in mind; if the kernel used is not GPL compliant, your ROM is not GPL compliant either. This may cause your thread to be closed and/or further action on your account may be taken.
Example:
GPL:
The kernel included in this ROM is located HERE. I have not altered anything.
Click to expand...
Click to collapse
If you need/want further information, you might want to take a look at THIS news article written by our Developer Admin pulser_g2

What's the difference between the ROM and the kernel

I see installation instructions for a ROM (which is the Android OS, right?) and I see references to a kernel as well. What is the difference? Am I supposed to install both at the same time, or does the ROM carry the kernel, or how does it work?
Android is similar to mainstream linux operating systems in that the ROM is like the OS portion of a linux distro.
the Kernel is the portion that interfaces between the OS and the hardware.
Pretty much all Roms (there may be exceptions but I cant think of any) come prepackaged with a kernel as well.
so installing the ROM will install the kernel automatically and has the benefit of installing the kernel the developer intended.
There are separate Kernels available that have specific features you may prefer. (overclocking for CPU/GPU, specific modules loaded for emulation if running a linux distro within android etc.)
to install them you would install the rom (And its default kernel) then flash the kernel of your preference over it.
If you are just starting out I would just install the Rom and its default kernel unless you have a very specific use case.
hopefully that helps
There are often more pieces as well due to proprietary code:
ROM - the OS itself often either based on AOSP, the manufacturer software or Lineage (or a mix)
Kernel - refers to the open source linux kernel that controls hardware that it supports.
Firmware - includes manufacturer proprietary code for hardware that is not open source.
Modem - includes proprietary code for modem hardware.
it breaks down further but generally you will start with a stick manufacturer installation including all parts.
then you can flash a custom rom and kernel (Usally as a complete package)
Modem and firmware updates would still come from the manufacturer. (Most roms will tell you if a specific firmware or modem is needed, the modem usually doesnt matter as much anymore but in the early years it was important)
Thanks for the information!

Categories

Resources