public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* nand write problem
@ 2005-05-25 14:29 Jonas
  2005-05-25 14:55 ` Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Jonas @ 2005-05-25 14:29 UTC (permalink / raw)
  To: linux-mtd

Hi list,

I try to write some files within linux to my flash. But I always get the 
message
nand_write_ecc: Attempt to write not page aligned data
cp: Write Error: Invalid argument

This is my environment:
linux kernel 2.6.11
mtd-snapshot-20050524.tar.bz2
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 
3,3V 8-bit)

What I'm doing wrong?

Thanks for your help.
Jonas

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

* Re: nand write problem
  2005-05-25 14:29 Jonas
@ 2005-05-25 14:55 ` Thomas Gleixner
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2005-05-25 14:55 UTC (permalink / raw)
  To: Jonas; +Cc: linux-mtd

On Wed, 2005-05-25 at 16:29 +0200, Jonas wrote:
> I try to write some files within linux to my flash. But I always get the 
> message
> nand_write_ecc: Attempt to write not page aligned data
> cp: Write Error: Invalid argument

You can not use cp to write to a raw nand flash. NAND must be written
with page aligned data. 

Please read the FAQ and the tech docs on http://linux-mtd.infradead.org

tglx

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

* Re: nand write problem
       [not found] <B1091462CF5479489B1D8FE818330D2C80F27E@exchange2003.ad.skymv.com>
@ 2005-05-30 10:34 ` Jonas
  2005-05-30 18:49   ` Blair Barnett
  0 siblings, 1 reply; 7+ messages in thread
From: Jonas @ 2005-05-30 10:34 UTC (permalink / raw)
  To: Blair Barnett; +Cc: linux-mtd

Hi blair,
> I believe you need to use the -p (pad) option to nandwrite.
> Please let us see your nandwrite command line.
This is what I tried:

# ./nandwrite --jffs2 /dev/mtd/2 jffs2.img
Use -f option to enforce legacy placement on autoplacement enabled mtd 
device

# ./nandwrite -f /dev/mtd/2 jffs2.img
./nandwrite: illegal option -- f

# ./nandwrite -f --jffs2 /dev/mtd/2 jffs2.img
./nandwrite: illegal option -- f

# ./nandwrite -p /dev/mtd/2 jffs2.img
this takes a long time until it is finished.

then I mount it with
# mount -t jffs2 /dev/mtdblock/2 /mnt/
and get a lot of
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0

Copy the image with nandwrite is the correct and only way? Or is there 
another possibility?

Jonas

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

* Re: nand write problem
  2005-05-30 10:34 ` nand write problem Jonas
@ 2005-05-30 18:49   ` Blair Barnett
  2005-05-31 15:24     ` Jonas Dietsche
  2005-05-31 15:24     ` Peter Grayson
  0 siblings, 2 replies; 7+ messages in thread
From: Blair Barnett @ 2005-05-30 18:49 UTC (permalink / raw)
  To: Jonas; +Cc: linux-mtd

Hi Jonas,

Thanks for giving us explicit details...

On Mon, 2005-05-30 at 03:34, Jonas wrote:
> Hi blair,
> > I believe you need to use the -p (pad) option to nandwrite.
> > Please let us see your nandwrite command line.
> This is what I tried:
> 
> # ./nandwrite --jffs2 /dev/mtd/2 jffs2.img
> Use -f option to enforce legacy placement on autoplacement enabled mtd 
> device
What version of nandwrite (nandwrite -V) do you have? Version 1.30
supports -f.
> 
> # ./nandwrite -f /dev/mtd/2 jffs2.img
> ./nandwrite: illegal option -- f
> 
> # ./nandwrite -f --jffs2 /dev/mtd/2 jffs2.img
> ./nandwrite: illegal option -- f
> 
> # ./nandwrite -p /dev/mtd/2 jffs2.img
> this takes a long time until it is finished.
If your JFFS2 image has any size to it, I would expect it to take some
time.
> 
> then I mount it with
> # mount -t jffs2 /dev/mtdblock/2 /mnt/
> and get a lot of
> CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
> 
> Copy the image with nandwrite is the correct and only way? Or is there 
> another possibility?
I've seen the CLEANMARKER errors before. How did you create the JFFS2
partition?

Check out this thread for a little more detail:
http://lists.infradead.org/pipermail/linux-mtd/2005-March/012045.html

Good luck! 

-blair

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

