This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467T LINUX BOOT WITH JFFS2 Process

hi,

How can I boot my dm6467t with the jffs2 file system on the flash use the embeded linux ?Can you give me some guide on the process or some files or some links?

 

best regards,

  • Hello,

    You can try the following:

    First, boot linux using some convinient rootfs like NFS. Then, flash NAND JFFS2 from kernel:

    flash_eraseall -j /dev/mtd3
    mkdir /mnt/nand
    mount -t jffs2 /dev/mtdblock3 /mnt/nand
    cd /mnt/nand
    tar -xf <flash-filesystem.tar>
    umount /mnt/nand

    Now, boot from this mtdblock by setting bootargs correctly from U-Boot:

    setenv bootargs 'mem=116M console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=jffs2 ip=dhcp'

    Thanks,

    Sekhar

  • Hi,

    I'm trying to follow your indications to write a filesystem into the flash, but I find an error while mounting the jffs2 filesystem:

    The command returns (after a long while) the following message:

    root@dm6467t-evm:/opt# mount -t jffs2 /dev/mtdblock3 /mnt/nand
    mount: mounting /dev/mtdblock3 on /mnt/nand failed: Input/output error

    And the remote console shows the following:

    ...

    ...

    Empty flash at 0x0798d034 ends at 0x0798f000
    Empty flash at 0x0798f034 ends at 0x07990000
    Empty flash at 0x07990034 ends at 0x07992000
    Empty flash at 0x07992034 ends at 0x07993000
    Empty flash at 0x07993034 ends at 0x07994000
    Empty flash at 0x07994034 ends at 0x07995800
    Empty flash at 0x07995834 ends at 0x07996800
    Empty flash at 0x07996834 ends at 0x07997800
    Empty flash at 0x07997834 ends at 0x07998800
    Empty flash at 0x07998834 ends at 0x07999800
    Empty flash at 0x07999834 ends at 0x0799b000
    Empty flash at 0x0799b034 ends at 0x0799c000
    Empty flash at 0x0799c034 ends at 0x0799e000
    Empty flash at 0x0799e034 ends at 0x0799f800
    Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
    empty_blocks 0, bad_blocks 358, c->nr_blocks 981

    What does it mean? What can I do to solve it and step further?

    Thanks!

    P.D.: The flash_eraseall command ended like this:

    ...

    Erasing 128 Kibyte @ 7900000 -- 98 % complete. Cleanmarker written at 7900000.
    Skipping bad block at 0x07920000
    Erasing 128 Kibyte @ 7940000 -- 98 % complete. Cleanmarker written at 7940000.
    Skipping bad block at 0x07960000
    Erasing 128 Kibyte @ 79a0000 -- 99 % complete. Cleanmarker written at 79a0000.
    Skipping bad block at 0x079c0000
    Erasing 128 Kibyte @ 79e0000 -- 99 % complete. Cleanmarker written at 79e0000.
    Skipping bad block at 0x07a00000
    Erasing 128 Kibyte @ 7a40000 -- 99 % complete. Cleanmarker written at 7a40000.
    Skipping bad block at 0x07a60000
    Erasing 128 Kibyte @ 7aa0000 -- 100 % complete.Cleanmarker written at 7a80000.

    What I understand is that it means the command has ended ok.

  • Gerard,

    Are you sure that what you have in Flash is a valid JFFS2 file system?
    You might want to double check that.

    Additionally the kernel need to be enabled to support it.

    The following Twiki page should help even if it is not directly targeting DM6467:
               http://processors.wiki.ti.com/index.php/Category:File_system
    see Filesystem_in_NOR_or_NAND,  Create a JFFS2 Target Image, Put JFFS2 Image to Flash

  • Hi,

    Now everything works ok. To solve, I've done an install from scratch of the DVSDK, because I had

    the kernel configurations cluttered with changes. Then, I've followed the Twiki pages indications, and

    finally got the nand flash correctly written.

    Thanks for your advices!

     

    Regards,

    Gerard.

  • Hi,

    I've got the same problem.

    I can't successfully write a file system image in nand because there are too many bad sectors and it's size is too large too fit in

    I've executed :nandtest

    root@dm6467t-evm:~# nandtest /dev/mtd3
    ECC corrections: 0
    ECC failures   : 0
    Bad blocks     : 441
    BBT blocks     : 0
    Bad block at 0x00000000
    Bad block at 0x00020000
    Bad block at 0x00040000
    00060000: writing...
    write: Input/output error
    00080000: writing...
    write: Input/output error
    Bad block at 0x000a0000
    000c0000: writing...
    write: Input/output error

     

    441 bad sectors seems to many to me. Maybe I had something wrong and nandwrite or flash_eraseall marked incorrecly some sectors as bad.

    I can successfully write ubl, u-boot and the kernel image using sfh_dm646x utility and nand commands while in u-boot.

     

    Any suggestions?? How I can erase the Bad sector table? Is that a good idea?