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.

OMAPL137 EVM Nand Flash: Erase at 0x06680000 failed immediately: errno -5

Hi,

I boot up the OMAPL137 EVM with the User Interface Module attached(both are  from SPI) and try to work with the nand flash on the UIM. When I mount the nand flash, it shows the following errors or warnings:

root@192.168.71.4:/mnt# mount -t jffs2 /dev/mtdblock3 /mnt/nand4G
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
Empty flash at 0x0000012c ends at 0x00000800
Erase at 0x06680000 failed immediately: errno -5

Despite these errors, I can find the content that was wrote to the nand flash. And I know "Empty flash at 0x0000012c ends at 0x00000800" is due to the nand flash is partially written. But it still confuses me how come the "Erase at 0x06680000 failed immediately: errno -5". Even google can't find much about it.

And another problem which maybe I should open another thread to ask: The board boot up with NFS. The network file system is on a linux host(VMPlayer ubuntu). I can access the nand flash on the board using Tera Terminal, but on the linux host, cannot find the the content at the supposed mount point in NFS. The NFS seems working well. Files created/deleted in directory: /opt on either end can be find on the other.

Please help me,

thanks!

Ming

  • Hi Ming,

    1. Are the commands like "nand write" or "nand erase" are successful on NAND flash?

    By any chance you looked into this WIKI:http://processors.wiki.ti.com/index.php/Put_JFFS2_Image_to_Flash

     

    Regards,

    Shankari

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

     

     

  • Hi Shankari,

    Thank you for your quick response! 

    "CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0" warning disappeared after make jffs2 with parameter "--no-cleanmarker". But "Erase at 0x06680000 failed immediately: errno -5" sometime still pop up.

    Both "flash_eraseall" and "nandwrite" works. I use them as follows:

    root@192.168.71.4:/# ls
    bin dev home media opt root srv tmp var
    boot etc lib mnt proc sbin sys usr
    root@192.168.71.4:/# cd tmp
    root@192.168.71.4:/tmp# ls
    root@192.168.71.4:/tmp# mkdir jffs2
    root@192.168.71.4:/tmp# cd jffs2/
    root@192.168.71.4:/tmp/jffs2# ls
    root@192.168.71.4:/tmp/jffs2# touch readme.txt
    root@192.168.71.4:/tmp/jffs2# mkdir data
    root@192.168.71.4:/tmp/jffs2# ls
    data readme.txt
    root@192.168.71.4:/tmp/jffs2# cd ..
    root@192.168.71.4:/tmp# mkfs.jffs2 -d jffs2 -o jffs2.img --no-cleanmarker
    root@192.168.71.4:/tmp# ls
    jffs2 jffs2.img

    root@192.168.71.4:/tmp# cat /proc/mtd
    dev: size erasesize name
    mtd0: 00020000 00020000 "bootloader"
    mtd1: 00020000 00020000 "params"
    mtd2: 00200000 00020000 "kernel"
    mtd3: 1fdc0000 00020000 "filesystem"
    mtd4: 00040000 00001000 "U-Boot"
    mtd5: 00004000 00001000 "U-Boot Environment"
    mtd6: 003bc000 00001000 "Linux"
    root@192.168.71.4:/tmp# flash_eraseall /dev/mtd3
    Erasing 128 Kibyte @ 6680000 -- 20 % complete.
    flash_eraseall: /dev/mtd3: MTD Erase failure: Input/output error
    Erasing 128 Kibyte @ 68a0000 -- 20 % complete.
    Skipping bad block at 0x068c0000
    Erasing 128 Kibyte @ 1fd20000 -- 99 % complete.
    Skipping bad block at 0x1fd40000

    Skipping bad block at 0x1fd60000

    Skipping bad block at 0x1fd80000

    Skipping bad block at 0x1fda0000

    root@192.168.71.4:/tmp# nandwrite -p /dev/mtd3 jffs2.img
    Writing data to block 0
    root@192.168.71.4:/tmp# ls
    jffs2 jffs2.img
    root@192.168.71.4:/tmp# cd ..
    root@192.168.71.4:/# ls
    bin dev home media opt root srv tmp var
    boot etc lib mnt proc sbin sys usr
    root@192.168.71.4:/# mount -t jffs2 /dev/mtdblock3 /mnt/nand4G/
    root@192.168.71.4:/# ls
    bin dev home media opt root srv tmp var
    boot etc lib mnt proc sbin sys usr
    root@192.168.71.4:/# cd mnt
    root@192.168.71.4:/mnt# ls
    debugfs nand4G
    root@192.168.71.4:/mnt# cd nand4G/
    root@192.168.71.4:/mnt/nand4G# ls
    data readme.txt
    root@192.168.71.4:/mnt/nand4G# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    rootfs 19609276 14108384 4504796 76% /
    /dev/root 19609276 14108384 4504796 76% /
    tmpfs 14336 4 14332 1% /tmp
    tmpfs 10240 296 9944 3% /dev
    tmpfs 14336 4 14332 1% /dev/shm
    /dev/mtdblock3 521984 11908 510076 3% /mnt/nand4G
    root@192.168.71.4:/mnt/nand4G# Erase at 0x06680000 failed immediately: errno -5
    Erase at 0x06680000 failed immediately: errno -5

    root@192.168.71.4:/mnt/nand4G# ls
    data readme.txt
    root@192.168.71.4:/mnt/nand4G# cd ..
    root@192.168.71.4:/mnt# ls
    debugfs nand4G
    root@192.168.71.4:/mnt#

    "/mnt/nand4G" is my mount point for the nand flash. The above log is from Tera Terminal. So it seems I can access the nand flash from Tera Terminal. But in the linux host(VMPlayer), it shows nothing when I open the "mnt/nand4G" in the exported NFS directory.

    May you help me with that?

    Thanks,

    Ming