From hamish@cloud.net.au Fri Mar 28 04:46:00 2008
Received: from risingsoftware01.propagation.net ([66.221.33.65]
	ident=Debian-exim)
	by stoneboat.aleph1.co.uk with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.63) (envelope-from <hamish@cloud.net.au>) id 1Jf6TP-0005z7-62
	for yaffs@lists.aleph1.co.uk; Fri, 28 Mar 2008 04:45:59 +0000
Received: from c122-107-142-134.eburwd5.vic.optusnet.com.au ([122.107.142.134]
	helo=noddy.cloud.net.au)
	by risingsoftware01.propagation.net with esmtpsa
	(TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63)
	(envelope-from <hamish@cloud.net.au>) id 1Jf6TM-0001Yr-5n
	for yaffs@lists.aleph1.co.uk; Thu, 27 Mar 2008 23:45:48 -0500
Received: from hamish by noddy.cloud.net.au with local (Exim 4.69)
	(envelope-from <hamish@cloud.net.au>) id 1Jf6TH-0007mp-Rb
	for yaffs@lists.aleph1.co.uk; Fri, 28 Mar 2008 15:45:43 +1100
Date: Fri, 28 Mar 2008 15:45:43 +1100
From: Hamish Moffatt <hamish@cloud.net.au>
To: yaffs@lists.aleph1.co.uk
Message-ID: <20080328044543.GB29644@cloud.net.au>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
X-SA-Exim-Connect-IP: 66.221.33.65
X-SA-Exim-Mail-From: hamish@cloud.net.au
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00 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] file system blank after mounting
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
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: Fri, 28 Mar 2008 04:46:00 -0000

I'm trying out YAFFS2 here with Linux 2.6.24. The kernel compiled fine
and I can mount the file system on a blank MTD device.

Now I've prepared an image using mkyaffs2image and written it, but when
I mount the volume it's blank!


$ ~/src/yaffs2/utils/mkyaffs2image /path/to/root elaraboot.yaffs2 convert
[...]
Operation complete.
418 objects in 36 directories
1753 NAND pages

which looks promising. (My target is armeb, host is x86-64, hence
convert option.) So I erase the device and write the image to it:

# flash_eraseall /dev/mtd7
[...]
Skipping bad block at 0x008e0000
Erasing 128 Kibyte @ 5280000 -- 32 % complete.
Skipping bad block at 0x052a0000
Erasing 128 Kibyte @ 6120000 -- 37 % complete.
Skipping bad block at 0x06140000
Erasing 128 Kibyte @ ffe0000 -- 99 % complete.

And write the image:

# nandwrite -p /dev/mtd7 elaraboot.yaffs2 
Writing data to block 0
Bad block at 0, 1 block(s) from 0 will be skipped
Writing data to block 20000
Bad block at 20000, 1 block(s) from 20000 will be skipped
Writing data to block 40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 60000
[...]
Writing data to block c40000
Writing data to block c60000
# 

And mount it:

# mount -t yaffs2 /dev/mtdblock7 /mnt
# ls /mnt
lost+found
# du /mnt
2       /mnt/lost+found
4       /mnt


So, perhaps I wrote it wrong. I tried:

# nandwrite -o /dev/mtd7 elaraboot.yaffs2 
...
# mount -t yaffs2 /dev/mtdblock7 /mnt
# ls /mnt
lost+found
# du /mnt
1826902 /mnt/lost+found
1826904 /mnt

What am I doing wrong?


thanks
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

