Build Kernel In Tree with AOSP for Nexus 5 Hammerhead

Google has a fair document for building kernel for Android. Yet it didn't cover how to integrate the kernel with AOSP source tree so that kernel gets built along with whole platform, which I'll explain in this post. Here I'll mainly focus on android-4.4.4_r1 (Kitkat) for Nexus 5 (hammerhead). The instructions should be easy to adapt to other models or AOSP releases.

more ...