public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Russ.Dill@asu.edu (Russ Dill)
To: linux-mtd@lists.infradead.org
Subject: not enough blocks for JFFS?
Date: 24 Mar 2003 15:17:31 -0700	[thread overview]
Message-ID: <1048483100.3593.3.camel@gobbles> (raw)
In-Reply-To: <3E7E6DE5.5000003@interepoch.com.tw>

On Sun, 2003-03-23 at 19:31, Tim Wu wrote:
> Hi! Everybody:
> 
> The system I'm working on use a 4MB NOR flash.
> The block size of the 4MB flash is 64KB.
> It also has eight smaller(8KB) blocks at bottom.
> Since, on this system, I don't have much data to write(less than 10KB),
> a CRAMFS(readonly)+JFFS(writable) combination should be pretty good for me.
> 
> Here comes the problem.  The bootloader has occupied the first three 8KB 
> blocks.  I have only five 8K blocks available for JFFS.  It always fails 
> when I overwrite an existed file on the JFFS partition.

Just make a quick user space implementation. Create a header struct
including revision, header crc, data crc, magic, and length. Write these
onto a block until its full, then erase a second block, write to that
block till thats full, then back to the first, etc... When you look for
data, you:

	a) find the first magic number
	b) check the header crc, if it doesn't match, go to a
	c) check the data crc, if it matches, record this revision as 
		the most recent revision (if it is)
	d) jump forward size + header size bytes

  reply	other threads:[~2003-03-24 22:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  2:31 not enough blocks for JFFS? Tim Wu
2003-03-24 22:17 ` Russ Dill [this message]
2003-03-25  0:05   ` Jörn Engel
2003-03-25  2:13     ` Tim Wu
2003-03-25  2:21       ` Russ Dill
2003-03-25 11:24         ` Tim Wu
2003-03-25 12:33         ` Jörn Engel
2003-03-25 19:06           ` Russ Dill
2003-03-26 13:04             ` Jörn Engel
2003-03-25 12:51     ` David Woodhouse
2003-03-25 13:33       ` Jörn Engel
2003-03-25 14:36         ` David Woodhouse
2003-03-26 13:27           ` Jörn Engel
2003-03-30 19:01           ` Jörn Engel
2003-03-30 19:07             ` Jörn Engel
2003-03-30 19:23             ` David Woodhouse
2003-03-30 20:08               ` Jörn Engel
2003-04-07 13:16                 ` Jörn Engel

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=1048483100.3593.3.camel@gobbles \
    --to=russ.dill@asu.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox