From Noisebridge
< Noisedroid
Revision as of 12:47, 16 March 2009 by Adi (Talk | contribs)

Jump to: navigation, search


<project path="kernel" name="kernel/msm" revision="refs/heads/android-msm-2.6.27"/>
    • this results in a build using a prebuilt kernel and wlan.ko from vendor/htc/dream/.
  • after make completes you'll have a built tree in out/target/product/dream, and you can run
# fastboot flash boot boot.img
# fastboot flash system system.img

Here's what I did to build my own kernel and wlan.ko:

cd mydroid

First, build the kernel. The android-msm-2.6.27 branch seems to work just fine. We're building for the msm platform using the mydroid/prebuilt/ 4.2.1 toolchain; the 4.3.1 toolchain doesn't seem to work.

cd kernel
make ARCH=arm CROSS_COMPILE=$d/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- msm_defconfig
make ARCH=arm CROSS_COMPILE=$d/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-

Once the kernel build completes without errors, we can build the horrifyingly complex TIWLAN driver. We don't need to set CROSS_COMPILE or ARCH, the system/wlan/ti/Makefile does that for us, but we do need to add the prebuilt toolchain to $PATH.

cd $d/system/wlan/ti
PATH=$d/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin:$PATH make KERNEL_DIR=$d/kernel

Finally, we can install the results into out/target/product/dream/ and rebuild boot.img (for the new kernel) and system.img (for the new wlan.ko). The makefiles don't have correct dependencies for the .img files, so we just delete them and let them get rebuilt.

cd $d
cp kernel/arch/arm/boot/zImage out/target/product/dream/kernel
cp system/wlan/ti/sta_dk_4_0_4_32/wlan.ko out/target/product/dream/system/lib/modules/wlan.ko
rm out/target/product/dream/*.img

Working with the G1

There are two significant host apps for (ab)using the G1: fastboot and adb. Fastboot is used to write over USB to the G1's flash, for example to flash a complete system.img or replace the T-Mobile splash screen. adb gives you access to a debug root shell on the G1 with adb shell, and also "syslog" with adb logcat.

Personal tools