cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
9,647 Views
Registered: ‎08-14-2015

MTD mounting problem

Jump to solution

Hi,

I have a strange problem with mounting a mtd device on zynq zed-board. I have 6 qspi-flash partitions in the device tree:

 

&qspi {
    status = "okay";
    is-dual = <0>;
    num-cs = <1>;
    flash@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@qspi-fsbl-uboot {
            label = "qspi-fsbl-uboot";
            reg = <0x0 0x100000>;
        };
        partition@qspi-linux {
            label = "qspi-linux";
            reg = <0x100000 0x500000>;
        };
        partition@qspi-device-tree {
            label = "qspi-device-tree";
            reg = <0x600000 0x20000>;
        };
        partition@qspi-rootfs {
            label = "qspi-rootfs";
            reg = <0x620000 0x5E0000>;
        };
        partition@qspi-bitstream {
            label = "qspi-bitstream";
            reg = <0xC00000 0x400000>;
        };
        partition@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 on?

Thanks for your help,

Markus

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
16,803 Views
Registered: ‎08-14-2015

Hi,

I have solved the issue. The minor number of the mtd is different to the minor number of the mtdblock device in my case.

So with

mknod /dev/mtd5 c 31 10

mknod /dev/mtdblock5 b 90 5

I can mount the device.

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
16,804 Views
Registered: ‎08-14-2015

Hi,

I have solved the issue. The minor number of the mtd is different to the minor number of the mtdblock device in my case.

So with

mknod /dev/mtd5 c 31 10

mknod /dev/mtdblock5 b 90 5

I can mount the device.

View solution in original post

0 Kudos