Noisedroid/FAQ

From Noisebridge
< Noisedroid(Difference between revisions)
Jump to: navigation, search
(Undo revision 26689 by 91.121.27.33 (Talk))
 
(11 intermediate revisions by 6 users not shown)
Line 9: Line 9:
 
  # fastboot flash boot boot.img
 
  # fastboot flash boot boot.img
 
  # fastboot flash system system.img
 
  # fastboot flash system system.img
* to build your own kernel and wlan.ko, do:
+
 
 +
Here's what I did to build my own kernel and wlan.ko:
 +
cd mydroid
 
  d=$PWD
 
  d=$PWD
 +
First, build the kernel.  The <tt>android-msm-2.6.27</tt> branch seems to work just fine.  We're building for the <tt>msm</tt> platform using the <tt>mydroid/prebuilt/</tt> 4.2.1 toolchain; the 4.3.1 toolchain doesn't seem to work.
 
  cd kernel
 
  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- msm_defconfig
 
  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-
  cd $d/system/wlan/ti
+
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/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.
 
  cd $d
 
  cd $d
 
  cp kernel/arch/arm/boot/zImage out/target/product/dream/kernel
 
  cp kernel/arch/arm/boot/zImage out/target/product/dream/kernel
Line 29: Line 34:
  
 
[[Category:Cellular]]
 
[[Category:Cellular]]
 +
 +
 +
== USB to Serial interface with the G1 ==
 +
[[Image:G1-two-usb-to-serial-cable.jpg|thumb|G1 USB to Serial interface cable]]
 +
 +
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:
 +
_____________
 +
| A B C D E |
 +
\1 2 3 4 5 6|
 +
 +
A: GND
 +
B: NC
 +
C: +DATA
 +
D: -DATA
 +
E: +5v
 +
 +
1: +Mic
 +
2: +Right
 +
3: Switch / Rx (2.8V, CMOS-TTL Level) / CABLE_IN2
 +
4: GND / Tx (2.8V, CMOS-TTL Level) / CABLE_IN1
 +
5: GND (Serial GND, 0 Ohms resistance between this and pin A)
 +
6: +Left
 +
 +
'''!!! Fixed 10.10.09 : Rx & Tx reversed, because they were confused !!!'''
 +
 +
[http://www.instructables.com/id/Android_G1_Serial_Cable/ How to make a Android G1 Serial to USB Cable]

Latest revision as of 11:43, 28 July 2012

[edit] Building

<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
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.

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/sta_dk_4_0_4_32
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
make

[edit] 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.


[edit] USB to Serial interface with the G1

G1 USB to Serial interface cable

It's possible to create a USB to serial interface cable (details here) to interact with the running phone and the boot loader(s).

According to this android-platform post the serial port is 115,200 8N1 at 2.8V TTL with the following pinout:

_____________
| A B C D E |
\1 2 3 4 5 6|

A: GND
B: NC
C: +DATA
D: -DATA
E: +5v

1: +Mic
2: +Right
3: Switch / Rx (2.8V, CMOS-TTL Level) / CABLE_IN2 
4: GND / Tx (2.8V, CMOS-TTL Level) / CABLE_IN1
5: GND (Serial GND, 0 Ohms resistance between this and pin A)
6: +Left

!!! Fixed 10.10.09 : Rx & Tx reversed, because they were confused !!!

How to make a Android G1 Serial to USB Cable

Personal tools