Introduce nandsim command
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
Signature · 7 lines
1.8.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
[PATCH/RFC] nandsim: add nandsim command
Add nandsim command.
Nandsim allows to simulate a nand device below the mtd layer.
--- commands/Kconfig | 11 + commands/Makefile | 1 + commands/nandsim.c | 2495 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2507 insertions(+) create mode 100644 commands/nandsim.c
commands/Kconfig +11 -0
@@ -475,6 +475,17 @@ endmenu menu "testing " +config CMD_NANDSIM + tristate + depends on NAND + prompt "nandsim" + help + nandsim allows to simulate a nand device which operates in malloc space. + nandsim can register and unregister at runtime and manipulate nand typical + hardware errors. + IMPORTANT you need a high malloc space and high max argument parameter for + this. + config CMD_NANDTEST tristate depends on NAND
commands/Makefile +1 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_CMD_SAVEENV) += saveenv.o obj-$(CONFIG_CMD_LOADENV) += loadenv.o obj-$(CONFIG_CMD_NAND) += nand.o obj-$(CONFIG_CMD_NANDTEST) += nandtest.o +obj-$(CONFIG_CMD_NANDSIM) += nandsim.o obj-$(CONFIG_CMD_TRUE) += true.o obj-$(CONFIG_CMD_FALSE) += false.o obj-$(CONFIG_CMD_VERSION) += version.o
commands/nandsim.c new file +2495 -0
2,495 lines not on this page · raw message
Signature · 7 lines
1.8.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox