This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

怎样挂载spi flash分区到文件系统中的目录下

这是我的spi flash信息

m25p80 spi1.0: s25fl512s (65536 Kbytes)
Creating 1 MTD partitions on "spi_flash":
0x000000000000-0x000004000000 : "File System2"
PM: Adding info for No Bus:mtd7
PM: Adding info for No Bus:mtd7ro
PM: Adding info for No Bus:31:7
PM: Adding info for No Bus:mtdblock7

现在要把这个分区挂载到目录下使用,怎么挂载呢?

  • 这是我挂载的方法,都不行

    第一种方法,这种方法可以用来挂载nand flash的分区

    # /usr/bin/smart_mount UBIFS /dev/mtd7 /tmp/nand


    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
    ubiattach: error!: cannot attach mtd7
    error 22 (Invalid argument)
    libubi: error!: cannot get information about "/dev/ubi3"
    error 2 (No such file or directory)
    ubimkvol: error!: error while probing "/dev/ubi3"
    error 2 (No such file or directory)
    mount: mounting ubi3:ubifs_volume on /tmp/nand failed: No such device
    ubidetach: error!: cannot remove ubi3
    error 22 (Invalid argument)
    ubiformat: error!: sub-page cannot be larger than min. I/O unit
    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
    ubiattach: error!: cannot attach mtd7
    error 22 (Invalid argument)
    libubi: error!: cannot get information about "/dev/ubi3"
    error 2 (No such file or directory)
    ubimkvol: error!: error while probing "/dev/ubi3"
    error 2 (No such file or directory)
    mount: mounting ubi3:ubifs_volume on /tmp/nand failed: No such device
    ubidetach: error!: cannot remove ubi3
    error 22 (Invalid argument)
    ubiformat: error!: sub-page cannot be larger than min. I/O unit
    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
    ubiattach: error!: cannot attach mtd7
    error 22 (Invalid argument)
    libubi: error!: cannot get information about "/dev/ubi3"
    error 2 (No such file or directory)
    ubimkvol: error!: error while probing "/dev/ubi3"
    error 2 (No such file or directory)
    mount: mounting ubi3:ubifs_volume on /tmp/nand failed: No such device
    ubidetach: error!: cannot remove ubi3
    error 22 (Invalid argument)
    ubiformat: error!: sub-page cannot be larger than min. I/O unit
    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
    ubiattach: error!: cannot attach mtd7
    error 22 (Invalid argument)
    libubi: error!: cannot get information about "/dev/ubi3"
    error 2 (No such file or directory)
    ubimkvol: error!: error while probing "/dev/ubi3"
    error 2 (No such file or directory)
    mount: mounting ubi3:ubifs_volume on /tmp/nand failed: No such device

    第二种方法

    # mount -t jffs2 /dev/mtd7 /tmp/nand/


    mount: mounting /dev/mtd7 on /tmp/nand/ failed: Block device required

  • spi flash不能挂载到ubifs文件系统中吗

  • 你好,

    请参考下面的链接信息:

    http://processors.wiki.ti.com/index.php/AM335x_McSPI_Driver's_Guide#Mounting_SPI_partition_using_JFFS2

    flash_eraseall /dev/mtd4

    mount -t jffs2 /dev/mtdblock4 /media/card

  • 看了,怎么挂载不上去啊 mount的时候就一直卡在那里了,然后就没有反应了

  • 有确定您的SPI Flash的设备名么?感觉设备名称不对啊

  • 这个应该是是对的吧 ,名称自己取得s25fl512s,然后加载上的时候打印出来的也是。现在有几个疑问

    第一:omap2-mcspi.c这个文件有问题吧。我现在用的是ipnc-rdk 3.5的,然后我把以前别人用过的ipnc-rdk 3.0版本下的omap2-mcspi拿过来覆盖掉自己的,然后神奇般的就可以挂载了。虽然挂载之后也有问题

    第二:现在用的ipnc-rdk 3.0 下的omap2-mcspi.c  可以正常挂载,但是往里面复制东西的时候非常之慢,而且有的时候会出现input/output error 什么原因造成的。

    第三:现在比较想知道的是3.5和3.0的主机驱动有什么差别,我比较两个版本的代码没,看出来个所以然。求教。

  • spi flash不能挂载为ubifs格式的吗?因为我的文件系统是ubifs格式的,我害怕挂载成jffs2的有问题。现在还有问题,我不知道是什么原因。

    先flash_eraseall   flash,然后挂载、然后往里面copy东西、然后卸载、重新启动系统、加载omap和m25p80模块、然后不flash_eraseall的时候,就挂载不上去。一直打印 JFFS2 error: (346) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 113 at physical location,何解?

  • 请问有spiflash的代码么,是否可以分享我一份 livelwh@outlook.com,谢谢!