BeagleBone Black如何用作大容量存储设备? [英] How can BeagleBone Black be used as Mass Storage Device?

查看:172
本文介绍了BeagleBone Black如何用作大容量存储设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将BB用作大容量存储设备?

Is it possible to use the BB as Mass Storage Device?

我希望将其连接到可以从USB连接读取文件的音频播放器(例如USB闪存驱动器)并用作包含一个特定文件夹的数据存储设备(及其子文件夹) )从文件系统(如果可能,在连接到主板的闪存驱动器上).

I want it to be connected to an audio player that can read files from USB connectivity (such as USB flash drive) and act as data storage device containing one specific folder (and its sub-folders) from the file system (if possible, on a flash drive connected to the board.).

如设备规格所述,它具有以下连通性:

As the device specs says, it has connectivity of:

  • 用于电源和USB的USB客户端通讯
  • USB主机

操作系统可能是Ubuntu,但可以更改.

Operating system will probably be Ubuntu but can be changed.

要实现此目的,需要完成哪些驱动程序或配置?

What drivers or configurations needs to be done in order to achieve this?

推荐答案

最新映像已经激活了大容量存储usb小工具,因此系统在连接时应识别大容量存储外围设备. 谷歌快速搜索显示有关用户试图 >禁用 USB MS小工具:

The latest images have already the mass storage usb gadget active, so a mass storage peripheral should be recognized by your system upon connection. A quick google search reveals this discussion about a user trying to disable the USB MS gadget:

在讨论中,发生魔术的文件是:

From the discussion, the files where the magic happens are:

  • Debian:/opt/scripts/boot/am335x_evm.sh
  • Ubuntu:/opt/scripts/boot/am335*
  • 阿姆斯特朗:/usr/bin/g-ether-load.sh
  • Debian: /opt/scripts/boot/am335x_evm.sh
  • Ubuntu: /opt/scripts/boot/am335*
  • Armstrong: /usr/bin/g-ether-load.sh

在我的Debian图像中,您要修改的行是:

In my Debian image the line you want to modify is:

modprobe g_multi file=${gadget_partition} cdrom=0 stall=0 removable=1 nofua=1 iSerialNumber=${SERIAL_NUMBER} iManufacturer=Circuitco  iProduct=BeagleBone${BLACK} host_addr=${cpsw_1_mac}

以及在此之前设置的相应$gadget_partition变量,以自定义要显示的文件夹.

and the corresponding $gadget_partition variable that is set just before that in order to customize the folder you want to expose.

请注意,标准配置中的g_multi小工具具有3种不同的设备:以太网接口,大容量存储外围设备和串行接口.如果要自定义参数,可以参考

Note that the g_multi gadget in its standard configuration presents 3 different devices: an ethernet interface, a mass storage peripheral and a serial interface. If you want to customize the parameters you can refer to the g_multi documentation

这篇关于BeagleBone Black如何用作大容量存储设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