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

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 <tt>system/wlan/ti/Makefile</tt> does that for us, but we do need to add the prebuilt toolchain to $PATH.

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 <tt>system/wlan/ti/Makefile</tt> does that for us, but we do need to add the prebuilt toolchain to $PATH.

−

cd $d/system/wlan/ti

+

cd $d/system/wlan/ti/sta_dk_4_0_4_32

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

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 <tt>out/target/product/dream/</tt> and rebuild <tt>boot.img</tt> (for the new kernel) and <tt>system.img</tt> (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.

Finally, we can install the results into <tt>out/target/product/dream/</tt> and rebuild <tt>boot.img</tt> (for the new kernel) and <tt>system.img</tt> (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.

It's possible to create a USB to serial interface cable ([https://noisebridge.net/pipermail/noisebridge-discuss/2009-March/003336.html details here]) to interact with the running phone and the boot loader(s).

+

+

According to [http://groups.google.com/group/android-platform/browse_thread/thread/439d3f3af7a88a09/10a80eb835e8dbcc?lnk=gst&q=serial#10a80eb835e8dbcc this android-platform post] the serial port is 115,200 8N1 at 2.8V TTL with the following pinout:

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
d=$PWD

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.

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.

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.