0

I'm using a Atmel SAMA5D3, I have created two phram devices /dev/mtd0 and /dev/mtd1 I am trying to attach them to a gadget mass storage module.

    insmod g_acm_ms.ko file=/dev/mtd0,/dev/mtd1

The error I get is

   g_acm_ms 500000.gadget: failed to start g_acm_ms: -22
   insmod: can't insert 'g_acm_ms.ko': Invalid argument

and from dmesg|tail

   atmel_usba_udc 500000.gadget: MMIO registers at 0xf8030000 mapped at c48d0000
   atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at c4e00000
   lun0: invalid file type: /dev/mtd0
   g_acm_ms 500000.gadget: failed to start g_acm_ms: -22
   lun0: invalid file type: /dev/mtd0
   g_acm_ms 500000.gadget: failed to start g_acm_ms: -22

If I create a backing file

   dd if=/dev/zero of=backing.file bs=1M count=4
   insmod g_acm_ms.ko file=backing.file

It work fine

How do I attach the mtd devices instead?

0

I figured the problem out, I had forgotten to

     insmod mtd_blkdevs.ko
     insmod mtdblock.ko

then use the resulting /dev/mtdblock0 as the backing file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.