顯示具有 Android 標籤的文章。 顯示所有文章
顯示具有 Android 標籤的文章。 顯示所有文章

2010年1月26日 星期二

to enable wifi driver and WPA_supplicant

#!/bin/sh
# load wifi driver
insmod sdio.ko
insmod tiwlan_drv.ko
tiwlan_loader
ifconfig tiwlan0 up

#
# the content of /data/misc/wifi/wpa_supplicant.conf
#
# ctrl_interface=/var/run/wpa_supplicant
# ap_scan=1
# update_config=1
#
# #any AP
# network={
# key_mgmt=NONE
# }
#
# #WEP key
# network={
# ssid="xwlan"
# key_mgmt=NONE
# wep_key0="12345"
# wep_key1=31323334353536383930313233
# wep_tx_keyidx=0
# }
#
# #WPA or WPA2
# network={
# ssid="xwlan"
# key_mgmt=WPA-PSK
# psk="hellohello"
# }
#

#make sure /var/run folder is existence
#mkdir /var; mkdir /var/run

# execute wpa_supplicant
wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd &

# wpa_cli is a CLI application
#wpa_cli -p/var/run/wpa_supplicant

# dispatch ip address
#ifconfig tiwlan0 192.168.5.11 netmask 255.255.255.0 up
/system/bin/dhcpcd -BKL -d tiwlan0 &

# telnetd
#/data/bin/busybox telnetd -l /system/bin/sh


2009年12月2日 星期三

The "request_suspend_state"

request_suspend_state() in kernel/power/earlysuspend.c

u-boot setting, kernel loaded from SD card or TFTP

Kernel loader from SD card, uboot setting
nand unlock
nand ecc sw
setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init videoout=omap24xxvout omap_vout.video1_numbuffers=4 omap_vout.vid1_static_vrfb_alloc=y ip=192.168.5.10
setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'
saveenv

Kernel loaded from TFTP, uboot setting
nand unlock
nand ecc sw
setenv serverip 192.168.5.1
setenv ipaddr 192.168.5.10
setenv netmask 255.255.255.0
setenv bootfile 'uImage'
setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init videoout=omap24xxvout omap_vout.video1_numbuffers=4 omap_vout.vid1_static_vrfb_alloc=y ip=192.168.5.10
setenv bootcmd 'tftp 81c00000 uImage;bootm'
saveenv

Print environment parameter
printenv

Boot immediately
boot


busybox's telnetd on Android

build busybox
下載 busybox source code
在busybox source code 目錄下,
$ make menuconfig

Busybox Settings -> Build Options ->
[*] Build BusyBox as a static binary (no shared libs)
Cross Compiler prefex
/opt/toolchain/arm-2008q3/bin/arm-none-linux-gnueabi-
Busybox Settings -> Installation Options->
[*] Don’t use /usr

$ make -I./opt/toolchain/arm-2008q3/arm-none-linux-gnueabi/libc/usr/include/
$ make install
$ cd _install/bin
$ tar zcvf busybox.tgz *

安裝 busybox 在 Android's myfs
$ mkdir $MYFS/data/busybox
$ cp busybox.tgz $MYFS/data/busybox
$ cd $MYFS/data/busybox
$ tar zxvf busybox.tgz

設定init.rc
$ vi /init.rc
export PATH /data/busybox:/sbin:........................

service telnetd /data/busybox/busybox telnetd -l /system/bin/sh
oneshot


reference:


2009年12月1日 星期二

build Android under Ubuntu 9.10

  • Ubuntu 9.10 users may need to install a newer version of standard C++ library
$sudo apt-get install libstdc++6 
  • Ubuntu 9.10 users may need to add the old Jaunty repos to their /etc/apt/sources.list to install sun-java5-jdk
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse


Reference: http://omappedia.org/wiki/Android_Getting_Started

2009年11月25日 星期三

source list for ubuntu 8.04.3

# /etc/apt/source.list

deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy main universe restricted multiverse
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy main universe restricted multiverse

deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-security universe main multiverse restricted
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-security universe main multiverse restricted

deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-updates universe main multiverse restricted
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-updates universe main multiverse restricted


deb ftp://os.nchc.org.tw/ubuntu/ hardy main universe restricted multiverse
deb-src ftp://os.nchc.org.tw/ubuntu/ hardy main universe restricted multiverse
deb ftp://os.nchc.org.tw/ubuntu/ hardy-security universe main multiverse restricted
deb-src ftp://os.nchc.org.tw/ubuntu/ hardy-security universe main multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu/ hardy-updates universe main multiverse restricted
deb-src ftp://os.nchc.org.tw/ubuntu/ hardy-updates universe main multiverse restricted



# if your PC connect to internet via proxy, please add below command into ~/.bashrc
# export http_proxy=http://192.168.0.12:8080
# export ftp_proxy=http://192.168.0.12:8080

under cygwin, update Android source code via repo

* Install cygwin
* make sure git version is 1.5.4 or greater than.
* Install repo

* Repo Installation

“Repo is a tool that makes it easier to work with GIT in the context of Android. For more information about Repo, see Using Repo and GIT.

To install, initialize, and configure Repo, follow these steps:

1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
$ cd ~
$ mkdir bin
$ echo $PATH

2. Download the repo script and make sure it is executable:
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo



2009年11月24日 星期二

repo behind proxy

To use GIT behind a proxy, have a look at:

http://www.aptgetupdate.de/2007/07/27/git-hinterm-proxy-nutzen/

Basically the steps are:
1 - sudo apt-get install socket
2 - in your home directory, put a shell script called "proxy-cmd.sh"
containing (replace YOUR_PROXY and YOUR_PROXY_PORT with your own proxy
parameters)
:
#! /bin/bash
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket YOUR_PROXY
YOUR_PROXY_PORT | (read a; read a; cat )
3 - chmod +x proxy-cmd.sh
4 - export GIT_PROXY_COMMAND=/proxy-cmd.sh

Enjoy,
Matthieu


http://groups.google.com/group/android-developers/browse_thread/thread/4afd67a3d4ac93da