Steve Finney | 1 May 2006 23:49
Picon
Favicon

mtd-utils

I'm new on this list, but not new to Linux...I've been using mtd-utils recently,
and find a few rough edges. I'd be happy to fix them, but I just wanted to check
first about whether there's some reason these aren't good ideas...

1) nandwrite and nanddump only take decimal for numbers like offsets; it
  seems as if a hex option would be useful (just change atoi to strtol).

2) nandump does not provide an option for reading non-error-corrected
  data; I'm playing with ECC on a Samsung chip. so this would be useful for
  debugging. I guess this would just be adding an SETOOBSEL as is done
  in nandwrite?

3) flash_erase doesn't have any usage or --help option.

If these would be generally useful things, I can post the (fairly trivial)
patches to the list.

sf

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

David Woodhouse | 2 May 2006 00:31
Favicon

Re: mtd-utils

On Mon, 2006-05-01 at 17:49 -0400, Steve Finney wrote:
> If these would be generally useful things, I can post the (fairly
> trivial) patches to the list.

That would be much appreciated -- thanks.

--

-- 
dwmw2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Dmitry Bazhenov | 2 May 2006 10:20

Searching for JFFS2 stress test

Hello everybody!

Could anybody tell me is there any stress test for the JFFS2 file system?

--
Regards,
Dmitry

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Deepak Saxena | 2 May 2006 10:50

RedBoot partition not <at> end of flash...


I've got a board with a 32MiB flash (128K SectorSize) with the redboot table
only covering the first (32MiB - SectorSize) and the rest setup as OTP from
what I understand. What is the proper way to deal with this? What I'm doing 
right now is a heinous hack:

        ixp425_mtd->size -= ixp425_mtd->erasesize;
        /* Try to parse RedBoot partitions */
        npart = parse_mtd_partitions(ixp425_mtd, probes, &parsed_parts, 0);
        if (npart > 0) {
                res = add_mtd_partitions(ixp425_mtd, parsed_parts, npart);
        } else {
                printk("IXP425 Flash: Using static MTD partitions.\n");
                res = add_mtd_partitions(ixp425_mtd, ixp425_partitions,
                                         NB_OF(ixp425_partitions));
        }
        ixp425_mtd->size += ixp425_mtd->erasesize;

I tried setting the window size to (32MiB - SectorSize) before probing
but that failed miserably. One other thought I had was to create a
static partition map dividing the flash and then parse partitions
on the first region. Can the code handle recursive parsing?

I doubt I'm the first one to deal with this...

Tnx,
~Deepak

--

-- 
Deepak Saxena - dsaxena <at> plexity.net - http://www.plexity.net
(Continue reading)

Jean-Laurent Gazelle | 2 May 2006 14:18
Picon

Re: Searching for JFFS2 stress test

Maybe you can try fileop binary from iozone benchmark...

regards,
Jean-Laurent

2006/5/2, Dmitry Bazhenov <atrey <at> emcraft.com>:
> Hello everybody!
>
> Could anybody tell me is there any stress test for the JFFS2 file system?
>
> --
> Regards,
> Dmitry
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

David Vrabel | 2 May 2006 14:56

Re: RedBoot partition not <at> end of flash...

Deepak Saxena wrote:
> I've got a board with a 32MiB flash (128K SectorSize) with the redboot table
> only covering the first (32MiB - SectorSize) and the rest setup as OTP from
> what I understand. What is the proper way to deal with this? What I'm doing 
> right now is a heinous hack:

'redboot.directory=-2' command line option?

David Vrabel
--

-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Steve Finney | 2 May 2006 18:54
Picon
Favicon

[PATCH 1/3] MTD Utils. Allow hex argument in nandwrite

It's reasonable to allow specifying the start address in hex. If these patches 
arn't in the appropriate format, I'm sure someone will let me know :-).

sf

Signed-off-by: Steven FInney <sfinney <at> healthhero.com>

----------------------------------

