[Mipsbook-devel] yaffs2
Dr. H. Nikolaus Schaller
hns at computer.org
Thu Jun 10 16:32:38 CEST 2010
Am 10.06.2010 um 11:23 schrieb Dr. H. Nikolaus Schaller:
>
> Am 09.06.2010 um 22:51 schrieb Dr. H. Nikolaus Schaller:
>
>> Hi Ruben,
>>
>> Am 09.06.2010 um 18:57 schrieb Ruben Viets:
>>
>>> Hi Nikolaus,
>>>
>>> Looks like broken yaffs2 when newer ingenic patches are used.
>>
>> Ah, I see.
>
> I found that my kernel appears to have the 20080530 patch. At least
> my README-JZ file says: (Updated: 2008-05-20)
>
> Nevertheless, I have some problems with yaffs2. I get segfaults when
> trying to remove files. Reading files and listing the directory
> works fine.
>
> dmesg says:
> Unable to handle kernel paging request
> ...
> epc: yaffs_VerifyDirectory+0x24/0xcc
>
> But it simply may be that the yaffs I find on these NAND partions is
> from the 2.4 kernel - and is only partially compatible.
an interesting observation - gcc gives a warning for yaffs:
CC fs/yaffs2/yaffs_ecc.o - due to target missing
CC fs/yaffs2/yaffs_fs.o - due to target missing
fs/yaffs2/yaffs_fs.c: In function `yaffs_commit_write':
fs/yaffs2/yaffs_fs.c:717: Warning: »addr« could be uninitialized in
this function
CC fs/yaffs2/yaffs_guts.o - due to target missing
CC fs/yaffs2/yaffs_checkptrw.o - due to target missing
CC fs/yaffs2/yaffs_packedtags1.o - due to target missing
CC fs/yaffs2/yaffs_packedtags2.o - due to target missing
CC fs/yaffs2/yaffs_nand.o - due to target missing
CC fs/yaffs2/yaffs_qsort.o - due to target missing
CC fs/yaffs2/yaffs_tagscompat.o - due to target missing
CC fs/yaffs2/yaffs_tagsvalidity.o - due to target missing
CC fs/yaffs2/yaffs_mtdif.o - due to target missing
CC fs/yaffs2/yaffs_mtdif1.o - due to target missing
CC fs/yaffs2/yaffs_mtdif2.o - due to target missing
LD fs/yaffs2/yaffs.o - due to target missing
>
>>
>>> May be issue related to v33 patch compatibility issue, as the v33
>>> patch orginates from linux-2.6.24.3-jz-20080530.patch
>>
>> So this opens up a different strategy: find out what has changed
>> between the two patches and did break yaffs2.
>
> Now, I have compared the patches side-by side. There are 2630
> differences, but many of them are just a new date in the "diff" or
> "$Id:" line.
>
> Main changes I have identified:
> * MTD tools support larger block size
> * YAFFS utils support larger block size
> * YAFFS got more ECC options: YAFFS_ECC_RS, YAFFS_ECC_HAMMING
> * block number was changed 32 -> 64 bit
> * major changes in yaffs_fs.c::yaffs_internalread_super()
> * other changes in: yaffs_ecc.c, yaffs_mtd.c, yaffs_packedtags2.c
> * not YAFFS related: README-JZ, mach-jz4750/
>
> important README-JZ diffs:
> + And the MTD subsystem was modified by Ingenic to support the NAND
> larger than 2GB.
>
> To create a YAFFS2 image, mkyaffs2image command is used On PC host:
> +
> + usage: mkyaffs2image layout# dir image_file [convert]
> +
> + layout# NAND OOB layout:
> + 0 - nand_oob_raw, no used,
> + 1 - nand_oob_64, for 2KB pagesize,
> + 2 - nand_oob_128, for 2KB pagesize using
> multiple planes or 4KB pagesize,
> + 3 - nand_oob_256, for 4KB pagesize using
> multiple planes
> + dir the directory tree to be converted
> + image_file the output file to hold the image
> +
> + e.g., for 2KB page size NAND not using multi-plane:
> +
> + $ mkyaffs2image 1 /nfsroot/root26 root26.yaffs2
> +
> +To burn the yaffs2 image to the NAND, use next command (On target
> board):
> +
> + # nandwrite -a -o /dev/mtd2 root26.yaffs2
> +
> +To format and mount YAFFS2 (On target board):
> +
> + # flash_eraseall /dev/mtd2
> + # mount -t yaffs2 /dev/mtdblock2 /mnt/mtdblock2
> +
>
> +The linux kernel from ingenic provides MLC NAND support through
> Hardware
> +ECC algorithm. Jz4740 supports Reed-Solomon (RS) ECC algorithm,
> which can
> +detect and correct 4-bit errors per 512 bytes at least. Jz4750
> supports
> +4-bit and 8-bit BCH ECC algorithm, 4-bit BCH ECC can detect and
> correct
> +4 bits for up to 1010 bytes and 8-bit BCH ECC can detect and correct
> +8 bits errors for up to 1016 bytes.
> +
> +To include MLC NAND support, you are required to configure the kernel
> +and select the configuration CONFIG_MTD_HW_RS_ECC for Jz4740, and
> +CONFIG_MTD_HW_BCH_ECC for Jz4750, which can be found at:
> +
> + [Memory Technology Devices (MTD)] --> [NAND Device Support]
> +
> + --> [ECC Type] --> [Select hardware RS ECC]
> + [Select hardware BCH ECC]
>
>
>
>>
>> To do this completely: can you explain the specific symptoms of
>> broken yaffs2?
>>
>> BTW: I think we should develop a new minifs and install as yaffs2
>> (the Skytone minifs is IMHO a jffs2). For that I have started to
>> work on a branch of the lenny-400 rootfs.
>
> Hm - we have to squeeze that into 5 MByte...
>
>>
>> best regards,
>> Nikolaus
>>
>>>
>>> Grt Ruben.
>>>
>>> From: hns at computer.org
>>> To: r_viets at hotmail.com; mipsbook-devel at linuxtogo.org
>>> Subject: Re: [Mipsbook-devel] yaffs2
>>> Date: Wed, 9 Jun 2010 12:20:29 +0200
>>>
>>> Hi Ruben,
>>>
>>> I think I have applied linux-2.6.24.3-jz-20100304.patch to my
>>> initial kernel. At least according to the commit log [1]. So my
>>> kernel should already include the most recent yaffs2 - or has
>>> someone broken yaffs2 since linux-2.6.24.3-jz-20080530.patch ?
>
> _______________________________________________
> Mipsbook-devel mailing list
> Mipsbook-devel at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxtogo.org/pipermail/mipsbook-devel/attachments/20100610/243ebb60/attachment.htm>
More information about the Mipsbook-devel
mailing list