[Yaffs] Re: yaffs1/2 autodetect idea

Nick Bane nick at cecomputing.co.uk
Tue Nov 1 22:25:06 GMT 2005


Charles Manning wrote:
> On Friday 28 October 2005 21:31, Nick Bane wrote:
> 
> 
>>Supplementally:
>>One can specify rootfs in the kernel build as a default command line but
>>this presupposes that one knows what the nand type will be. For systems
>>with mixed nand builds (we have 32MB boards using 512b to 384MB using 3
>>1GBit 2k) a single kernel is often desireable for production. In our
>>version of bootldr (see
>>http://husaberg.toby-churchill.com/balloon/releases/development/bootldr/boo
>>tldr36) 2k/512 byte pages size for the root mtd device is detected and
>>rootfs=yaffs/yaffs2 is selected. In addition, due to the number of
>>overhead blocks, our first small boot partition is dynamically sized to
>>make sure there is enough free space for a kernel.
>>
>>BTW, using rootfs= is also the recommended way of booting a jffs2 root
>>fs acording to the Handhelds folks.
> 
> 
> Nick
> 
> There are probably quite a few people with the requirement of one firmware 
> supporting both 512 and 2k NAND board variants.
> 
> Would it help to modify yaffs2 to automatically handle the yaffs1 case? ie 
> something along the lines of:
> 
>   sniff mtd
>   if mtd page size == 512 then  yaffs1 handling
>   else  yaffs2 handling
> 
> That should be pretty straight forward to do and would save having to do the 
> decision making elsewhere.
> 
> Thoughts?
> 

Sounds sensible. It looks like its a common .get_sb chosing to call 
yaffs_read_super or yaffs2_read_super in yaffs_fs.c is all thats needed.

I suppose it is possible that the chunksize is not the only difference 
between yaffs1 and yaffs2 in an abstract sense but just the only two 
examples we have. It may be sensible to have yaffs1/2 auto detection a 
configurable option.

Nick


> -- CHarles
> 
> 




More information about the yaffs mailing list