linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Mtd_debug patch
@ 2010-05-28 21:26 Stephen Beaver
  2010-06-13  8:57 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ 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] 2+ 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; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2010-06-13  9:00 UTC | newest]

Thread overview: 2+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).