* Re: nand write problem
  2005-05-30 18:49   ` Blair Barnett
@ 2005-05-31 15:24     ` Jonas Dietsche
  2005-05-31 15:35       ` Jonas
  2005-05-31 15:24     ` Peter Grayson
  1 sibling, 1 reply; 7+ messages in thread
From: Jonas Dietsche @ 2005-05-31 15:24 UTC (permalink / raw)
  To: blair; +Cc: linux-mtd

Hi Blair,

thanks for your help!

>># ./nandwrite --jffs2 /dev/mtd/2 jffs2.img
>>Use -f option to enforce legacy placement on autoplacement enabled mtd 
>>device
> 
> What version of nandwrite (nandwrite -V) do you have? Version 1.30
> supports -f.

> 
>># ./nandwrite -f /dev/mtd/2 jffs2.img
>>./nandwrite: illegal option -- f
>>
>># ./nandwrite -f --jffs2 /dev/mtd/2 jffs2.img
>>./nandwrite: illegal option -- f
>>
>># ./nandwrite -p /dev/mtd/2 jffs2.img
>>this takes a long time until it is finished.
> 
> If your JFFS2 image has any size to it, I would expect it to take some
> time.
> 
>>then I mount it with
>># mount -t jffs2 /dev/mtdblock/2 /mnt/
>>and get a lot of
>>CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
>>
>>Copy the image with nandwrite is the correct and only way? Or is there 
>>another possibility?
> 
> I've seen the CLEANMARKER errors before. How did you create the JFFS2
> partition?
> 
> Check out this thread for a little more detail:
> http://lists.infradead.org/pipermail/linux-mtd/2005-March/012045.html
> 
> Good luck! 
> 
> -blair
> 

-- 
Jonas Dietsche, FS Forth-Systeme GmbH, www.fsforth.de
Kueferstrasse 8, 79206 Breisach, Germany
Phone: +49 (7667) 908 189, FAX +49 (7667) 908 200

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

* Re: nand write problem
  2005-05-30 18:49   ` Blair Barnett
  2005-05-31 15:24     ` Jonas Dietsche
@ 2005-05-31 15:24     ` Peter Grayson
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Grayson @ 2005-05-31 15:24 UTC (permalink / raw)
  To: blair; +Cc: linux-mtd, Jonas

> # ./nandwrite -f /dev/mtd/2 jffs2.img
> ./nandwrite: illegal option -- f

The short option (-f) for the --forcelegacy option is broken in the
latest nandwrite. Check out the patch below.

--- nandwrite.c.orig    2005-05-31 09:22:00.000000000 -0600
+++ nandwrite.c 2005-05-31 09:22:08.000000000 -0600
@@ -124,7 +124,7 @@

        for (;;) {
                int option_index = 0;
-               static const char *short_options = "os:ajynqp";
+               static const char *short_options = "os:ajyfnqp";
                static const struct option long_options[] = {
                        {"help", no_argument, 0, 0},
                        {"version", no_argument, 0, 0},

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

* Re: nand write problem
  2005-05-31 15:24     ` Jonas Dietsche
@ 2005-05-31 15:35       ` Jonas
  0 siblings, 0 replies; 7+ messages in thread
From: Jonas @ 2005-05-31 15:35 UTC (permalink / raw)
  To: blair; +Cc: linux-mtd

Uuups, wrong shortcut ;-)

>> What version of nandwrite (nandwrite -V) do you have? Version 1.30
>> supports -f.
I used version 1.30. Peter Grayson just sent a patch.

>>> then I mount it with
>>> # mount -t jffs2 /dev/mtdblock/2 /mnt/
>>> and get a lot of
>>> CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
>>>
>>> Copy the image with nandwrite is the correct and only way? Or is 
>>> there another possibility?
>>
>>
>> I've seen the CLEANMARKER errors before. How did you create the JFFS2
>> partition?
I used flash_eraseall -j /dev/mtd/2 and then I copied it with the 
command above.

>> Check out this thread for a little more detail:
>> http://lists.infradead.org/pipermail/linux-mtd/2005-March/012045.html
Thanks.

Regards,
Jonas

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

end of thread, other threads:[~2005-05-31 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <B1091462CF5479489B1D8FE818330D2C80F27E@exchange2003.ad.skymv.com>
2005-05-30 10:34 ` nand write problem Jonas
2005-05-30 18:49   ` Blair Barnett
2005-05-31 15:24     ` Jonas Dietsche
2005-05-31 15:35       ` Jonas
2005-05-31 15:24     ` Peter Grayson
2005-05-25 14:29 Jonas
2005-05-25 14:55 ` Thomas Gleixner

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