AnsweredAssumed Answered

evk imx28 how to mount a usb flash memory

Question asked by gennaro on Oct 18, 2013
Latest reply on Oct 20, 2013 by lategoodbye

Hi all,


Thanks in advice for your help. I'm working with an evk borad. I'm able to compile and mount ltib. The board works, for debugging reasons I built the system to boot from network so kernel from tftp and filesystem from nfs. All works but now for some production reason I need to mount a usb flash memory. I recompiled the kernel with the following options :

  • SCSI support (CONFIG_SCSI scsi_mod.o)
  • SCSI disk support (CONFIG_BLK_DEV_SD sd_mod.o)
  • DOS FAT fs support (CONFIG_FAT_FS fat.o)
  • MSDOS fs support (CONFIG_MSDOS_FS msdos.o)
  • VFAT (Windows 95) fs support (CONFIG_VFAT_FS vfat.o)
  • /proc filesystem (CONFIG_PROC_FS)
  • Second extended fs support (ext2fs) (CONFIG_EXT2_FS ext2.o)
  • Support for USB (CONFIG_USB usbcore.o)
  • Preliminary USB device filesystem (CONFIG_USB_DEVICEFS)
  • USB Mass Storage support (CONFIG_USB_STORAGE usb-storage.o)


wakeup the system and the log is :


vddio = 3380000, val=10

regulator: vddio: 2880 <--> 3680 mV at 3380 mV fast normal

regulator: overall_current: fast normal

regulator: vbus5v:

regulator: mxs-duart-1: fast normal

regulator: mxs-bl-1: fast normal

regulator: mxs-i2c-1: fast normal

regulator: mmc_ssp-1: fast normal

regulator: mmc_ssp-2: fast normal

regulator: charger-1: fast normal

regulator: power-test-1: fast normal

regulator: cpufreq-1: fast normal

i.MX IRAM pool: 124 KB@0xc8820000

Initializing GPMI pins

usb DR wakeup device is registered

IMX usb wakeup probe

the wakeup pdata is 0xc04fcc1c

audit: cannot initialize inotify handle

bio: create slab <bio-0> at 0

SCSI subsystem initialized

Freescale USB OTG Driver loaded, $Revision: 1.55 $

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

Advanced Linux Sound Architecture Driver Version 1.0.23.

Switching to clocksource mxs clock source

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

Bus freq driver module loaded

IMX usb wakeup probe

the wakeup pdata is 0xc04fd0cc

usb h1 wakeup device is registered

mxs_cpu_init: cpufreq init finished

audit: initializing netlink socket (disabled)

type=2000 audit(0.610:1): initialized

VFS: Disk quotas dquot_6.5.2

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

msgmni has been set to 242

alg: No test for stdrng (krng)

cryptodev: driver loaded.

Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Console: switching to colour frame buffer device 100x30

mxs-duart.0: ttyAM0 at MMIO 0x80074000 (irq = 47) is a DebugUART

mxs-auart.0: ttySP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0

Found APPUART 3.1.0

mxs-auart.1: ttySP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1

Found APPUART 3.1.0

mxs-auart.2: ttySP2 at MMIO 0x8006e000 (irq = 114) is a mxs-auart.2

Found APPUART 3.1.0

mxs-auart.3: ttySP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3

Found APPUART 3.1.0

brd: module loaded

loop: module loaded


NFC: Version 1, 8-chip GPMI and BCH

Boot ROM: Version 1, Single-chip boot area, block mark swapping supported

Scanning for NAND Flash chips...

NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)


NAND Flash Device Information


Manufacturer      : Samsung (0xec)

Device Code       : 0xdc

Cell Technology   : SLC

Chip Size         : 512 MiB

Pages per Block   : 64

Page Geometry     : 2048+64

ECC Strength      : 4 bits

ECC Size          : 512 B

Data Setup Time   : 15 ns

Data Hold Time    : 12 ns

Address Setup Time: 25 ns

GPMI Sample Delay : 6 ns

tREA              : Unknown

tRLOH             : Unknown

tRHOH             : Unknown

Description       : K9F4G08


Physical Geometry


Chip Count             : 1

Page Data Size in Bytes: 2048 (0x800)

Page OOB Size in Bytes : 64

Block Size in Bytes    : 131072 (0x20000)

Block Size in Pages    : 64 (0x40)

Chip Size in Bytes     : 536870912 (0x20000000)

Chip Size in Pages     : 262144 (0x40000)

Chip Size in Blocks    : 4096 (0x1000)

Medium Size in Bytes   : 536870912 (0x20000000)


NFC Geometry


ECC Algorithm          : BCH

ECC Strength           : 8

Page Size in Bytes     : 2112

Metadata Size in Bytes : 10

ECC Chunk Size in Bytes: 512

ECC Chunk Count        : 4

