Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616Ab0LOISg (ORCPT ); Wed, 15 Dec 2010 03:18:36 -0500 Received: from mail-fx0-f43.google.com ([209.85.161.43]:42413 "EHLO mail-fx0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754143Ab0LOISf (ORCPT ); Wed, 15 Dec 2010 03:18:35 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=i+gzQmN1NatM+lLv0CDPTwKrG2vJN/BquM/mF3MA6JvVH86XK9GkIVwBECQGga/2KB ZghYh0eNpWE+Hyoda8Wv8bMUdCQfLzvZUH3W+SgT1slSzRMDpXA6+uXcO5+e5wZG37CM MCm0ij+H4Tvw0spfaTd49mnY67vJt701osHGU= MIME-Version: 1.0 In-Reply-To: <20101215011904.GA24292@falooley.org> References: <22c797d00709272118i33d32b9dy93d5f5ec8f8edd30@mail.gmail.com> <20101214195124.GA6010@falooley.org> <1292356893.29257.1.camel@koala> <201012141849.03926.rob@landley.net> <20101215011904.GA24292@falooley.org> Date: Wed, 15 Dec 2010 09:18:33 +0100 X-Google-Sender-Auth: nD_uiXq7b8o9H_Frnu-T8SffS_g Message-ID: Subject: Re: [PATCH] mtd: allow mtd and jffs2 when ARCH=um From: Geert Uytterhoeven To: Jason Lunz Cc: Rob Landley , dedekind1@gmail.com, richard -rw- weinberger , Sam Ravnborg , David Woodhouse , atom ota , user-mode-linux-devel@lists.sourceforge.net, Jeff Dike , lkml , linux-mtd@lists.infradead.org Content-Type: multipart/mixed; boundary=20cf3054a4b1486d4704976e9515 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6204 Lines: 109 --20cf3054a4b1486d4704976e9515 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Dec 15, 2010 at 02:19, Jason Lunz wrote: > On Tue, Dec 14, 2010 at 06:49:02PM -0600, Rob Landley wrote: >> The problem is that jffs2 is a filesystem, and thus something people wou= ld >> really like to be able to loopback mount, but it's hardwired to assume i= t's >> only ever stored on a certain type of hardware, and thus requies incestu= ous >> knowledge of the erase granularity of the flash layer in order to functi= on. > > I assume you can turn your jffs2 image file into a block dev using > losetup, then turn the corresponding loop device into an mtd device > using block2mtd, at which point you ought to be able to mount it with > jffs2. I've never tried it. And block2mtd is part of mtd, so you have to get mtd compiled first. BTW, the patch I used in the past was less intrusive than yours. I attached it, as I can't send it inline from here. Note that it was against 2.6.31-rc4. Gr{oetje,eeting}s, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0=C2=A0 -- Linus Torvalds --20cf3054a4b1486d4704976e9515 Content-Type: text/x-patch; charset=US-ASCII; name="uml-mtd.diff" Content-Disposition: attachment; filename="uml-mtd.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ghpy4g330 Y29tbWl0IDU3ZmNlMGYxN2Y0OTc1ODMyNjZhMjYzMjg2OTBmNDBmMzNhZjA4YzUKQXV0aG9yOiBH ZWVydCBVeXR0ZXJob2V2ZW4gPEdlZXJ0LlV5dHRlcmhvZXZlbkBzb255Y29tLmNvbT4KRGF0ZTog ICBNb24gRGVjIDE1IDE1OjIxOjE1IDIwMDggKzAxMDAKCiAgICBVTUw6IEVuYWJsZSBNVEQsIGJ5 IG1vdmluZyB0aGUgZGVwZW5kZ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MgYSByZS1pbXBs ZW1lbnRhdGlvbiBvZiB0aGUgc2xyYW0gZHJpdmVyIGFib3ZlLgogCkBAIC0xNzksNiArMTgxLDcg QEAgY29uZmlnIE1URF9CTE9DSzJNVEQKIAkgIFRlc3RpbmcgTVREIHVzZXJzIChlZyBKRkZTMikg b24gbGFyZ2UgbWVkaWEgYW5kIG1lZGlhIHRoYXQgbWlnaHQKIAkgIGJlIHJlbW92ZWQgZHVyaW5n IGEgd3JpdGUgKHVzaW5nIHRoZSBmbG9wcHkgZHJpdmUpLgogCitpZiBIQVNfSU9NRU0KIGNvbW1l bnQgIkRpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycyIKIAogY29uZmlnIE1URF9ET0MyMDAwCkBA IC0yOTcsNSArMzAwLDYgQEAgY29uZmlnIE1URF9ET0NQUk9CRV81NUFBCiAJICBMaW51eEJJT1Mg b3IgaWYgeW91IG5lZWQgdG8gcmVjb3ZlciBhIERpc2tPbkNoaXAgTWlsbGVubml1bSBvbiB3aGlj aAogCSAgeW91IGhhdmUgbWFuYWdlZCB0byB3aXBlIHRoZSBmaXJzdCBibG9jay4KIAorZW5kaWYK IGVuZG1lbnUKIAo= --20cf3054a4b1486d4704976e9515-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/