mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@googlemail.com>
To: barebox@lists.infradead.org
Subject: [PATCH/RFC] Introduce nandsim command
Date: Tue, 30 Oct 2012 22:00:25 +0100	[thread overview]
Message-ID: <1351630826-3133-1-git-send-email-alex.aring@gmail.com> (raw)

Introduce nandsim command for develop/test nand mtd software.
Based on the nandsim kernel module. Don't know the version anymore.

The data which nandsim holds are in malloc space.
The original module can use a file to operate on this.
I removed this implementation, because it used the page-cache and I don't
have a page-cache in barebox.

I used nandsim in the following szenario:
	- barebox sandbox system with -i command to get a /dev/fd# device.
	- in barebox system you can use 'cp /dev/fd# /dev/nandsim#.
	- do some testing things on /dev/nandsim#
	- afterwards writeback with /dev/nandsim# /dev/fd#

This works for example with a envfs image.
Maybe I will add to synchronize with /dev/fd#(or another file) directly on changes.

It needs a high malloc space and a high max argument number for commands.

Please look at help text to see all parameters. I don't test all of these.

I added two parameters to supply a random seed and to manipulate a
bitflip_chance per page.
To manipulate the bitflip_chance is not a nice solution at the moment.

I send this patches, because maybe somebody can use it
to test things with ubiformat.

The nandsim implementation is not done yet!

Alexander Aring (1):
  nandsim: add nandsim command

 commands/Kconfig   |   11 +
 commands/Makefile  |    1 +
 commands/nandsim.c | 2495 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2507 insertions(+)
 create mode 100644 commands/nandsim.c

-- 
1.8.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2012-10-30 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 21:00 Alexander Aring [this message]
2012-10-30 21:00 ` [PATCH/RFC] nandsim: add " Alexander Aring

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=1351630826-3133-1-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@googlemail.com \
    --cc=barebox@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