[Yaffs] [Yaffs-archive] Re: May NAND Flash chip store 2 or more YAFFS partition?

Charles Manning manningc2@actrix.gen.nz
Mon, 8 Sep 2003 07:20:26 +1200


On Wednesday 06 August 2003 14:56, guo@unication.com.cn wrote:
> Hi all,
>     My question is, because NAND FLASH electronic furture, Can it run 2
> YAFFS with read-write mounted, either use MTD or not?
 Regards,
> Russell Greece.

Yes it can be done very easily. in two ways:

* With MTD:

ust partition the flash and mount the two mtd partitions sperately.

* With YAFFS
You can use YAFFS's own partitioning mechanism.
Each partion is the same as a yaffs_Device structure. Each has a start and 
end block to use for that partition.
There is an example in the direct/yaffscfg.c file

	// /boot

	bootDev.startBlock = 1; // Can't use block 0
	bootDev.endBlock = 127; // Last block in 2MB.


	// /flash

	flashDev.startBlock = 128; // First block after 2MB
	flashDev.endBlock = 1023; // Last block in 16MB

Now the one partition uses blocks 1..127 and the
other uses 128..1023.


You can even mix mtd partitionng and yaffs partitioning if you really wanted 
to. However, if you are using mtd, then I suggest you use mtd partitioning.

-- CHarles


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.