wufuyue / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
1 stars 3 forks source link

oobfree #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

Why can't i decrease the length to 16 in oobfree?

If i know well we need only 16 bytes area to store four unsigned number in oob 
as struct yaffs_packed_tags2_tags_only.

static struct nand_ecclayout nand_oob_64 = {
        .eccbytes = 0,
        .oobfree = {{.offset = 30, .length = 16}},
};

I used msm nand chip with this layout:

static struct nand_ecclayout msm_nand_oob_64 = {
        .eccbytes       = 40,
        .eccpos         = {
                0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
                10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
                20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
                46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
                },
        .oobavail       = 16,
        .oobfree        = {
                {30, 16},
        }
};

Thank you.

Original issue reported on code.google.com by gabor.ma...@gmail.com on 18 Jul 2011 at 2:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I think this problem is different with the issue 15.

For this problem, I will try to add some check for OOB layout not only defined 
in headers (yaffs2utils_ecc.h) but also loaded by "-o" option. 

I will also try to skip calculating/saving tags ECC when creating a YAFFS2 
image and the OOB free space is less the 28(but it must be > 16). But if the 
tag ECC is ignored, its integrity cannot be guaranteed.

Original comment by penguin.lin on 19 Jul 2011 at 6:17

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 19 Jul 2011 at 6:17

GoogleCodeExporter commented 8 years ago
I think this patch can help you to create a image with 16 bytes free space in 
OOB (by mkyaffs2).

Original comment by penguin.lin on 19 Jul 2011 at 10:45

Attachments:

GoogleCodeExporter commented 8 years ago
The latest version skip verifying the OOB free space.

Original comment by penguin.lin on 22 Jul 2011 at 4:11