1

I'm doing something interesting on the Android kernel, but the kernel from AOSP has problems with certain problems and the kernel won't compile with some options enabled (some stray symbols missing).

So I'm thinking of adding the mainline kernel the same version into the master branch of the AOSP kernel repository.

But the problem is I'm quite a newbie in using git.

I have no idea what's the routine to achieve this.
I don't need the detailed steps, just the major steps are OK.


EDIT:

I may have not expressed what I meant clearly. I can and have successfully built a kernel with the default options, but some options will cause the build fail.

So I want to try to get patches from the Android kernel tree to apply on vanilla kernel sources hoping that this will fix the problem.

Community
  • 1
  • 1
Johnson Steward
  • 534
  • 3
  • 16
  • Please at least try something then post question with more detailed description of problem you are facing. You can start here:https://source.android.com/source/requirements.html – Piotr Król Jan 02 '16 at 10:16
  • @PiotrKról made an edit. I have not clearly expressed what I'm asking, sorry ;) – Johnson Steward Jan 02 '16 at 10:53
  • I still do not understand. Have you got problem with source code comparison ? Take Android kernel, check it's version, get mainline kernel, checkout the same version using git and then compare source code tree. In my opinion it would be terribly inefficient, because changes are probably too big. – Piotr Król Jan 02 '16 at 10:59
  • @PiotrKról Hmm, you mean this one? http://stackoverflow.com/q/1968512/5520728 – Johnson Steward Jan 02 '16 at 12:56
  • You can do this if you have Linux kernel for your Android as separate git tree. If not then you have to figure out exact version of kernel in Android, then do checkout of the same version in mainline kernel tree. Then if you copy kernel from Android for mainline directory `git diff` will show you all the difference, but as I mention before I think it would be huge difference that cannot be maintain easily. – Piotr Król Jan 02 '16 at 19:57
  • @PiotrKról My device is `hammerhead`, but I plan to work on `goldfish` first. Can the differences be extracted out in batch as patches or something else? – Johnson Steward Jan 03 '16 at 04:35
  • 1
    Patches are result of diff command so it will return huge patch, if you can divide it and know how to resolve issues when applying to different tree, then extracting can be useful. – Piotr Król Jan 03 '16 at 11:10
  • @PiotrKról is it possible to split that patch into commits or something like 10 commits? The android tree is at 3.4, and I'm trying to get the patch to apply on any mainline kernel versions (at least on 3.4 and the most recent version so new things can be used). – Johnson Steward Jan 04 '16 at 10:11
  • It is possible to split, but you will have to do that manually. Please at least start doing what we talked about, then you will realize how much different is your Android kernel and mainline. I assume there will be thousands lines of code changed. It will take a lot of time and effort to extract and port those code. – Piotr Król Jan 04 '16 at 10:54

0 Answers0