linux系统识别usb驱动,linux下USB驱动移植

3、加入了MSDOS fs和VFAT fs的支持。

│ │ File systems --->

│ │ DOS/FAT/NT Filesystems --->

│ ┌─────────────────────────────────────────────────────────────────────┐ │

│ │ *> MSDOS fs support │ │

│ │ *> VFAT (Windows-95) fs support │ │

│ │ (936) Default codepage for FAT │ │

│ │ (cp936) Default iocharset for FAT │ │

│ │ > NTFS file system support本文引用地址:http://www.eepw.com.cn/article/150748.htm

做完这些后,插入u盘后,内核应该可以识别到u盘,出现:

usb 1-1: new full speed USB device using s3c2410-ohci and address 3

ub(1.3): GetMaxLUN returned 0, using 1 LUNs

但是,还有下面一句出错提示:

/dev/ub/a: unknown partition table

再次查看了贴子上大虾们的讨论,提到:“使能CONFIG_MSDOS_PARTITION选项”,再仔细查找,发现配置选项如下:

│ │ File systems --->

│ │ Partition Types --->

│ │ [*] PC BIOS (MSDOS partition tables) support

加上这个后应该就可以挂载usb上的MSDOS分区了

以下是我的内核插入u盘后的提示信息:

usb 1-1: new full speed USB device using s3c2410-ohci and 2

ub(1.2): GetMaxLUN returned 0, using 1 LUNs

/dev/ub/a: p1

表示usb设备已经挂载到/dev/ub/a/part1目录下

4. 加入中文字体库(可惜在我的板上还是没能正常显示中文~_~,知道的朋友麻烦告诉我一声,大家一起探讨)

│ │ Native Language Support --->

│ │*> Simplified Chinese charset (CP936, GB2312)

│ │*> NLS UTF8

以下是挂载usb设备后的显示:

[root@luofuchong /]# mount -t vfat -o iocharset=cp936 /dev/ub/a/part1 /mnt

[root@luofuchong /]# ls /mnt

cramfs-1.1.tar.gz netkit-base-0.17.tar.gz thttpd-2.25b.tar.gz

lfc settings.dat . . I. .. . .txt

三、一点心得如果想知道内核有没有识别出u盘的话可以执行命令:cat /proc/partitions ,看看插入USB前后分区信息有什么不同就知道了。

另外,如果想让内核把它当成SCSI设备来处理的话,只要把上面:

│ │ Device Drivers --->

│ │ Block devices --->

│ │ *> Low Performance USB Block driver

的 Low Performance USB Block driver这个选项去掉,然后把:

│ │ Device Drivers --->

│ │ SCSI device support --->

│ │ *>SCSI disk support

的SCSI disk support这个选项选上,重新编译内核就行。

注:

个人觉得使用usb设备的话Low Performance USB Block driver比SCSI disk要好,自己看着办吧^_^

最后,一般都会新建一个/dev/sda1的链接指向usb设备的挂载点的,可以在启动文件中使用命令ln -s xxx xxx来建立这个链接。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值