public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Setting up MTD via command line?
@ 2004-08-26  5:24 Bo Henriksen
  2004-08-31 16:18 ` Jamie Guinan
  0 siblings, 1 reply; 4+ messages in thread
From: Bo Henriksen @ 2004-08-26  5:24 UTC (permalink / raw)
  To: linux-mtd

Hi,

I'm having trouple understanding the new MTD interface with 2.6.8?
Can anyone explain, or is there docs on how to setup MTD via command
line, which I think was introduced so 
you don't need to write your own driver for e.g. embedded processors
such as ARM.

Cheers,

Bo

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

* Re: Setting up MTD via command line?
  2004-08-26  5:24 Setting up MTD via command line? Bo Henriksen
@ 2004-08-31 16:18 ` Jamie Guinan
  2004-09-11 14:26   ` Jamie Guinan
  0 siblings, 1 reply; 4+ messages in thread
From: Jamie Guinan @ 2004-08-31 16:18 UTC (permalink / raw)
  To: Bo Henriksen; +Cc: linux-mtd

On Thu, 26 Aug 2004, Bo Henriksen wrote:

> Hi,
> 
> I'm having trouple understanding the new MTD interface with 2.6.8?
> Can anyone explain, or is there docs on how to setup MTD via command
> line, which I think was introduced so 
> you don't need to write your own driver for e.g. embedded processors
> such as ARM.

Hi Bo,

I found it in the config help for "Command line partition table parsing",
and also in the comments in cmdlinepart.c.

For the LogicPD board (lpd7a404 here), I used this kernel command-line,

  boot console=ttyAM1 root=/dev/mtdblock3 rootfstype=jffs2 \
    mtdparts=phys_mapped_flash:256k,256k,1536k,2048k

and (at least) these options,

  CONFIG_MTD_PARTITIONS=y
  CONFIG_MTD_CMDLINE_PARTS=y
  CONFIG_MTD_CFI=y
  CONFIG_MTD_PHYSMAP=y
  CONFIG_MTD_PHYSMAP_START=0x0
  CONFIG_MTD_PHYSMAP_LEN=0x4000000
  CONFIG_MTD_PHYSMAP_BANKWIDTH=4

Now I finally understand the thread from July where the developers were
discussing this (trading a whole C file (lpd7a400-flash.c) for the
"mtdparts=" parameter; good stuff).

Good luck,
-Jamie

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

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

* Re: Setting up MTD via command line?
  2004-08-31 16:18 ` Jamie Guinan
@ 2004-09-11 14:26   ` Jamie Guinan
  2004-09-12 23:38     ` Aras Vaichas
  0 siblings, 1 reply; 4+ messages in thread
From: Jamie Guinan @ 2004-09-11 14:26 UTC (permalink / raw)
  To: linux-mtd

On Tue, 31 Aug 2004, Jamie Guinan wrote:

> > Can anyone explain, or is there docs on how to setup MTD via command
> > line, which I think was introduced so 
> > you don't need to write your own driver for e.g. embedded processors
> > such as ARM.
> 
> Hi Bo,
> 
> I found it in the config help for "Command line partition table parsing",
> and also in the comments in cmdlinepart.c.
> 
> For the LogicPD board (lpd7a404 here), I used this kernel command-line,
> 
>   boot console=ttyAM1 root=/dev/mtdblock3 rootfstype=jffs2 \
>     mtdparts=phys_mapped_flash:256k,256k,1536k,2048k

Erm, that only gets access to 4MB (one of my test boards has only 4MB,
which is why I tested it as above).  To use the full 16MB of flash on 
some LogicPD boards,

   mtdparts=phys_mapped_flash:256k,256k,1536k,14336k

-Jamie

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

* Re: Setting up MTD via command line?
  2004-09-11 14:26   ` Jamie Guinan
@ 2004-09-12 23:38     ` Aras Vaichas
  0 siblings, 0 replies; 4+ messages in thread
From: Aras Vaichas @ 2004-09-12 23:38 UTC (permalink / raw)
  To: linux-mtd

Jamie Guinan wrote:
 >>>Can anyone explain, or is there docs on how to setup MTD via command

from <your kernel here>/Documentation/Configure.help

CONFIG_MTD_CMDLINE_PARTS
   Allow generic configuration of the MTD paritition tables via the kernel
   command line. Multiple flash resources are supported for hardware where
   different kinds of flash memory are available.

   You will still need the parsing functions to be called by the driver
   for your particular device. It won't happen automatically. The
   SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
   example.

   The format for the command line is as follows:

   mtdparts=<mtddef>[;<mtddef]
   <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
   <partdef> := <size>[@offset][<name>][ro]
   <mtd-id>  := unique id used in mapping driver/device
   <size>    := standard linux memsize OR "-" to denote all
   remaining space
   <name>    := (NAME)

   Due to the way Linux handles the command line, no spaces are
   allowed in the partition definition, including mtd id's and partition
   names.

   Examples:

   1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
   mtdparts=sa1100:-

   Same flash, but 2 named partitions, the first one being read-only:
   mtdparts=sa1100:256k(ARMboot)ro,-(root)

   If unsure, say 'N'.

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

end of thread, other threads:[~2004-09-12 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-26  5:24 Setting up MTD via command line? Bo Henriksen
2004-08-31 16:18 ` Jamie Guinan
2004-09-11 14:26   ` Jamie Guinan
2004-09-12 23:38     ` Aras Vaichas

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