2011年1月14日 星期五

Commands for build Marvell 8688 driver

# for build wifi driver
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KERNELDIR=/home/wnc/source/ema/linux-03.00.00.03
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KERNELDIR=/home/wnc/source/ema/linux-03.00.01.06
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KERNELDIR=/home/wnc/source/linux-omap-src/linux-omap-2.6
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KERNELDIR=/home/wnc/source/linux-omap-src/beagleboard/linux





Program image to flash

* 0x00000000-0x00080000 : "X-Loader"
* 0x00080000-0x00260000 : "U-Boot"
* 0x00260000-0x00280000 : "U-Boot environment data"
* 0x00280000-0x00680000 : "Kernel"
* 0x00680000-0x08000000 : "File system" for 128MB
* 0x00680000-0x10000000 : "File system" for 256MB


mmc init
fatload mmc 0:1 80000000 MLO
nandecc hw
nand erase 0 80000
nand write.i 80000000 0 80000

mmc init
fatload mmc 0:1 80000000 u-boot.bin
nandecc sw
nand erase 80000 160000
nand write.i 80000000 80000 160000

mmc init
fatload mmc 0:1 80000000 uImage
nandecc sw
nand erase 280000 400000
nand write.i 80000000 280000 400000

// for 128M flash
mmc init
fatload mmc 0:1 84000000 rootfs.jffs2
nandecc sw
nand erase 680000 7980000
nand write.i 84000000 680000 D40000



// for 256M flash
mmc init
fatload mmc 0:1 84000000 rootfs.jffs2
nandecc sw
nand erase 680000 F980000
nand write.i 84000000 680000 D40000


2011年1月5日 星期三

Ubuntu/Linux 下使用UART console/terminal

Ubuntu/Linux 下使用UART console/terminal

1. 下載minicom
sudo apt-get install minicom

2. 設定minicom
sudo minicom -s

2.1. 修改Modem 的通訊設定(Serial port setup),將Baund rate 設為 115200,資料位元設為 8,無同位元,停止位元設為 1 (Bps/Par/Bits:115200 8N1), 硬體Flow控制為off,
指定連接 Console的序列埠 (Serial Device);其中/dev/ttyS0表示 COM1,/dev/ttyS1為 COM2、/dev/ttyUSB0為 USB to UART

2.2. 接著修改Modem 的撥接設定(Modem and dialing), 將Init string 和Reset string 都設為空白

2.3. 儲存設定(Save setup as df1)

2010年12月29日 星期三

Let some command without input password

1) execute visudo to edit the script of sudoer
sudo visudo

2) add below text in editor, hit ctrl-x and 'Y' to save it
wnc ALL= NOPASSWD: /sbin/shutdown


2010年12月24日 星期五

Update Linux shared library

cp libxxx.so /usr/local/lib
ldconfig -v -n /usr/local/lib

2010年12月8日 星期三

touchscreen calibration


From: Tias 
There is now a generic touchscreen calibration utility that can 
calibrate evtouch, as well as evdev (the now preferred upstream driver 
for touchscreens) and others.

I've uploaded it to mentors and mailed:
http://lists.debian.org/debian-mentors/2010/08/msg00066.html

You can download a binary deb package on the website:
http://github.com/tias/xinput_calibrator/downloads

More info on the homepage:
http://www.freedesktop.org/wiki/Software/xinput_calibrator



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