Payload Size in Bytes  : 2048

Auxiliary Size in Bytes: 16

Auxiliary Status Offset: 12

Block Mark Byte Offset : 1999

Block Mark Bit Offset  : 0


Boot ROM Geometry


Boot Area Count            : 1

Boot Area Size in Bytes    : 20971520 (0x1400000)

Stride Size in Pages       : 64

Search Area Stride Exponent: 2

Scanning device for bad blocks

Bad eraseblock 1445 at 0x00000b4a0000

Bad eraseblock 2476 at 0x000013580000

Bad eraseblock 3037 at 0x000017ba0000

Boot area protection is enabled.

Creating 2 MTD partitions on "gpmi-nfc-main":

0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"

0x000001400000-0x000020000000 : "gpmi-nfc-general-use"

mxs-spi mxs-spi.0: Max possible speed 24000 = 24000000/2 kHz

mxs-spi mxs-spi.0: at 0x80014000 mapped to 0xF0014000, irq=84, bus 1, DMA ver_major 4

FEC Ethernet Driver

fec_enet_mii_bus: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci: irq 93, io base 0x80080000

fsl-ehci fsl-ehci: USB 2.0 started, EHCI 1.00

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.0: irq 92, io base 0x80090000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

ARC USBOTG Device Controller driver (1 August 2005)

mice: PS/2 mouse device common for all mice

input: mxs-kbd as /devices/platform/mxs-kbd.0/input/input0

input: MXS touchscreen as /devices/virtual/input/input1

MXS RTC driver v1.0 hardware v2.3.0

mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0

IR NEC protocol handler initialized

IR RC5(x) protocol handler initialized

IR RC6 protocol handler initialized

IR JVC protocol handler initialized

IR Sony protocol handler initialized

Linux video capture interface: v2.00

mxs-pxp mxs-pxp.0: initialized

mxs watchdog: initialized, heartbeat 19 sec

mxs-mmc: MXS SSP Controller MMC Interface driver

mxs-mmc mxs-mmc.0: mmc0: MXS SSP MMC DMAIRQ 82 ERRIRQ 96

Registered led device: led-pwm0

Registered led device: led-pwm1

dcp dcp.0: DCP crypto enabled.!

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

sgtl5000-i2c 0-000a: SGTL5000 revision 17

mxs-spdif mxs-spdif.0: MXS SPDIF Audio Transmitter

No device for codec mxs spdif

No device for DAI mxs spdif

No device for DAI mxs-saif

No device for DAI mxs-spdif

asoc: SGTL5000 <-> mxs-saif mapping ok

mmc0: new high speed SDHC card at address e624

mmcblk0: mmc0:e624 SU04G 3.69 GiB

mmcblk0: p1 p2 p3

Failed to add route LINE_OUT->Ext Spk

asoc: mxs spdif <-> mxs-spdif mapping ok

ALSA device list:

  #0: mxs-evk (SGTL5000)

  #1: mxs-evk (mxs spdif)

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:18 UTC (18)

USB Host suspend begins

will suspend roothub and its children

ehci_fsl_bus_suspend, DR

host suspend ends

eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1)

eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)

Sending DHCP requests .

ehci_fsl_bus_suspend, Host 1

PHY: 0:00 - Link is Up - 100/Full

., OK

IP-Config: Got DHCP answer from, my address is

IP-Config: Complete:

     device=eth0, addr=, mask=, gw=,

     host=, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

Looking up port of RPC 100003/2 on

Looking up port of RPC 100005/1 on

VFS: Mounted root (nfs filesystem) on device 0:15.

Freeing init memory: 160K

UDP: bad checksum. From to ulen 4204

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

nfs: server not responding, still trying

nfs: server OK

usbcore: deregistering interface driver usb-storage

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.


here is the output of mount at startup:


/dev/root on / type nfs (rw,relatime,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,port=65535,timeo=11,retrans=3,sec=sys,mountport=65535,mountproto=,addr=

proc on /proc type proc (rw,relatime)

sys on /sys type sysfs (rw,relatime)

tmpfs on /dev type tmpfs (rw,relatime,mode=755)

devpts on /dev/pts type devpts (rw,relatime,mode=600)

shm on /dev/shm type tmpfs (rw,relatime)

rwfs on /mnt/rwfs type tmpfs (rw,relatime,size=512k)

usbfs on /proc/bus/usb type usbfs (rw,relatime)


It seems that usbfs is working but there are two problem I can't find in /dev anythings like sda* and I expected to find usb-storage-0 under /proc/scsi/ but nothing.


I try also :

modprobe -r usb-storage

mknod /dev/sda b 8 0

modprobe usbstorage


but /dev/sda seems not to be a valid device.


Do you have some tips?


PS: I tested with different pen drive


Kind Regards