一勝N敗 (N~5)
今天終於取得第二勝了
....simple life
GPH10 控制小 port:0 是打開 1 是關掉
GPH8 控制大 port: 1 是打開 0 是關掉
之前請正哥寄信去要電路圖都不屌我們
COLOR 打電話去就要到了
GPH8 : USB_HOST_EN
GPH10 : nUSB_PULL_UP_EN
USB_HOST_EN 控制 USB_H_5V --> USB HOST PORT 的供電 (大PORT)
nUSB_PULL_UP_EN 控制 USB_C_D+ --> MINI USB 的供電 (小PORT)
(host)# cd rootfs
(host)
# pwd
/home2/fyodor/filesystem/rootfs
(busybox)
# mkdir var/debug
(busybox)
# vi etc/fstab
加一行:none /var/debug debugfs ramfs 0 0
(busybox)# modprobe rt73usb
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 000.
usbcore: registered new interface driver rt73usb
(busybox)# cd /var/debug
(busybox)# ls
drwxr-xr-x 3 0 0 0 Jan 1 00:32 ieee80211
drwxr-xr-x 3 0 0 0 Jan 1 00:00 ohci
drwxr-xr-x 2 0 0 0 Jan 1 00:00 usbmon
if you got error "undefined get_wireless_stats"
just fix rtmp_main.c, replace netdev->get_wireless_stats to netdev->get_stats
cvs -d:pserver:anonymous@rt2400.cvs.sourceforge.net:/cvsroot/rt2400 login
cvs -z3 -d:pserver:anonymous@rt2400.cvs.sourceforge.net:/cvsroot/rt2400 co -P source/rt73
最前面增加五行
ARCH=arm
CROSS_COMPILE=/usr/local/arm/3.4.1/bin/arm-linux-
KERNDIR=/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3
(KERNDIR要指到目標板所使用的KERNEL SOURCE,而且KERNEL必須先設定好交叉編譯)
ROOTFS = /home2/fyodor/filesystem/rootfs
MODDIR = /lib/modules/2.6.24.3/extra
把module install 的目標位置依照目標kernel版本設定
否則就會安裝到目前uname -r 所找到的kernel module位置...
ps. make install時,modules.dep的設定不會跟著MODDIR而改變
所以還是得設定成extra
修改一行
FIRM_DIR := $(ROOTFS)/lib/firmware
(host)# make armdebug
!!! WARNING: Module file much too big (>1MB)
!!! Check your kernel settings or use 'strip'
*** Module rt73.ko built successfully
(host)# arm-linux-strip ./rt73.ko
*** Install module in /lib/modules/2.6.24.3/extra ...
make[1]: Entering directory `/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3'
INSTALL /home2/fyodor/filesystem/tools/wirelessTool/WL-167G/rt73-cvs/rt73-cvs-2008042100/Module/rt73.ko
DEPMOD 2.6.24.3
make[1]: Leaving directory `/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3'
/sbin/depmod -a
*** Update /etc/modprobe.d/ralink alias for wlan*
*** Install firmware in /home2/fyodor/filesystem/rootfs/lib/firmware ...
*** Check old config ...
WARNING: Couldn't find symtab and strtab in module /lib/modules/2.6.20-15-generic/extra/rt73.ko
*** Update /etc/modprobe.d/ralink alias for wlan*
*** Install firmware in /home2/fyodor/filesystem/rootfs/lib/firmware ...
*** Check old config ...
module : /lib/modules/2.6.24.3/extra/rt73.ko
firmware : /lib/firmware/rt73.bin
s3c2410-ohci s3c2410-ohci: urb c2704ec0 path 1 ep0in 5ec20000 cc 5
–> status -62
#define ETIME 62 /* Timer expired */
No response packet received within the prescribed bus turn-around time. This error may instead be reported as -EPROTO or -EILSEQ.
ROOTFS=/home2/fyodor/filesystem/rootfs
echo " install module to $ROOTFS/lib/modules/2.6.24.3/extra/"
cp /lib/modules/2.6.24.3/extra/rt73.ko $ROOTFS/lib/modules/2.6.24.3/extra/rt73.ko
echo " install firmware to $ROOTFS/lib/firmware/"
cp /lib/firmware/rt73.bin $ROOTFS/lib/firmware/
ls -alh $ROOTFS/lib/modules/2.6.24.3/extra/rt73.ko
ls -alh $ROOTFS/lib/firmware/rt73.bin
rt73: USBVendorRequest TIMEOUT
rt73: Retry count exhausted or device removed!!!
rt73: BBP version = 0
s3c2410-ohci s3c2410-ohci: urb c1980840 path 1 ep0in 5ec20000 cc 5 --> status -62
rt73: USBVendorRequest TIMEOUT
s3c2410-ohci s3c2410-ohci: urb c1980840 path 1 ep0out 5ec20000 cc 5 --> status -62
rt73: USBVendorRequest TIMEOUT
s3c2410-ohci s3c2410-ohci: urb c1980840 path 1 ep0in 5ec20000 cc 5 --> status -62
rt73: USBVendorRequest TIMEOUT
s3c2410-ohci s3c2410-ohci: urb c1980840 path 1 ep0in 5ec20000 cc 5 --> status -62
rt73: USBVendorRequest TIMEOUT
s3c2410-ohci s3c2410-ohci: urb c1980840 path 1 ep0in 5ec20000 cc 5 --> status -62
rt73: USBVendorRequest TIMEOUT
rt73: Retry count exhausted or device removed!!!
rt73: BBP version = 0
rt73: USBVendorRequest TIMEOUT是我自己加的訊息
總之status -62 = -ETIME,就是TIMEOUT
上面說過了,status code的詳細定義在$(KERNDIR)/include/asm-generic/errno.h
error的解釋在$(KERNDIR)/Documentation/usb/error-codes.txt
$(RT73)/Module/rtusb_io.c ===> RTUSB_VendorRequest function內的ret 值
ret=usb_control_msg(pAd->pUsb_Dev, usb_sndctrlpipe( pAd->pUsb_Dev, 0 ), \
Request, RequestType, Value,Index, TransferBuffer, TransferBufferLength, \
CONTROL_TIMEOUT_JIFFIES);
來源:drivers/usb/host/ohci-q.c : dl_done_list() --> dl_reverse_done_list() --> ed_halted()
RTUSBReadMACRegister
RTUSBWriteMACRegister
# sumtool -e 0x20000 --no-cleanmarkers --littleendian -i output/rootfs.jffs2 -o output/newrootfs.jffs2
交叉編譯rt73usb driver的時候,需要指定kernel source路徑
# cd RT73_Linux_STA_Drv1.0.4.0/Module
# make ARCH=arm CROSS_COMPILE=arm-linux-
\KERNDIR=/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3/
出現了這個警告
warning: `regparm' attribute directive ignored
網路上查到是說
kernel src directory裡面的 include/asm
他是一個link,應該要指向corss compile目標
(在我這個情況就是asm-arm)
如果沒把asm 指到 asm-arm,就會出現這個warning
http://osdir.com/ml/linux.gps/2006-02/msg00049.html
http://linux.chinaunix.net/bbs/archiver/?tid-916672.html
可是我有正確指過去啊....怎麼還是出現這個warning
建立patch:
updated dir : src/updateoriginal dir : src/orig# diff -ruN src/orig src/update > my.patch
套用patch:
# cd src/# patch -p1 < my.patch
還好我昨天比較早回家
聽說胖子在LAB用3G手機跟他的啾講了一個小時的視訊電話
噁心的話一堆這就算了
還不時的對著鏡頭 "噘嘴啾" "咪咪咪"
幹~~~
雖然一點都不閃,但這真是太噁爛了
於是阿鋒特地去把六樓的禁煙海報幹起來
改成這樣貼在LAB門口...真是太精美啦!
尤其是手機螢幕上的照片
(傳說中的金山陽明山兩日遊相簿之封面!?)
天哪~~~ 怎麼會有這麼好的同學!帶給大家無盡的歡笑
畢業後就沒辦法天天看到胖子,光是想到就覺得好傷心啊!
driver-model/Platform.txt
driver-model/Driver.txt
總計 44
lrwxrwxrwx 1 root root 35 2008-03-29 16:47 build -> /home2/fyodor/kernel/linux-2.6.24.3
drwxr-xr-x 4 root root 96 2008-03-29 16:47 kernel
-rw-r--r-- 1 root root 166 2008-03-29 16:47 modules.alias
-rw-r--r-- 1 root root 69 2008-03-29 16:47 modules.ccwmap
-rw-r--r-- 1 root root 2627 2008-03-29 16:47 modules.dep
-rw-r--r-- 1 root root 73 2008-03-29 16:47 modules.ieee1394map
-rw-r--r-- 1 root root 141 2008-03-29 16:47 modules.inputmap
-rw-r--r-- 1 root root 81 2008-03-29 16:47 modules.isapnpmap
-rw-r--r-- 1 root root 74 2008-03-29 16:47 modules.ofmap
-rw-r--r-- 1 root root 99 2008-03-29 16:47 modules.pcimap
-rw-r--r-- 1 root root 43 2008-03-29 16:47 modules.seriomap
-rw-r--r-- 1 root root 2660 2008-03-29 16:47 modules.symbols
-rw-r--r-- 1 root root 189 2008-03-29 16:47 modules.usbmap
lrwxrwxrwx 1 root root 35 2008-03-29 16:47 source -> /home2/fyodor/kernel/linux-2.6.24.3
Module Size Used by Not tainted
cbc 3904 0
blkcipher 5796 1 cbc
kernel:此版本kernel 編譯出來的模組
modules.dep:模組相依性的資訊
.idcode = 0x32440000,
.idmask = 0xffffffff,
.map_io = s3c244x_map_io,
.init_clocks = s3c244x_init_clocks,
.init_uarts = s3c244x_init_uarts,
.init = s3c2440_init,
.name = name_s3c2440
滿好用的
聽說圖片上傳有問題?
it looks fine..
可以抓到theme配置,顯示在程式介面裡
下方彈出選單可以設定文章分類, 發佈日期, 關鍵字, 回應方式,
ping, 作者, 摘要說明(也就是短網址), 密碼, 引用通告..
2009 All Rights Reserved All About My Life.
Blogger Templates created by Deluxe Templates • Wordpress designed by Acosmin