AnsweredAssumed Answered

BF609 as USB Storage Device (uClinux) - cannot mount it in Ubuntu

Question asked by AnnaMaria1990 on Nov 7, 2013
Latest reply on Nov 15, 2013 by Aaronwu

Hello all..

 

I want to use BF609 as a USB storage device (slave to Ubuntu linux host).

What kernel configuration variables should I add?

What is the resulting filesystem on the device?

(below, I describe what I did and what problems I faced)


Thanks

 

 

 

Problem Details:

I enable the line 'CONFIG_USB_MASS_STORAGE=y' in /output/build/linux-custom/.config on top of the bf609 default configuration, and I make.

After booting the kernel, I connect the ezkit to my host PC with a usb cable (ezkit: mini-B male.  PC: standard-A male). I notice the following print in uClinux:

          root:/> gadget: high-speed config #1: Linux File-Backed Storage


On my host PC, I run ls /dev/ and I notice the new files sdb and sg2

(Note: IF I DO NOT enable the line 'CONFIG_USB_MASS_STORAGE=y' in /output/build/linux-custom/.config, I get the following line instead:

     root:/> gadget: high-speed config #3: source/sink

and the board is completely invisible in the host system)

 

I then run

          host-Ubuntu:~$   dmesg | tail
          [ 5965.406256] usb 1-1.2: new high-speed USB device number 17 using ehci-pci
          [ 5965.499420] usb 1-1.2: New USB device found, idVendor=0525, idProduct=a4a5
          [ 5965.499431] usb 1-1.2: New USB device strings: Mfr=2, Product=3, SerialNumber=0
          [ 5965.499438] usb 1-1.2: Product: Mass Storage Gadget
          [ 5965.499443] usb 1-1.2: Manufacturer: Linux 3.5.7-ADI-2012R2 with musb-hdrc
          [ 5965.510588] usb-storage 1-1.2:1.0: Quirks match for vid 0525 pid a4a5: 10000
          [ 5965.510678] scsi20 : usb-storage 1-1.2:1.0
          [ 5966.509885] scsi 20:0:0:0: Direct-Access     Linux    File-CD Gadget   0316 PQ: 0 ANSI: 2
          [ 5966.511975] sd 20:0:0:0: Attached scsi generic sg2 type 0
          [ 5966.517428] sd 20:0:0:0: [sdb] Attached SCSI removable disk

 

Then, I want to know what file system sdb has:

          host-Ubuntu:~$   sudo file -s /dev/sdb

          /dev/sdb: writable, no read permission

 

Then I try to mount it:

          host-Ubuntu:~$   sudo mount /dev/sdb /mnt/ezkitdevice

          mount: no medium found on /dev/sdb

 

This is the content of the file /proc/scsi/scsi:

          Attached devices:

          Host: scsi0 Channel: 00 Id: 00 Lun: 00

            Vendor: ATA      Model: WDC WD5000BEKT-8 Rev: 01.0

            Type:   Direct-Access                    ANSI  SCSI revision: 05

          Host: scsi3 Channel: 00 Id: 00 Lun: 00

            Vendor: Slimtype Model: BD  E  DS4E1S    Rev: EAB1

            Type:   CD-ROM                           ANSI  SCSI revision: 05

          Host: scsi19 Channel: 00 Id: 00 Lun: 00

            Vendor: Linux    Model: File-CD Gadget   Rev: 0316

            Type:   Direct-Access                    ANSI  SCSI revision: 02

 

This is the tail of the result of the command lshw | less :

          *-scsi
                 physical id: 1
                 bus info: scsi@20
                 logical name: scsi20
                capabilities: scsi-host
                 configuration: driver=usb-storage

 

This is the result of lsusb:

          Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

          Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

          Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

          Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

          Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

          Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

          Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

          Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

          Bus 001 Device 017: ID 0525:a4a5 Netchip Technology, Inc. Linux-USB File Storage Gadget

          Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

          Bus 002 Device 004: ID 04b3:301a IBM Corp.

          Bus 002 Device 005: ID 046d:c05a Logitech, Inc. Optical Mouse M90

          Bus 002 Device 006: ID 04b3:301b IBM Corp. SK-8815 Keyboard

 

 

My suspicion:

I think that the file system on blackfin is somehow locked!! And I guess that there should be some configuration variable(s) that must me set to unlock it (??)

 

Thanks for any hints

Outcomes