NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

UsbConfigDevFSG

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
FileStorage gadget Kernel Config
Linux PSP



About this page[edit]

This page describes the Linux kernel config options for usb FileStorage gadget on different kernel versions. Please refer the config option which matches with kernel version of release you are using.

Configuration[edit]

Linux v3.2[edit]

Start the Linux Kernel Configuration tool:

$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm menuconfig

Select Device Drivers from the main menu.

    ...
    ...
    Power management options --->
    [ ] Networking support --->
    Device Drivers --->
    File systems --->
    Kernel hacking --->
    ...
    ...

Select USB support as shown here

    ...
    ...
    <*> Sound card support  --->
    [*] HID Devices  --->
    [*] USB support  --->
    <*> MMC/SD/SDIO card support  --->
    ... 
    ...

Go to USB Gadget Support as shown here

    ...
    ...
    < >   USB YUREX driver support
    <*>   USB Gadget Support  --->
          *** OTG and related infrastructure ***
    < >   GPIO based peripheral-only VBUS sensing 'transceiver'
    ...
    ...

Select Inventra HDRC USB Peripheral as shown here

    ...
    ...
    (2)   Maximum VBUS Power usage (2-500 mA)
    (2)   Number of storage pipeline buffers
    <*>   USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ADI, ...))  --->
    < >   USB Gadget Drivers 
    ...
    ...

Select File-backed Storage Gadget as shown here

    ...
    ...
    <*>   USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ADI, ...))  --->
    < >   USB Gadget Drivers 
    ...
    <M>     File-backed Storage Gadget (DEPRECATED)
    [ ]       File-backed Storage Gadget testing version
    ...
    ...

This is all required for adding USB FileStorage gadget support in kernel.

Testing[edit]

Let us assume that we are interested in exposing /dev/mmcblk0 block device to the file storage gadget device to host (windows/linux). To that effect we need to issue the following command to load the file storage gadget driver. The module parameter buflen can be used to set buffersize of the gadget driver for better performance, please refer to /driver/usb/gadget/file_storage.c for more information on module parameters.

 example
 #insmod <g_file_storage.ko> file=/dev/sda1 buflen=65536 stall=0 removable=1
 #insmod <g_file_storage.ko> file=/dev/mmcblk0 stall=0 removable=1


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article UsbConfigDevFSG here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article UsbConfigDevFSG here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article UsbConfigDevFSG here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article UsbConfigDevFSG here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article UsbConfigDevFSG here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article UsbConfigDevFSG here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article UsbConfigDevFSG here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article UsbConfigDevFSG here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article UsbConfigDevFSG here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity