Analytics

2010年2月24日 星期三

安裝libusb開發套件for DMA2443平台 (1)

libusb是一可於user space控制usb裝置的函式庫,網路上已有直接安裝於debian系統的介紹,
在此記錄針對嵌入式平台安裝此一開發套件的過程




這邊有關安裝libusb的資料請看後來重寫的另一篇...= ="


++
將USB裝置插入板子的插槽
會有以下的訊息
[root@(none) /]# usb 1-1: new full speed USB device using s3c2410-ohci and addr2
usb 1-1: configuration #1 chosen from 1 choice

/dev則會增加...
[root@(none) /]# ls dev|grep usb
usbdev1.1                                                                      
usbdev1.1_ep00                                                                 
usbdev1.1_ep81                                                                 
usbdev1.2                                                                      
usbdev1.2_ep00                                                                 
usbdev1.2_ep02                                                                 
usbdev1.2_ep81     
http://blog.chinaunix.net/u3/106318/showart_2110454.html




++
不知道為什麼,改到ubuntu就順利編譯了@@
指令如下:
解壓縮後進入libusb0.1.12(改用這個版本)資料夾
mkdir libusb_install


./configure --host=arm-linux -prefix=/home/deeptree/Desktop/DMA2443linux/2-linux2.6.24/dma2443L-linux-2.6.24/deeptree_test/USB/libusb-0.1.12/libusb_install/


make


make install


即可在所安裝的資料夾(此處為libusb_insatll)內看到
bin/  include/  lib/


./bin:                                                                         
libusb-config                                                                  
                                                                               
./include:                                                                     
usb.h    usbpp.h                                                               
                                                                               
./lib:                                                                         
libusb-0.1.so.4          libusb.so                     libusbpp.la                      
libusb-0.1.so.4.4.4    libusbpp-0.1.so.4        libusbpp.so                      
libusb.a                     libusbpp-0.1.so.4.4.4  pkgconfig                        
libusb.la                    libusbpp.a                                              
                                                                               
./lib/pkgconfig:                                                               
libusb.pc            


+++
將所產生的檔案放入SD卡,準備把所得資料載入開發板
卻發生無法預期的錯誤:
fat xx 檔案系統(SD卡為fat16)不支援link file,所以裡面幾個.so檔的連結完全失效
經人指點後得知link或是檔案權限都是由檔案系統提供的


所以把SD卡重新格式化為ext2
重新掛載到板子上(板子的檔案系統為Cramfs)
mount -t ext2 /dev/mmcblk0p1 /tmp/sd
就順利看到連結檔案了~

沒有留言:

張貼留言