UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor markus.krug
Visitor
8,283 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 markus.krug
Visitor
15,439 Views
Registered: ‎08-14-2015

Re: MTD mounting problem

Jump to solution

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.

0 Kudos
1 Reply
Highlighted
Visitor markus.krug
Visitor
15,440 Views
Registered: ‎08-14-2015

Re: MTD mounting problem

Jump to solution

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.

0 Kudos