--- util.orig/nandwrite.c       2006-05-02 07:52:41.556880288 -0700
+++ util/nandwrite.c    2006-05-02 09:37:13.843347808 -0700
 <at>  <at>  -183,7 +183,7  <at>  <at>  void process_options (int argc, char *ar
                        pad = 1;
                        break;
                case 's':
-                       mtdoffset = atoi (optarg);
+                       mtdoffset = strtol (optarg, NULL, 0);
                        break;
                case 'b':
                        blockalign = atoi (optarg);

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Steve Finney | 2 May 2006 18:58
Picon
Favicon

[PATCH 2/3] MTD Utils. Add noecc option to nanddump

Add option to read nand data _without_ doing ECC; can be useful for
development/debugging. Also allow hex args for start and length.

Signed-off-by: Steven Finney <sfinney <at> healthhero.com>

------------------------

--- util.orig/nanddump.c        2006-05-02 07:52:41.459895032 -0700
+++ util/nanddump.c     2006-05-02 08:53:35.334421672 -0700
 <at>  <at>  -33,6 +33,10  <at>  <at> 
 #define PROGRAM "nanddump"
 #define VERSION "$Revision: 1.29 $"

+struct nand_oobinfo none_oobinfo = {
+       .useecc = MTD_NANDECC_OFF,
+};
+
 void display_help (void)
 {
        printf("Usage: nanddump [OPTIONS] MTD-device\n"
 <at>  <at>  -43,6 +47,7  <at>  <at>  void display_help (void)
               "-f file    --file=file          dump to file\n"
               "-i         --ignoreerrors       ignore errors\n"
               "-l length  --length=length      length\n"
+              "-n         --noecc              read without error correction\n"
               "-o         --omitoob            omit oob data\n"
               "-b         --omitbad            omit bad blocks from the dump\n"
               "-p         --prettyprint        print nice (hexdump)\n"
 <at>  <at>  -67,6 +72,7  <at>  <at>  void display_version (void)

(Continue reading)

Steve Finney | 2 May 2006 19:00
Picon
Favicon

[PATCH 3/3] MTD Utils. Add minimal usage message to flash_erase

Better than nothing...

Signed-off-by: Steven Finney <sfinney <at> healthhero.com>

-----------------
--- util.orig/flash_erase.c     2006-05-02 07:52:41.608872384 -0700
+++ util/flash_erase.c  2006-05-02 09:37:02.336097176 -0700
 <at>  <at>  -7,6 +7,7  <at>  <at> 
 #include <stdio.h>
 #include <fcntl.h>
 #include <time.h>
+#include <string.h>
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <mtd/mtd-user.h>
 <at>  <at>  -146,6 +147,11  <at>  <at>  int main(int argc,char *argv[])
                fprintf(stderr,"You must specify a device\n");
                return 16;
        }
+       if ( !strcmp(argv[1], "-h") || !strcmp (argv[1], "--help") ) {
+               printf("Usage: flash_erase MTD-device [start] [cnt (# erase blocks)] [lock]\n"
+                      "       flash_erase -h | --help\n") ;
+               exit (0);
+       }

        if (argc > 2)
                start = strtol(argv[2], NULL, 0);

______________________________________________________
Linux MTD discussion mailing list
(Continue reading)

Jörn Engel | 2 May 2006 19:14
Picon

Re: [PATCH 1/3] MTD Utils. Allow hex argument in nandwrite

On Tue, 2 May 2006 12:54:46 -0400, Steve Finney wrote:
> 
> +                       mtdoffset = strtol (optarg, NULL, 0);

How about doing something similar to block2mtd?
http://git.infradead.org/?p=users/joern/mtd-2.6.git;a=blob;h=f54e4bf9b968f153400312a74689f7028650b5d4;hb=954c24227318c166ec1925e1229db442e1f56f51;f=drivers/mtd/devices/block2mtd.c#l354

Jörn

--

-- 
Why do musicians compose symphonies and poets write poems?
They do it because life wouldn't have any meaning for them if they didn't.
That's why I draw cartoons.  It's my life.
-- Charles Shultz

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/


Gmane