[Droid Incredible General] wildstang83:
Hey all, I guess if your here its because you want to build your own kernel from the HTC GB Kernel source for the HTC Droid Incredible. So that's what we're gonna do.

First things first. I have to send out a huge thanks to a few guys that helped me out along the way.

jdkoreclipse - Your the best man. Thanks for getting me compiling.

wdfowty - Always good on the code.

ohheyitslou - Standing by while a blabbered on with stupid questions.

conap - The original god of kernels.

Koush - Thanks for the anykernel updater.

First things first, lets make sure you are on a linux distro. At the time of this writing, I was using Ubuntu 11.10 x64. Note: 64x is highly suggested. My computer is a dual core amd machine with 4GB of ram. I have a 250GB HHD.

Next lets download some things that we will need for your kernel.

The kernel source of course:

DROID Incredible by HTC (Verizon) – GB MR - 2.6.35 kernel source code

This is the correct size and MD5:

88.8 MB (93,175,808 bytes) 67c01623ff73415a99e5f8cd1d8ef11a

You will also want the CM Toolchain. This is what compiles your kernel.

Open a terminal window and type:

git clone git://github.com/CyanogenMod/android_prebuilt.git prebuilt

And finally, the anykernel_updater.zip for packaging and flashing your kernel: anykernel_updater.zip

Have these things downloaded? Great! Lets continue.

Next we need to create a new build directory to build your kernel in. For this tut, we will make this in your Home dir.

Open a terminal window and type:

cd ~
mkdir android
cd android
mkdir kernel

Easy huh?

Next grab your HTC Droid Incredible kernel source archive and just open it with archive manager. We don't need to do any untarring here.

You'll want to drag that 395.2MB folder inside called 'incrediblec-2.6.35-gb-mr' to that kernel directory you created.

Next, grab the CM toolchain archive and open it the same way. Yup just drag that folder thats inside there out and put right in your 'android' folder.

So lets review real quick before we continue:

Inside your Home directory you now have a folder called: android

Inside that android folder you have two folders. One called: kernel and the other called: android_prebuilt or prebuilt.

Inside the kernel folder you have your kernel source folder: incrediblec-2.6.35-gb-mr

Is this correct? Good.

Now, lets open a new terminal window and move to your kernel source folder:

cd '/home/yourusername/android/kernel/incrediblec-2.6.35-gb-mr'

Now we will compile the source. Note: This is a basic kernel source compiling guide. Our focus is to simply compile the source. Nothing more.

In the terminal window type:

make incrediblec_defconfig
make -j4 ARCH=arm CROSS_COMPILE=/home/yourusername/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

Note I used j4. This is because I am using a dual core box to develop on. I think now days most boxes are usually dual core or quad core?

Your kernel should now be compiling. This process could run average between 5min-1hr. My laptop (which is beast) did it in about 2 minutes. But then again I'm running a full install of 'buntu x64 with everything updated and ready to rock.

Anyways after the compiler finishes building it will tell you where to locate your kernel and wifi driver. Yes the wifi driver is included!

The kernel should be at: /home/yourusername/android/kernel/incrediblec-2.6.35-gb-mr/arch/arm/boot/ for those that don't know it is called 'zimage'. Just drag that out to your Desktop.

Now go grab your wifi driver. Its located at: /home/yourusername/android/kernel/incrediblec-2.6.35-gb-mr/drivers/net/wireless/bcm4329_204/ It will be called bcm4329.ko. Again drag that out to your desktop.

Now you can close everything thats open. Grab that anykernel_flasher.zip you downloaded earlier and open it up with archive manager. Don't extract it, just open it.

Navigate to system/lib/module/ and drag your bcm4329.ko right into it.

Next back up all the way to the root of the anykernel_flasher.zip and then open the kernel folder. Yup just drag and drop your zimage right in there. Close the archive manager window.

CONGRATS!!! You just compiled your first kernel from source!

Now you can rename the zip to whatever is easiest for you to remember. Common practice says the date and time should be in the name. Like mine from today is called: 2.6.35.13-stang-kernel-1830-110111.zip.

Now go test your kernel. Just put it on your sd card and flash it through recovery. The anykernel_updater.zip will handle the wiping for you so you shouldn't have to worry about wiping boot, dalvik-cache or cache. You can still wipe those things if you would like.

Once the flash is complete, just hit reboot device and wait for your phone to boot up. It took mine about 5 minutes to fully boot up.

Well, I hope yall enjoyed this guide. I wanted to keep it simple. I am not a kernel god or anything but let me tell ya, I went through a lot to try to learn how to do this. So if you run into any trouble, I'll try to help you out if I can.

Have fun guys!