[FE training-materials-updates] sysdev: fix PMECC error when writing to a JFFS2 FS

Boris Brezillon boris.brezillon at free-electrons.com
Mon Sep 1 15:40:48 CEST 2014


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=d3b5c8a7d97fcec84fb80742c6684452e832dcd4

>---------------------------------------------------------------

commit d3b5c8a7d97fcec84fb80742c6684452e832dcd4
Author: Boris BREZILLON <boris.brezillon at free-electrons.com>
Date:   Mon Sep 1 15:38:59 2014 +0200

    sysdev: fix PMECC error when writing to a JFFS2 FS
    
    The HW ECC engine does not generate 0xff ECC bytes for an empty page.
    As a result, a page where 0xff data have been written will be considered as
    erased by the JFFS2 code (which only checks in band data), but the OOB area
    will actually be filled with something else.
    Subsequent write on such pages will most likely trigger ECC errors when
    reading the data back.
    
    Do not pad jffs2 images with 0xff on a block boundary, to prevent such
    errors.
    
    Signed-off-by: Boris BREZILLON <boris.brezillon at free-electrons.com>


>---------------------------------------------------------------

d3b5c8a7d97fcec84fb80742c6684452e832dcd4
 labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index e727396..2706956 100644
--- a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -45,7 +45,8 @@ in the next section.
 Find the erase block size of the NAND flash device in your board.
 
 Prepare a JFFS2 filesystem image from the \code{/www/upload/files}
-directory from the previous lab.
+directory from the previous lab. Take care to disable padding option
+(-p X) to prevent data corruption on the last written NAND block.
 
 Modify the \code{/etc/init.d/rcS} file to mount a JFFS2 filesystem on
 the eighth flash partition (we will declare flash partitions in the



More information about the training-materials-updates mailing list