[U-Boot-Users] Problems with root JFFS2 on NAND Flash

Stuart Wood
2008-06-26T17:27:20Z

Hi Grant,

Tried what you said including patching mkfs.jffs2 and I'm now getting
these errors

jffs_check_nand_cleanmarker returned 1
jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
at 00298000
OOB at 00298000 was cf 0c 3f c3 ff ff cc 0f ff ff ff ff ff ff ff ff
jffs_check_nand_cleanmarker returned 1
jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block
at 0029c000
OOB at 0029c000 was 3f 00 cf f0 ff ff 0f 33 ff ff ff ff ff ff ff ff
jffs_check_nand_cleanmarker returned 1
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c000:
0x138e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c004:
0x1358 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c008:
0x33cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c00c:
0x73c8 instead

This seems to imply that the kernel is looking for the clean markers.
If they are not needed
with NAND flash then why would it look for them? I did not see
anything in the kernel configs
for JFFS2 that would tell it to use use them.

As I said before this is kernel 2.6.18, an older version of build root
using mtd_20050122

Any other thoughts?

Stuart
On Fri, Jun 13, 2008 at 11:54 AM, Grant Erickson
<gerickson@nuovations.com> wrote:

> On 6/13/08 7:45 AM, Stuart Wood wrote:
>> I'm having some new problems with my jffs2 root file system when it is
>> mounted the first time from small page nand flash.
>> I'm pretty sure its some sort of configuration problem but the web
>> hasn't helped so far.
>>
>> [ ... ]
>>
>> The jffs2 image is being built with this command from Buildroot:
>>
>> # Use fakeroot so mkfs.jffs2 believes the previous fakery
>> echo
>> "/home/stuart/ArmLinux/buildroot/toolchain_build_arm_nofpu/mtd_orig/util/mkfs.
>> jffs2
>> -e 0x4000 -p -l -s 0x200 -n -D target/generic/device_table.txt -d
>> /home/stuart/ArmLinux/buildroot/build_arm_nofpu/root -o
>> /home/stuart/ArmLinux/buildroot/rootfs.arm_nofpu.jffs2" \
>>>> /opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
>> chmod a+x /opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
>> /opt/buildroot/usr/bin/fakeroot --
>> /opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
>> rootdir=/home/stuart/ArmLinux/buildroot/build_arm_nofpu/root
>> table='target/generic/device_table.txt'
>> mkfs.jffs2: skipping device_table entry '/dev': no parent directory!
>> mkfs.jffs2: skipping device_table entry '/tmp': no parent directory!
>> mkfs.jffs2: skipping device_table entry '/etc': no parent directory!
>
> Regarding the above three errors, you may be interested in the following
> patch and referenced thread:
>
> http://lists.infradead.org/pipermail/linux-mtd/2008-June/022008.html
>
>> u-boot> nand erase clean 500000 1b00000
>
> I cannot speak to your specific board; however, I found that 'clean' was not
> necessary and used the following sequence to write a JFFS2 image to Samsung
> small-page NAND on my PPC405EXr-based board:
>
> => tftp 800000 root.img
> => nand erase 800000 1400000
> => nand write.i ${fileaddr} 800000 ${filesize}
>
> Adjust sizes and offsets accordingly for your board.
>
> Regards,
>
> Grant Erickson
>
>
>

--
Stuart Wood

Lab X Technologies, LLC
176 Anderson Ave.
Suite 302
Rochester, NY 14607
Phone: (585) 271-7790 x207
Fax: (585) 473.4707