[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1292778502.13362.13.camel@koala>
Date: Sun, 19 Dec 2010 19:08:22 +0200
From: Artem Bityutskiy <dedekind1@...il.com>
To: Rob Landley <rob@...dley.net>
Cc: Jason Lunz <lunz@....org>,
Denys Vlasenko <vda.linux@...glemail.com>,
richard -rw- weinberger <richard.weinberger@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Woodhouse <dwmw2@...radead.org>,
atom ota <atomota@...epyhammer.com>,
user-mode-linux-devel@...ts.sourceforge.net,
Jeff Dike <jdike@...toit.com>,
lkml <linux-kernel@...r.kernel.org>,
linux-mtd@...ts.infradead.org
Subject: Re: [PATCH] mtd: allow mtd and jffs2 when ARCH=um
On Fri, 2010-12-17 at 22:08 -0600, Rob Landley wrote:
> On Thursday 16 December 2010 09:18:31 Artem Bityutskiy wrote:
> > On Wed, 2010-12-15 at 00:31 -0600, Rob Landley wrote:
> > > That is awesome and I'm not finding any documentation on it... Ah:
> > >
> > >
> > > http://wiki.maemo.org/Modifying_the_root_image#Block_device_emulating_an_
> > >MTD_device
> > >
> > > Wow that's awkward. Let's see, that says...
> > >
> > > mknod /tmp/mtdblock0 b 31 0
> > > modprobe loop
> > > losetup /dev/loop0 rootfs.jffs2
> > > modprobe mtdblock
> > > modprobe block2mtd
> > > # Note the ,128KiB is needed (on 2.6.26 at least) to set the
> > > # eraseblock size.
> > > echo "/dev/loop0,128KiB" > /sys/module/block2mtd/parameters/block2mtd
> > > modprobe jffs2
> > > mount -t jffs2 /tmp/mtdblock0 /media/jffs2
> >
> > You should not need mtdblock in modern kernels, it is legacy. You should
> > be abole to mount jffs2 on top of mtd0 with
> >
> > mount -t jffs2 mtd0 /media/jffs2
>
> How does one associate the mtd0 with the loopback device? (I thought mtd0 was
> for actual flash memory.)
You do not need loopback devices, just flash your rootfs.jffs2 directly
to /dev/mtd0, e.g., with nandwrite. You can emulate nand with nandsim.
But your method should also work, I just wanted to point that JFFS2 does
not depend on mtdblock in any way.
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists