下载了ti的sdk8。0(32bit)安装后自带了一个3.14的内核,编译后把zimage放到boot后 启动, 发现beaglebone上插任何usb设备都没有反应,是否内核中有哪里配置? 我需要usb口能识别u盘、usb转串口的功能, 不知道如何配置。。。
beaglebone上电发现usb口没有电源输出
Steven Liu1:
今天刚好在研究USB转串的功能,如下,你可以试试。虽然版本不一样,但是可以参考试着做一下。
Below is how to make a serial UART console over USB on AM335x EVM (using USB Gadget from Stephen M). You might want to call it /dev/ttyUSBx on the AM335x EVM, but it is really ttyGS0 (also called usb_dev_serial in Stellarisware/Starterware).
A Linux Ubuntu box will connect to it as /dev/ttyACM0. And in WinXP you need the below .inf file to get COMx. Screenshot attached (for COM64 on WinXP)
We did this on the AM335x EVM using USB Gadget. Instructions below:
As discussed below are the instructions we discussed for getting ttyusb (actually ttyGS0) working on the AM335x EVM. I connected a microUSB cable from AM335x EVM USB0 to my laptop.
1) Launch menuconfig. Navigate to: Device Drivers -> USB Support -> USB Gadget Support. For USB Peripheral Controller, select “Inventra HDRC USB Peripheral (TI, ADI, …) “ (should be by default). Under USB Gadget Drivers, enable the module for “Serial Gadget (with CDC ACM and CDC OBEX support)”
2) Build the module(s). The serial gadget module “g_serial.ko” will be placed in the kernel source tree under /drivers/usb/gadget.
$ sudo make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm modules
3) Install the module to the rootfs (if using NFS):
$ make CROSS_COMPILE= arm-arago-linux-gnueabi- ARCH=arm INSTALL_MOD_PATH=<rootfs> modules_install
If mounting fs from SD/MMC, copy the module to /lib/modules/<kernel_version>/kernel/drivers/usb/gadget on target fs
4) When target Linux is booted, load the driver module
target # insmod /lib/modules/3.1.0/kernel/drivers/usb/gadget/g_serial.ko
You should see the console respond similarly:
[ 50.986468] gadget: Gadget Serial v2.4
[ 50.990488] gadget: g_serial ready
[ 50.994227] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 50.999819] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
[ 51.007684] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 51.014780] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 51.022320] usb usb2: Product: MUSB HDRC host driver
[ 51.027490] usb usb2: Manufacturer: Linux 3.1.0 musb-hcd
[ 51.033035] usb usb2: SerialNumber: musb-hdrc.0
[ 51.038236] hub 2-0:1.0: USB hub found
[ 51.042160] hub 2-0:1.0: 1 port detected
5) This will make the device recognizable by the host OS. On Windows, a .inf file will be needed to have the device recognized as a COM port. It’s in the kernel source tree under /Documentation and called “linux-cdc-acm.inf”.
6) Once the driver is installed, open the terminal application and choose the COM port called “Gadget Serial”. The other parameters are actually irrelevant, because the driver translates everything between the device and the terminal.
7) On the target, run
target # getty 115200 /dev/ttyGS0
This should bring up a login in the Gadget Serial COM port.
linus luo:
回复 Steven Liu1:
你好, 感谢你的回复。
我的USB转串口是一个STM32设备,在beaglebone上识别为ACM设备。 USB转串口设备本身没有问题,但是在多次插拔这个USB转串口设备时会出现一些问题,正常情况下netlink程序能够每次收到USB插拔的消息并且识别到tty/ACM0设备,但插拔多次或其他特殊情况下netlink(也就是udev)收不到插拔USB的消息,怀疑是USB驱动本身不稳定造成?