Is it possible? Yes.
Is it practical? No.

First you need to understand that you can't put mainline kernel on a board (not 
a device, that's important) and expect it to just work. Although there are some 
exceptions, like Qualcomm's Dragonboards, that pretty much work out of the box 
because they are supported in mainline, most of the time you will need to patch 
the Linux kernel so that it boots and operates on your board of choice. 

This is the first wave of patching, which diverges the kernel from mainline. 

Second wave is getting peripherals to work — everything from an LCD display to 
speakers. 

Once it is done, the board manufacturer releases their product along with 
kernel code and documentation to the public, at which point device 
manufacturers pick these boards up and introduce the third wave of patches — 
these are specific for a particular device. Generally this set of patches is 
limited to drivers of touchscreen, accelerometer etc. Most of the time you can 
actually take the generic board kernel and it will boot just fine, but most 
things won't work, since they need said drivers.

Now, if you want to port a newer kernel to your device, you will need to repeat 
these steps as if you were the board/device manufacturer, except you will be 
using a different kernel version.

Here's the problem: it takes a lot of time. Manufacturers have huge teams of 
developers working day and night on getting things done, and you are alone. Of 
course, it's a bit easier for you, since you don't have to work in the dark — 
all changes required for the board to boot are already there, you just need to 
adapt them to a newer kernel version. But it's easier said than done, since 
kernel API can vary greatly even in between two adjacent minor releases. The 
amount of work is also huge. For example, I have a 3.10.49 kernel from Qualcomm 
and it has a staggering 2 million lines of code difference from the mainline 
3.10.49. The good thing is, 1.6 million is driver code, so I can spend about a 
week porting the other 400 thousand and it'll probably be functional.

So, to sum up: this is a bad idea. It is doable, but will take a lot of time 
and will probably take a toll on your mental health. If you really, really want 
to do it, your best bet is to team up with other developers who maintain 
devices of the same board. In the end it all comes down to the amount of time 
you can invest, but is spending weeks of you free time really worth it?

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to