From rick@efn.org Tue Apr 22 01:00:16 2008
Received: from samwise.efn.org ([12.33.21.33])
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.63)
	(envelope-from <rick@efn.org>) id 1Jo5vY-0007Wm-R1
	for yaffs@stoneboat.aleph1.co.uk; Tue, 22 Apr 2008 01:00:16 +0100
Received: from efn.org (c-67-171-210-97.hsd1.or.comcast.net [67.171.210.97])
	by samwise.efn.org (Postfix) with ESMTP id 6AF17170134
	for <yaffs@stoneboat.aleph1.co.uk>;
	Mon, 21 Apr 2008 17:00:00 -0700 (PDT)
Received: from rick by efn.org with local (Exim 4.69)
	(envelope-from <rick@efn.org>) id 1Jo5vU-0005UB-Js
	for yaffs@stoneboat.aleph1.co.uk; Mon, 21 Apr 2008 17:00:00 -0700
To: yaffs@stoneboat.aleph1.co.uk
Message-Id: <E1Jo5vU-0005UB-Js@efn.org>
From: Rick Bronson <rick@efn.org>
Date: Mon, 21 Apr 2008 17:00:00 -0700
X-SA-Exim-Connect-IP: 12.33.21.33
X-SA-Exim-Mail-From: rick@efn.org
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,
	SPF_PASS autolearn=ham version=3.2.3
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Yaffs] nandwrite/nanddump question
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: rick@efn.org
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>, 
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Tue, 22 Apr 2008 00:00:18 -0000

Hi,

  I have a partition that has some bad blocks and would like to dump
it to a file (including the bad block markings), then write this same
file to a good partition of the same size/type along with the bad
blocks.  What I'm looking for is a byte-for-byte copy.  Is this
possible with nandwrite/nanddump?  I tried it but it doesn't seem to
work that way.  Or maybe I don't have the right options

./nandwrite -f -y -n -o /dev/mtd2 /root/ryan.fs2.bin # done on bad NAND
./nanddump -i /dev/mtd2 > /root/ryan.fs2.test.bin # done on good NAND
cmp /root/ryan.fs2.bin /root/ryan.fs2.test.bin # different!

  Thanks very much for any help.

  Rick Bronson


------------------------------------------------------------------
  Here are my Linux 2.6.22 specifics:

  yaffs2 version:

yaffs2-ian-20070523.tgz

  NAND chip (512/16):

Flash chip found:                                                               
         Manufacturer ID: 0x98, Chip ID: 0x75 (Toshiba TC58256FT/DC)            
1 flash chips found. Total nand_chip size: 32 MB                                

  kernel:

Linux acq 2.6.22-rc1 #170 Thu Jul 5 13:58:14 PDT 2007 armv4tl GNU/Linux

  .config file:

CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
CONFIG_YAFFS_9BYTE_TAGS=y
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set

