All of lore.kernel.org
 help / color / mirror / Atom feed
* MTD mounting problem
@ 2015-11-02 12:21 Krug, Markus
  2015-11-02 13:09 ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Krug, Markus @ 2015-11-02 12:21 UTC (permalink / raw)
  To: linux-mtd

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@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 wrong?
Thanks for your help,
mk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MTD mounting problem
  2015-11-02 12:21 MTD mounting problem Krug, Markus
@ 2015-11-02 13:09 ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2015-11-02 13:09 UTC (permalink / raw)
  To: Krug, Markus; +Cc: linux-mtd

On Mon, Nov 2, 2015 at 1:21 PM, Krug, Markus <Markus.Krug@bruker.com> wrote:
> 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.

This should not happen.
Is your /dev really not managed by udev or devtmpfs?

> 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?

I think the root cause is the missing device node.
Please double check why it is not present.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MTD mounting problem
  2015-11-02 15:56 Krug, Markus
@ 2015-11-02 16:18 ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2015-11-02 16:18 UTC (permalink / raw)
  To: Krug, Markus; +Cc: linux-mtd

Am 02.11.2015 um 16:55 schrieb Krug, Markus:
> Thanks Richard,
> The problem was the minor number of the block device, which differs from the minor number of the char device.
> With
> mknod /dev/mtd5 c 31 10
> mknod /dev/mtdblock5 b 90 5
> I was able to mount the device.

:-)

> However I still don't know, why the devices are not created in /dev at start up. 

Well, how is your /dev mount managed?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MTD mounting problem
@ 2015-11-02 15:56 Krug, Markus
  2015-11-02 16:18 ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Krug, Markus @ 2015-11-02 15:56 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd

Thanks Richard,
The problem was the minor number of the block device, which differs from the minor number of the char device.
With
mknod /dev/mtd5 c 31 10
mknod /dev/mtdblock5 b 90 5
I was able to mount the device. 
However I still don't know, why the devices are not created in /dev at start up. 

Markus

-----Ursprüngliche Nachricht-----
Von: Richard Weinberger [mailto:richard.weinberger@gmail.com] 
Gesendet: Montag, 2. November 2015 14:09
An: Krug, Markus
Cc: linux-mtd@lists.infradead.org
Betreff: Re: MTD mounting problem

On Mon, Nov 2, 2015 at 1:21 PM, Krug, Markus <Markus.Krug@bruker.com> wrote:
> 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.

This should not happen.
Is your /dev really not managed by udev or devtmpfs?

> 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?

I think the root cause is the missing device node.
Please double check why it is not present.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-02 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02 12:21 MTD mounting problem Krug, Markus
2015-11-02 13:09 ` Richard Weinberger
2015-11-02 15:56 Krug, Markus
2015-11-02 16:18 ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.