一、開發環境
Linux | CentOS 6.4 |
ARM | Mirco2440 |
內核 | linux-2.6.32 |
交叉編譯 | arm-linux-gcc 4.4.3 |
文件系統 | rootfs_qtopia_qt4 |
二、內核配置
Cd ~/linux-2.6.32.2Make menuconfig
配置:
Device Drivers=>
USB support=>
[*] Suppon for Host-side USB
[*] USB device filesystem
[*] USB device class-devices
[*] OHCI HCDsupport
[*] USB Mass Storage Support
USB Serial Convelter suppor -->
[*] USB driver for GSM and CDMA modems
SCSI device support=>
[*]SCSI device support
[*] SCSI disk support
[*] Probe all LUNs on each SCSI device
HDI Devices=>
[*] USB Human Interface Devices support
[*] /dev/hiddev raw HID device support
Network device support=>
<*> PPP(point—to—point protoco1)support
[*] PPP multilink support(EXPERIMENTAL)
<*> PPP support for async serial ports
<*> PPP suppo rt for sync tty ports
<*> PPP Deflate compression
<*> PPP BSD —Compress compression
<*> PPP MPPE compress compression(encryp—tion)
<*> PPP over Ethernet
<*> PPP over 12TP
三、修改相關內核驅動文件(此處使用的是華爲EC189上網卡)
#defineHUAWEI_PRODUCT_EC189 0x1446
staticstruct usb_device_id option_ids[]={
……
{USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID,0x1446,0xff,0xff,0xff)},
……};
修改完之後輸入以下命令開始編譯
#make zImage
編譯結束後,會在 arch/arm/boot目錄下生成 linux 內核映象文件:zImage
將其燒錄到開發板中。
這裏我用的是SuperVivi-USB-Transfer-Tool將內核燒錄進去的。
先將Mirco2440設置成從NOR Flash啓動,進入vivi選項界面,選擇下載內核,再SuperVivi中選中zImage,就OK了。
接下來就是準備USB_modeswitch工具的移植了。。。