public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Creating NAND flash image outside embedded target
@ 2006-06-23  0:28 Kevin Starinieri
  2006-06-23  7:57 ` Frank Haverkamp
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Starinieri @ 2006-06-23  0:28 UTC (permalink / raw)
  To: linux-mtd

I have looked through the mail archives and did not see any subject
threads regarding this.  I am trying to create a NAND flash image
without having to do it on my embedded target.  

I have created a fake ram mtd device using mtdram driver, using the
following commands on a linux Fedora Core 5 machine:

modprobe mtdcore
modprobe mtdram total_size=32768 erase_size=16

I then created the necessary mtd block and character devices (mknod) and
then issued:

modprobe mtdblock

I then wanted to partition the fake mtd device and write to it using a
nandwrite utility that I compiled for x86 that is used for samsung arm
s3c2410 nand flash.  But the utility expects the device to be
partitioned and erase regions to be defined.  But, I don't know of
anyway to do this outside of my target.   It seems I need another x86
utility that will create the partitions and erase regions.  Does anyone
know how to create an MTD environment where I can create nand flash
images on my linux Fedora Core 5 box?

kstar

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

* Re: Creating NAND flash image outside embedded target
  2006-06-23  0:28 Creating NAND flash image outside embedded target Kevin Starinieri
@ 2006-06-23  7:57 ` Frank Haverkamp
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Haverkamp @ 2006-06-23  7:57 UTC (permalink / raw)
  To: Kevin Starinieri; +Cc: linux-mtd

Hi Kevin,

we had a similar problem with our embedded powerpc system where we
needed pre-build binary images to be flashed via a JTAG programming
utility into our NAND flashes. We also wanted to boot using NAND
flash only and have NAND flash scrubbing and the possiblity to
handle those bad blocks gracefully. 

For those and other reasons we developed UBI which we recently
published. It implements an interresting volume management approach,
helping to overcome some limitations which a traditional fixed
address/size partitioning scheme had. If you like, you can have a look
at our design paper and the associated utilities in my mtd-utils.git.

Here you can find our UBI design paper and a brief overview:
http://www.linux-mtd.infradead.org/doc/ubi.html

Maybe you find other aspects which are interessting for your
application too.

On Thu, 2006-06-22 at 17:28 -0700, Kevin Starinieri wrote:
> I have looked through the mail archives and did not see any subject
> threads regarding this.  I am trying to create a NAND flash image
> without having to do it on my embedded target.  

> I then wanted to partition the fake mtd device and write to it using a
> nandwrite utility that I compiled for x86 that is used for samsung arm
> s3c2410 nand flash.  But the utility expects the device to be
> partitioned and erase regions to be defined.  But, I don't know of
> anyway to do this outside of my target.

For generation of UBI/NAND images on your developemt (x86) systems we
are using the ubi-utils toolchain:

 o mkpfi is processing a configuration file and binary input data e.g.
   JFFS2 images, boot-code, kernel images. It creates a partial flash
   image (pfi) file which can be used by other tools e.g.
 o pfi2bin which converts the pfi file into plain binary output.
   For NOR flashes that would be an image you could directly burn
   into your NOR which you solder afterwards onto your board,
   for NAND you can run:
 o bin2nand which adds the OOB whith ECC information (currently only
   our layout, but one could consider enhancing it).

The output of this we can flash via JTAG to our systems. If this works
we use on our embedded systems:
 o overwriting files in JFFS2 ;-) and
 o pfiflash to flash pfi files to the system e.g. boot-code, 
   kernel which are stored in UBI static volumes. We are 
   using this to update our systems. To create UBI volumes 
   manually and update them, we use:
 o ubimkvol, ubirmvol, ubiupdatevol

We even started (and have not finished yet) the inverse toolchain which
can convert the data you read via JTAG from broken systems back into
binary data which previously was written to the UBI volumes. This is
intended to be used for field returns which do not boot/operate
correctly anymore.

Frank

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

end of thread, other threads:[~2006-06-23  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23  0:28 Creating NAND flash image outside embedded target Kevin Starinieri
2006-06-23  7:57 ` Frank Haverkamp

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