public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* nandwrite problem
@ 2009-02-25  5:24 Sridhar C.R
  0 siblings, 0 replies; 8+ messages in thread
From: Sridhar C.R @ 2009-02-25  5:24 UTC (permalink / raw)
  To: linux-mtd

Hi,

I am using an 8Gbit ST Micro NAND flash. I am using the cross compiled mtd
utils (mtd-utils-05.07.23) for mips 64.
The flash eraseall is working. But when I try to write an image (jffs2 / any
other), I am getting the following error

# ./nandwrite -p /dev/mtd0 rootfs.jffs2
Writing data to block 0
pwrite: Input/output error
Data did not fit into device, due to bad blocks
: Illegal seek

The block 0 of this partition is a good block. This is verified by the boot
up info as well as the flash_eraseall utility.
Also the partition is large enough to hold the image in spite of few bad
blocks in the partition.

Can anybody have any ideas?

Thanks,
Sridhar


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* nandwrite problem
@ 2009-04-09  7:29 Donal Morrissey
       [not found] ` <BAY131-W55A4C892E0412CE9650E0EE2830@phx.gbl>
  0 siblings, 1 reply; 8+ messages in thread
From: Donal Morrissey @ 2009-04-09  7:29 UTC (permalink / raw)
  To: linux-mtd

Hello All,
I'm having problems in using the nandwrite command for my cirius logic
EP9302 arm based processor card. I am able to load the images
correctly via redboot, but not via the nandwrite shell command.

I'm using redboot, kernel 2.6.8.1-crus2.0.8 and nandwrite v1.32.

Here is the redboot output:
---------------------------
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x60000000  0x60000000  0x00040000  0x00000000
RedBoot config    0x60FC0000  0x60FC0000  0x00001000  0x00000000
FIS directory     0x60FE0000  0x60FE0000  0x00020000  0x00000000
config1           0x60040000  0x00800000  0x00020000  0x00000000
config2           0x60060000  0x00800000  0x00020000  0x00000000
ramdisk.gz        0x60080000  0x00800000  0x00400000  0x00800000
zImage            0x60480000  0x00080000  0x00140000  0x00080000

Here are the MTD Devices
------------------------
~ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "RedBoot"
mtd1: 00020000 00020000 "config1"
mtd2: 00020000 00020000 "config2"
mtd3: 00400000 00020000 "ramdisk.gz"
mtd4: 00140000 00020000 "zImage"
mtd5: 00a00000 00020000 "unallocated"
mtd6: 00001000 00020000 "RedBoot config"
mtd7: 00020000 00020000 "FIS directory"

I'm trying to update the ramdisk.gz which is located in /dev/mtd3:

~ # mtd_debug info /dev/mtd3
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CLEAR_BITS
mtd.size = 4194304 (4M)
mtd.erasesize = 131072 (128K)
mtd.oobblock = 0
mtd.oobsize = 0
mtd.ecctype = MTD_ECC_NONE
regions = 0

You can see that the oobblock and oobsize are 0! When I try to run the
nandwrite command I get the following:

~ # nandwrite /dev/mtd3 ramRamdisk.gz
Unknown flash (not normal NAND)

Having looked at the nandwrite command source code, this problem is
caused by the oobblock and oobsize members of the mtf info being 0!

Does anyone know why the values are incorrect or how to get around this issue?

Best Regards,
Donal

^ permalink raw reply	[flat|nested] 8+ messages in thread
* nandwrite problem
@ 2006-07-17 14:59 Davide CASCONE
  2006-07-17 15:04 ` Josh Boyer
  0 siblings, 1 reply; 8+ messages in thread
From: Davide CASCONE @ 2006-07-17 14:59 UTC (permalink / raw)
  To: linux-mtd


I have a NAND device related to MTD block 5. The NAND device is correctly probing during the kernel boot phase. 
If I run the following commands

#mkdir /dev/mtdblock/5 b 31 5
#mount -t jffs2 /dev/mtdblock/5 /nand/

the JFFS2 file system is correctly mounting on the /nand/ directory.
But, if I run the following command

#./nandwrite -j /dev/mtdblock/5 filesys.jffs2_nand

in order to copy a file system image on the NAND device, the system returns the following message:

MEMGETINFO: Inappropriate ioctl for device

Any suggestions to solve the problem?

Thanks in advance,
Davide

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

end of thread, other threads:[~2009-04-09 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25  5:24 nandwrite problem Sridhar C.R
  -- strict thread matches above, loose matches on Subject: below --
2009-04-09  7:29 Donal Morrissey
     [not found] ` <BAY131-W55A4C892E0412CE9650E0EE2830@phx.gbl>
2009-04-09 20:27   ` Donal Morrissey
2006-07-17 14:59 Davide CASCONE
2006-07-17 15:04 ` Josh Boyer
2006-07-17 17:01   ` Raj Kumar Yadav
2006-07-17 17:43     ` Josh Boyer
2006-07-17 18:10     ` David Woodhouse

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