Kernel upgrading - Android Q&A, Help & Troubleshooting

I have been breaking my head on finding some guide on how to upgrade earlier version of android kernel to new one. I find out that it can be done with patching(???) with some files that will include new kernel files to old kernel and upgrade it to another newer version. In my case I have tegra device with 2.6.32 kernel but there's nvidia tegra git and newer kernel versions(even 3.0) I think that files like this or this are kernel patches?
Please, help me?!?!
If this isn't feasible, please, tell me, I won't break my head anymore!!!
Thanks
Jon

Related

Kernel sources

I have a Garminfone and have done a lot of Rom hacking with it so far, enough that I want to port cyanogen to it now. In the config.gz file there are references to Garmin specific items... how do I go about figuring what is included in the kernel and if the stock one might work with the right config settings. I know that they load a few ko modules at boot, but I don't know the requirements for when they must release kernel sources and what to do with it if they do.
I know they have released some in the past for the a10 but not the a50, and none for the 2.1 build.
I do know that they use the 2.6.29 kernel so is there a chance that I could use the current kernel with froyo?
Any assistance would be appreciated.

[Q] Kernel 2.6.29

What do you make of this.
http://forum.archosfans.com/viewtopic.php?f=63&t=44030
I'm no Android or Linux expert or even Above Beginner really so would appreciate any info available.
Is it usual to base newer FW on older Kernels. Someone also says Android 1.6 was based on 2.6.29???
Cheers
It shouldn't really make any difference in this case. It's definitely not a 'fake' Froyo as that person is calling it.
When comparing Archos' kernel (it's included in their GPL package) with Android's kernel 2.6.29, there are a lot of differences, about 1000 files changed. I guess they've added some omap patches (I'm not allowed to post external links, yet, so let me describe the git repository: git (dot) kernel (dot) org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git) or even use the omap kernel, because Archos' kernel suffix is also "-omap1".
Good to see that the omap guys are up-to-date with their kernel. So... let's try to make it work on our Archos devices!

[Q] Linux kernel 3.08 or 3.1 on Android possible?

After seeing that the Galaxy Nexus is so far running kernel 3.0.1, I was wondering if it is possible to update current kernels on existing devices to a 3.x kernel. I have a little experience in at least successfully upgrading Debian to 3.1 kernel, but compiling for android is a bit different it seems.
On my G2x, which is running 2.6.32.45, I attempted to compile a 3.1 kernel, and it refused to boot into CM7. I followed the CM kernel compilation guide, but to no avail. Would this most likely be due just to error on my part during compilation or configuration, or do I need to wait for LG to make their own 3.x kernel based ROM to derive the proper drivers?
Is it even possible at all to "upgrade" to a higher kernel version if the phone manufacturer has not done so themselves already? Thanks for any input!
Yes, you will have to wait until LG releases their version. No, its not possible to upgrade to a higher kernel version if the phone manufacturer has not done so themselves (you could try to compile one based on a higher version but that would have to be from some other manufacturer and most likely it will not work). To answer your title question, yes, it most likely will be done in higher versions of android.
Theonew said:
Yes, you will have to wait until LG releases their version. No, its not possible to upgrade to a higher kernel version if the phone manufacturer has not done so themselves (you could try to compile one based on a higher version but that would have to be from some other manufacturer and most likely it will not work). To answer your title question, yes, it most likely will be done in higher versions of android.
Click to expand...
Click to collapse
Thank you for replying so quickly and concisely!
That is a bit disappointing, but realistic I suppose. In the 3.1 kernel changelog there were a ton of Tegra based changes/fixes, so I figured I'd try it out on the Tegra based G2X. What is it that the newer kernels are missing that severely hinders upgrades on android as oppose to desktop (x86?) platforms?
In more realistic terms, the most likely way of being able to jump up to a higher kernel would be say, using the 3.0.1 kernel from the Galaxy Nexus dump as the source and use a current 2.6.32 config with it? I might try it out if it's a little more likely!
hobbla said:
Thank you for replying so quickly and concisely!
That is a bit disappointing, but realistic I suppose. In the 3.1 kernel changelog there were a ton of Tegra based changes/fixes, so I figured I'd try it out on the Tegra based G2X. What is it that the newer kernels are missing that severely hinders upgrades on android as oppose to desktop (x86?) platforms?
In more realistic terms, the most likely way of being able to jump up to a higher kernel would be say, using the 3.0.1 kernel from the Galaxy Nexus dump as the source and use a current 2.6.32 config with it? I might try it out if it's a little more likely!
Click to expand...
Click to collapse
The newer kernels aren't missing anything. In fact, they have many more features, optimizations, and fixes which do not allow them to work on earlier versions of android.
More likely yes, but still, it most likely will not work (since these earlier version of android won't support all what higher kernels and android versions support).
hobbla said:
After seeing that the Galaxy Nexus is so far running kernel 3.0.1, I was wondering if it is possible to update current kernels on existing devices to a 3.x kernel. I have a little experience in at least successfully upgrading Debian to 3.1 kernel, but compiling for android is a bit different it seems.
On my G2x, which is running 2.6.32.45, I attempted to compile a 3.1 kernel, and it refused to boot into CM7. I followed the CM kernel compilation guide, but to no avail. Would this most likely be due just to error on my part during compilation or configuration, or do I need to wait for LG to make their own 3.x kernel based ROM to derive the proper drivers?
Is it even possible at all to "upgrade" to a higher kernel version if the phone manufacturer has not done so themselves already? Thanks for any input!
Click to expand...
Click to collapse
Just ported this 3.1 kernel last night. I took the Linaro 3.1 Linux kernel, and integrated ashmem, pmem, binder, and lowmemorykiller.
http :// i271.photobucket.com/albums/jj141/landcruiserfjz80/kernel/2011-11-09_09-39-08_429.jpg
forcedinductionz said:
Just ported this 3.1 kernel last night. I took the Linaro 3.1 Linux kernel, and integrated ashmem, pmem, binder, and lowmemorykiller.
Click to expand...
Click to collapse
Care to upload it?
Theonew said:
Care to upload it?
Click to expand...
Click to collapse
It's for an OMAP3 platform. If you are looking to port a Tegra 2 BSP to a 3.1 kernel i'd be willing to help get it going.
forcedinductionz said:
It's for an OMAP3 platform. If you are looking to port a Tegra 2 BSP to a 3.1 kernel i'd be willing to help get it going.
Click to expand...
Click to collapse
That would be great! I've never considered Linaro before. From reading up on it, it seems to be an optimized kernel for ARM (and other mobile CPUs)? You might have to make a tutorial on how to customize your own kernel
hobbla said:
That would be great! I've never considered Linaro before. From reading up on it, it seems to be an optimized kernel for ARM (and other mobile CPUs)? You might have to make a tutorial on how to customize your own kernel
Click to expand...
Click to collapse
I'm about to deliver some Android changes to this tree. If you are serious about supporting Tegra2 please point me to your current kernel's source code. I'll begin porting the BSP and drivers.
https :// github.com/EmbeddedAndroid/linaro-android-3.1
forcedinductionz said:
I'm about to deliver some Android changes to this tree. If you are serious about supporting Tegra2 please point me to your current kernel's source code. I'll begin porting the BSP and drivers.
https :// github.com/EmbeddedAndroid/linaro-android-3.1
Click to expand...
Click to collapse
This looks great! Would you be including the Tegra 2 BSP and drivers into the embedded kernel? I (and any other Tegra device owners) really appreciate the help!
Here's the source for the device I have; LG G2X (P999) with a Tegra 250 (sorry about mediafire, LG doesn't allow hotlinking):
http :// www.mediafire.com/?9zt7suw7nivbr7o
If we wanted this to work on a Cyanogenmod based kernel, I guess you'd have to look at the Cyanogen Git. Here's the the P999 cyanogen git:
https :// github.com/CyanogenMod/android_device_lge_p999
You can look at getting set up with it easily here, I believe:
http :// wiki.cyanogenmod.com/wiki/Building_Kernel_from_source
Thank you for helping! If there's anything else I can help with, or resources you could post that would allow me to help you better that'd be great.
I am pulling down the sources now. It's been a busy week getting ICS up and running but now I have some time to play. I'll keep you posted on my progress.
How it's goin'?
forcedinductionz said:
I am pulling down the sources now. It's been a busy week getting ICS up and running but now I have some time to play. I'll keep you posted on my progress.
Click to expand...
Click to collapse
Sounds great! Again, if there's anything we can assist you with just let us know. Or, outlining the steps you're taking could allow us to help in the future
Sent from my LG-P999 using XDA App
Is everything OK?

Q on building the "latest" Android Kernel

I have a general question about building the Android kernel. For understanding purposes, I'm a C/C++/C# developer (and Android application developer), but have little functional knowledge of the Linux kernel.
With regard to porting Android, I'm curious how one builds the latest Kernel. The Android Kernel is not simply the standard Linux Kernel branch, correct? Where does one get the latest "Android" Kernel from? Does Google host a Kernel site as part of AOSP that we can sync with?
Once you have the latest Kernel, is it simply a matter of ensuring the Make file is accurate, adding the appropriate device drivers (as .so files?) for your particular hardware, and performing a Make? Then I assume you can update your device's Kernel with the one you've buildt?
In closing, for example, I'd like to sync the Android 3.0 Kernel, update the drivers necessary for my EVO 4G, build the latest Kernel, and then flash it to my phone. Just looking for some insight as I start getting educated on the topic.
Thanks for any advice you can offer!
Actually, the android kernel is very similar to the linux kernel (well it is based on the linux kernel). You can get the kernel from here: http://source.android.com/source/downloading.html. You can also take a look here: http://elinux.org/Android_Kernel_Download and here: http://elinux.org/Android_Kernel_Features. It will be quite difficult to build a kernel for your device without the source (there's none for 3.0.1 for your device), but you could still build it from a lower kernel version: http://linux.softpedia.com/progDownload/HTC-EVO-4G-Sprint-Kernel-Source-Code-Download-58254.html.
Thanks for the info, Theonew. When you say that it will be difficult for me to build the kernel for an EVO without the source, is that because the vendors (Qualcomm, for example) haven't made source for their devices available, so it's hard to build the drivers (.so files?) that are compatible with the latest kernel?
Shidell said:
Thanks for the info, Theonew. When you say that it will be difficult for me to build the kernel for an EVO without the source, is that because the vendors (Qualcomm, for example) haven't made source for their devices available, so it's hard to build the drivers (.so files?) that are compatible with the latest kernel?
Click to expand...
Click to collapse
HTC hasn't released the source of the kernel v3.0.1 (which comes in Ice Cream Sandwich) for your device (since it's not available for your device...yet at least).

What Steps Do You Take To Upgrade A Kernel?

So the phone manufacturer has provided kernel source and lets assume that it compiles and deploys fine.
What are the steps to upgrade the kernel to a newer version?
Lots of threads that I read suggest looking for another kernel that is based on a similar device and using that.
However, what happens if there is no similar device?
What steps do you take to upgrade a kernel in this case?
Would I just find the equivalent base in the android kernel source and git diff and patch each commit until I got to the version I wanted then try to fix any compile errors?
I can't seem to find a thread with the actual fine details of the kernel upgrade process.
I didn't get round to upgrading my kernel.
Does anyone have a developers guide on the steps to update your kernel source code?

Categories

Resources