MTD mounting problem

Krug, Markus Markus.Krug at bruker.com
Mon Nov 2 04:21:53 PST 2015


Hi,
I have a strange problem with mounting a mtd device (JFFS2) on zynq zed-board. I have 6 qspi-flash partitions in the device tree:
 
&qspi {
    status = "okay";
    is-dual = <0>;
    num-cs = <1>;
    flash at 0 {
        compatible = "n25q128a11";
        reg = <0x0>;
        spi-tx-bus-width = <1>;
        spi-rx-bus-width = <4>;
        spi-max-frequency = <50000000>;
        #address-cells = <1>;
        #size-cells = <1>;
        partition at qspi-fsbl-uboot {
            label = "qspi-fsbl-uboot";
            reg = <0x0 0x100000>;
        };
        partition at qspi-linux {
            label = "qspi-linux";
            reg = <0x100000 0x500000>;
        };
        partition at qspi-device-tree {
            label = "qspi-device-tree";
            reg = <0x600000 0x20000>;
        };
        partition at qspi-rootfs {
            label = "qspi-rootfs";
            reg = <0x620000 0x5E0000>;
        };
        partition at qspi-bitstream {
            label = "qspi-bitstream";
            reg = <0xC00000 0x400000>;
        };
        partition at qspi-data {
            label = "qspi-data";
            reg = <0x1000000 0x1000000>;
        };
    };
};
 
and /proc/mtd shows:
dev:    size   erasesize  name
mtd0: 00100000 00010000 "qspi-fsbl-uboot"
mtd1: 00500000 00010000 "qspi-linux"
mtd2: 00020000 00010000 "qspi-device-tree"
mtd3: 005e0000 00010000 "qspi-rootfs"
mtd4: 00400000 00010000 "qspi-bitstream"
mtd5: 01000000 00010000 "qspi-data"
So everything seems to be fine.
But in /dev there are only mtd0, mtd1, mtdblock0 and mtdblock1.
So I added with mknod the missing partitions.
Then I run:
flash_eraseall /dev/mtd5 (no problem)
mount -t jffs2 /dev/mtdblock5 /mnt
the mounting failed:
mount: mounting /dev/mtdblock5 on /mnt failed: No such device
 
Does someone know whats going wrong?
Thanks for your help,
mk




More information about the linux-mtd mailing list