Creating a patch android_2.6.27 vs. Samsung Galaxy

As you might have noticed (or not) I am working on my own custom Samsung Galaxy ROM called „Italy“. Right now, I am concentrating on the kernel. It looks like the devs over at Samsung (or their contractor) started from a rather outdated base of the android kernel.

To be able to include the drives for the Qualcomm MSM chip and board, I started various attempts…

First attempt: diff android_2.6.27 vs. Samsungs source. This wasn’t working, since the android 2.6.27 kernel has undergone some revisions, and the resulting patchset isn’t anywhere near to be called „Samsung additions“. It’s more one year of kernel development PLUS Samsung/ Qualcomm drivers. Unusable.

Second attempt: merge android_2.6.27 developments into the Samsung Kernel. Result: compiling and working kernel – yay!

Next step: create patchset from 2.6.27-44 (latest kernel.org download of 2.6.27) and android_2.6.27 – merge this one into the source mentioned at 2nd attempt: compiling and (mostly) working – yay!

Still, the changes from android_2.6.27 to android_2.6.29 are too big to be simply merged in. Let’s start over – every iteration brings more knowledge. Like, this time, the conclusion, that the Samsung kernel includes the „mem_notify“ patch from early 2008 which is not used in any way as it seems. So before redoing the excercise, I will clean out those mem_notify patches to have an as-clean-as-possible base…

By the way, „meld“ is a great tool for this purpose, you should take a look at it.

I gathered the mem_notify patches from the LKML mailing list archives, glued them together and created a reverse patch. Some of the changes got rejected (it happens all the time) but using meld, I can clearly separate out the mem_notify related changes and reverse them. The remaining big chunks are… deciding if a certain code change was introduced to support Qualcomm specific hardware features (for instance bluetooth poweroff, BCM4325 power controls) or if it’s just an evolutionary patch in android_2.6.27.

Oh, btw, I am not a kernel hacker – I admit I don’t even understand C except for a bit of code reading ;-)