Native Compiling Kernels on Droid Incredible

Native compiling 2.6.35 kernel on Android

I have a complete debian environment that I created on my Droid Incredible. On my 4GB sdcard, I have a 2GB VFAT filesystem, which mounts as the Incredible’s normal sdcard, and the other 2GB is an ext2 filesystem which contains my Debian distribution. The distro was created using debootstrap –foreign on an x86 machine, then completed using debootstrap –second-stage, once copied to my rooted phone.

I’ve downloaded the kernel source from HTC for 2.6.35 and I’m currently attempting to native complie it within my debian environment.

I’ve added a couple extras to the stock kernel; namely RNDIS for wired tethering and USB OTG device support so I can plug in a keyboard.

We will see what happens!

Stay tuned!

UPDATE: Eh, didn’t work. Keep getting errors:

arch/arm/mach-msm/io.c:44:1: error: 'MSM_GPT_PHYS' undeclared here (not in a function)
arch/arm/mach-msm/io.c:44:1: error: 'MSM_GPT_SIZE' undeclared here (not in a function)
arch/arm/mach-msm/io.c:88:1: error: 'MSM_SDC2_BASE' undeclared here (not in a function)

Native compiling

I have compiled countless kernels for i386, but I don’t know why it’s so annoying to compile a kernel for ARM. Every time I try to compile an ARM kernel, I get an error. I finally found that I needed to add EXTRA_AFLAGS=-mfpu=neon to the “make” command (at least for this kernel), but I’m not quite sure what that does. In any case, it does seem to work.

Downloaded “Droid Incredible by HTC (Verizon) – Froyo MR – 2.6.32 kernel source code” from here.

Do vi Makefile and set CROSS_COMPILE to nothing.


make -j3 ARCH=arm incrediblec_defconfig
make EXTRA_AFLAGS=-mfpu=neon