Written by Edvard
Sunday, 13 December 2009 18:27

koder0 I suspect that there are a lot of potential developers out there who are able to contribute great things to the Android porting project. Its not really that much about technical knowledge but rather time, patience and logic.

I have finally gotten some more spare time too, so I will be getting more into development over the coming days. So, I thought I could post a quick little guide to get started. I really would like to stress that it doesnt really require much previous experience, as long as you know your way around Linux..

Interested? Keep on reading!

 

Firstly, if you need any help, feel free to ask over at the forums!

Ok, the first step is to build a kernel. Thanks to Makkonnen and GeekLad for the guide

 

Building the Kernel for Android on HTC

Obtain Kernel Source

(if you get an error that says fatal: git checkout: branch htc-msm-2.6.27 already exists, just ignore)

  • git checkout htc-msm-2.6.27

(if you get an error that says Already on "htc-msm-2.6.27", just ignore)

Obtain the ARM toolchain

Compile the Kernel

  • make ARCH=arm htc_msm_android_defconfig
  • make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage
  • cp arch/arm/boot/zImage <your device's sd card>

.

Tips and Tricks:

Required Changes to boot with data on RAPH800

  • git checkout 678b61056de1f08be45fab4dc5f40ab17e9c7a17 arch/arm/mach-msm/smd.c arch/arm/mach-msm/smd_rpcrouter.c
  • Edit arch/arm/configs/htc_msm_android_defconfig and comment the line with CONFIG_USB_FUNCTION_DIAG=y

Revert Changes in git

git reset –hard

After this is done, its time to start working..

phhusson explains..

Read and understand kernel sources, mostly in arch/arm/mach-msm, you might first read board-htcraphael-navi.c, should be one of the easiest file to read and understand, and smd*, proc_comm* and clock* are the hardest one to understand. You might also read htc-linux's wiki in the meanwhile, and comparing code to doc. For user space, you can read /init file in rootfs.img and /init.donut.rc, maybe aslo the /init of the initramfs to what start do.
For user land part, download android sources (donut's one preferably, but another one would be fine too), check adb logcat to see what's going on, and check sources (grep is your friend.), to see what's actually doing.


Last Updated ( Sunday, 13 December 2009 23:30 )