* Mtd_debug patch
@ 2010-05-28 21:26 Stephen Beaver
2010-06-13 8:57 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Beaver @ 2010-05-28 21:26 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1.1: Type: text/plain, Size: 1214 bytes --]
The attached patch to the current version of mtd_debug (grabbed on5/28/2010)
adds two new capabilities:
usage: mtd_debug info <device>
mtd_debug read <device> <offset> <len> <dest-filename>
mtd_debug write <device> <offset> <len> <source-filename>
mtd_debug verify <device> <offset> <cmp-filename>
mtd_debug erase <device> <offset> <len>
mtd_debug blank <device> <offset> <len>
mtd_debug blank ... checks that an area of flash memory if blank (all 0xFFs)
ie it verifies that an erase succeeded.
mtd_debug verify ... checks that the contents of the flash memory match the
specified file. Ie it verifies that a write succeeded.
These functions allow things like:
#!/bin/sh
mtd_debug erase /dev/mtd1 0 0x200000
mtd_debug write /dev/mtd1 0 0x150000 uImage
if ( mtd_debug verifiy /dev/mtd1 0 uImage ) ; then
reboot
else
# Better try again, or we will die
fi
Both have been tested on NOR and NAND flash, and are just simple
modifications to the existing file_from_flash() function.
Steve
--
Stephen Beaver | ANXeBusiness | Engineering |219 232-8371 | www.anx.com |
beavers@anx.com
Think Green...do you really need to print this email? Reduce, reuse,
recycle!
[-- Attachment #1.2: Type: text/html, Size: 2670 bytes --]
[-- Attachment #2: verify-blank.patch --]
[-- Type: video/x-flv, Size: 6670 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mtd_debug patch
2010-05-28 21:26 Mtd_debug patch Stephen Beaver
@ 2010-06-13 8:57 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-06-13 8:57 UTC (permalink / raw)
To: Stephen Beaver; +Cc: linux-mtd
Hi Stephen,
On Fri, 2010-05-28 at 17:26 -0400, Stephen Beaver wrote:
> The attached patch to the current version of mtd_debug (grabbed
> on5/28/2010) adds two new capabilities:
>
> usage: mtd_debug info <device>
> mtd_debug read <device> <offset> <len> <dest-filename>
> mtd_debug write <device> <offset> <len> <source-filename>
> mtd_debug verify <device> <offset> <cmp-filename>
> mtd_debug erase <device> <offset> <len>
> mtd_debug blank <device> <offset> <len>
>
> mtd_debug blank ... checks that an area of flash memory if blank (all
> 0xFFs) ie it verifies that an erase succeeded.
> mtd_debug verify ... checks that the contents of the flash memory
> match the specified file. Ie it verifies that a write succeeded.
>
> These functions allow things like:
>
> #!/bin/sh
>
> mtd_debug erase /dev/mtd1 0 0x200000
> mtd_debug write /dev/mtd1 0 0x150000 uImage
> if ( mtd_debug verifiy /dev/mtd1 0 uImage ) ; then
> reboot
> else
> # Better try again, or we will die
> fi
Looks like a useful feature, but I cannot apply your patch because it is
not applicable to the latest mtd-utils.git. Also, your patch has many
trailing white-spaces. Could you please re-send it in inlined form - it
will make it easier to review it and reply to you (it it difficult to
comment attached patches).
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* mtd debug patch
@ 2011-07-28 2:41 斗破苍穷
2011-07-28 3:26 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 4+ messages in thread
From: 斗破苍穷 @ 2011-07-28 2:41 UTC (permalink / raw)
To: barebox
[-- Attachment #1.1: Type: text/plain, Size: 908 bytes --]
From 97f65ff22007f7e3003c333586d7bfa2d37f6268 Mon Sep 17 00:00:00 2001
From: byteman <wangchen2011@gmail.com>
Date: Thu, 28 Jul 2011 10:40:12 +0800
Subject: [PATCH] mtd debug message patch
---
common/Kconfig | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig
index 7d2367b..bc3a576 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -481,5 +481,16 @@ config ENABLE_DEVICE_NOISE
prompt "verbose device handling"
help
Enable this to get noisy device handling routines
-
+config MTD_DEBUG
+ bool
+ prompt "enable mtd debug message"
+ help
+ Enable this to get debug message of mtd device
+config MTD_DEBUG_VERBOSE
+ int
+ depends on MTD_DEBUG
+ prompt "mtd debug level"
+ help
+ if the level of mtd message less than mtd debug level,then will output the message.
+ default 0
endmenu
--
1.7.4.1
[-- Attachment #1.2: Type: text/html, Size: 1149 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: mtd debug patch
2011-07-28 2:41 mtd debug patch 斗破苍穷
@ 2011-07-28 3:26 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-28 3:26 UTC (permalink / raw)
To: 斗破苍穷; +Cc: barebox
HI,
please no HTML
On 10:41 Thu 28 Jul , 斗破苍穷 wrote:
> From 97f65ff22007f7e3003c333586d7bfa2d37f6268 Mon Sep 17 00:00:00 2001
> From: byteman <wangchen2011@gmail.com>
please use a real name
> Date: Thu, 28 Jul 2011 10:40:12 +0800
> Subject: [PATCH] mtd debug message patch
SOB here>
> ---
> common/Kconfig | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 7d2367b..bc3a576 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -481,5 +481,16 @@ config ENABLE_DEVICE_NOISE
> prompt "verbose device handling"
> help
> Enable this to get noisy device handling routines
> -
> +config MTD_DEBUG
please move this to drivers/mtd
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-28 3:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 21:26 Mtd_debug patch Stephen Beaver
2010-06-13 8:57 ` Artem Bityutskiy
-- strict thread matches above, loose matches on Subject: below --
2011-07-28 2:41 mtd debug patch 斗破苍穷
2011-07-28 3:26 ` Jean-Christophe PLAGNIOL-VILLARD
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.