mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH/RFC] Introduce nandsim command
@ 2012-10-30 21:00 Alexander Aring
  2012-10-30 21:00 ` [PATCH/RFC] nandsim: add " Alexander Aring
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Aring @ 2012-10-30 21:00 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-30 20:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30 21:00 [PATCH/RFC] Introduce nandsim command Alexander Aring
2012-10-30 21:00 ` [PATCH/RFC] nandsim: add " Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox