All of lore.kernel.org
 help / color / mirror / Atom feed
From: bob.koninckx@mech.kuleuven.ac.be (Bob Koninckx)
To: linux-mtd@lists.infradead.org
Subject: [ECOS] Re: jffs2 / eCos
Date: 31 Mar 2003 22:29:29 +0200	[thread overview]
Message-ID: <1049142569.1913.11.camel@pc-002> (raw)
In-Reply-To: <1049095079.16365.768.camel@imladris.demon.co.uk>

Ok, I think I've come closer :)

Apparently, it has to do with the check


} else if (frag->ofs < offset && (offset & (PAGE_CACHE_SIZE-1)) != 0) {
  D1(printk(KERN_NOTICE "Eep. Overlap in ino #%u fraglist. frag->ofs =
          0x%08x, offset = 0x%08x\n",
          f->inocache->ino, frag->ofs, offset));
  D1(jffs2_print_frag_list(f));
  memset(buf, 0, end - offset);
  return -EIO;
} else if (!frag->node) {


in read.c / function jffs2_read_inode_range

The ecos libc buffers only 256 bytes of data, PAGE_CACHE SIZE is defined
to be 4kB. The first access consequently succeeds, the second one fails
...

I suppose all that needs to be done (for eCos) is make the
PAGE_CACHE_SIZE definition agree with the eCos libc BUFSIZ definition. I
am not sure though.

Bob


On Mon, 2003-03-31 at 09:17, David Woodhouse wrote:
> On Sun, 2003-03-30 at 21:49, Bob Koninckx wrote:
> > First I tried mkfs.jffs2 version 1.32. Mounting the filesystem did not
> > even succeed in this case. Apparently some magic number that needed to
> > be 1985 was read as 8519. Some endianness problem I suppose.
> 
> We broke the endianness support in mkfs.jffs2...
> 
> > After upgrading to version 1.35, the filesystem can be mounted.
> 
> ... then we fixed it :)
> 
> >  Files
> > and directories appear to be present (the same fileio1 test still runs
> > sucessfull and lists what should be present). Opening a file on this
> > system seems to succeed (fopen returns a FILE * anyway). However, when I
> > try to _read_ from the file, I get EIO errors.
> 
> Compile with CONFIG_JFFS2_FS_DEBUG set to 1 (in os-ecos.h iirc). Show
> the error messages you get before it gives you EIO.
> 
> > Has anybody successfully used mkfs.jffs2 for making a filesystem image
> > for a powerpc target system running eCos ? Am I doing something obvious
> > wrong ?
> 
> You're doing nothing obviously wrong. The endianness support in
> mkfs.jffs2 was temporarily broken, but that led to the failure to mount
> which you first saw -- it shouldn't be related to the latter problem.
> 
> -- 
> dwmw2
-- 
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering,                   tel.  +32 16 322535
Machine Design and Automation                      fax.  +32 16 322987
Celestijnenlaan 300B                  bob.koninckx at mech.kuleuven.ac.be
B-3001 Leuven Belgium               http://www.mech.kuleuven.ac.be/pma
----------------------------------------------------------------------

  reply	other threads:[~2003-03-31 20:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-30 20:49 jffs2 / eCos Bob Koninckx
2003-03-30 21:22 ` Jörn Engel
2003-03-31  6:26   ` Bob Koninckx
2003-03-31  6:50     ` Jörn Engel
2003-03-31  7:17 ` David Woodhouse
2003-03-31 20:29   ` Bob Koninckx [this message]
2003-03-31 22:47     ` David Woodhouse
2003-04-02  7:48       ` Bob Koninckx
2003-04-02  8:20         ` David Woodhouse
2003-04-02 19:32           ` Bob Koninckx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1049142569.1913.11.camel@pc-002 \
    --to=bob.koninckx@mech.kuleuven.ac.be \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.