From: Blair Barnett Date: Thu, 07 Sep 2006 12:12:22 -0700 Subject: [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND In-Reply-To: References: Message-ID: <1157656342.30394.137.camel@blairs-desktop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Frank, You can run yaffs2 in yaffs1 compatibility mode. Check the yaffs2 source for the correct configuration options. -blair On Thu, 2006-09-07 at 11:46, Frank Mandarino wrote: > Hi, > > The attached patch for common/cmd_nand.c provides the ability to write > YAFFS filesystem images to NAND flash memory, using the newer MTD-based > nand code. > > The patch extends the nand write command to parse a ".yaffs1" suffix for > yaffs1 filesystems, or a ".yaffs" or ".yaffs2" suffix for yaffs2 > filesystems. > > Yaffs1 filesystems support 512-byte page, 16-byte oob NAND chips, while > yaffs2 filesystems support 2048-byte page, 64-byte oob NAND chips. > > Yaffs1 filesystem images can be generated using the mkyaffsimage utility > in the yaffs2/utils directory. > > Yaffs2 filesystem images can be generated using the mkyaffs2image > utility in the yaffs2/utils directory, after applying Sergey Kubushyn's > patch. See > http://aleph1.co.uk/lurker/message/20060211.004601.77b55bf3.en.html. > > So, for example, to write a yaffs1 filesystem image of length 0x526320 > from address 0x20000000 in ram to offset 0x100000 in flash, run the command: > > nand write.yaffs1 20000000 100000 526320 > > The area to be written must be erased before writing the filesystem. > > I have tested this code with yaffs1 filesystems, and, in fact, I am > finally able to run Linux with rootfstype=yaffs. I am unable to test > with yaffs2 filesystems because I don't have access to a system using > 2048+64 NAND chips. > > Regards, > ../fam