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.

AM3517 with PSP 04.02.00.07 doesn't boot ROOTFS image

Other Parts Discussed in Thread: AM3517

Hi,

Trying to bring up board EVM AM3517 from LogicPD, reflashed its Micron NAND chip: x-loader, u-boot, kernel and rootfs using the attached guide. I am a newbie.

Kernel 2.6.37 has been adjusted by me to support ECC scheme BCH8 and there were no memory errors when reading/mounting the rootfs image by the rebuilt kernel. I am using arago original image, downloaded it from their website. Using the following u-boot env args for kernel:

bootargs=mem=128M console=ttyO2,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 rootdelay=4

So it is all going well until I get messages like: modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory

Then, is the next behavior:

Starting syslogd/klogd: done
Starting thttpd.
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes

The rootfs is stuck on this point, please advice?

Yakir

  • It looks like you are using a wrong root filesystem. I quick workaround to the 2nd issue would be:

    check /etc/inittab in the rootfs, make sure you have

    S:2345:respawn:/sbin/getty 115200 ttyO2

    in which 'ttyO2' matches 'console=ttyO2' in your bootargs.

  • Thanks a lot! 

    It was a wrong rootfs, I am using the one from SDK 05.03.02.00, built it and flashed according to the instructions.

    Have another issue, still with booting the rootfs image from my micron nand flash.

    I have pre built an image of the Kernel 2.6.37 with new ECC scheme for BCH8 (micron nand doesn't support the default Hamming it comes with)

    Both Kernel and Rootfs were flashed with ECC HW 1

    Still, not sure why I have these memory inconsistencies:

    [ 10.526885] JFFS2 error: (1) jffs2_build_inode_pass1: child dir "opkg" (ino #4485) of dir ino #4462 appears to be a hard link
    [ 10.549652] JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    [ 10.570251] VFS: Mounted root (jffs2 filesystem) on device 31:4.
    [ 10.576934] Freeing init memory: 184K
    [ 11.548461] JFFS2 notice: (506) check_node_data: wrong data CRC in data node at 0x00201f08: read 0xeef7e766, calculated 0x390e2e43.
    [ 18.039184] davinci_mdio davinci_mdio: resetting idled controller
    [ 18.046813] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=ffffffff:00, id=7c0f1)
    [ 21.045471] PHY: ffffffff:00 - Link is Up - 100/Full
    [ 33.897613] JFFS2 notice: (504) check_node_data: wrong data CRC in data node at 0x00337e10: read 0xc97db008, calculated 0xb29b9e0f.
    [ 92.705047] JFFS2 notice: (504) read_dnode: wrong data CRC in data node at 0x00a791a0: read 0x2cd02283, calculated 0x27b6f7fd.
    [ 94.977294] JFFS2 notice: (504) check_node_data: wrong data CRC in data node at 0x00abb96c: read 0x21203d6a, calculated 0x5456027c.
    [ 237.591735] JFFS2 notice: (504) read_dnode: wrong data CRC in data node at 0x09b01250: read 0xfaf81381, calculated 0xf8bd444.

    Then the booting is stuck.

    But ..... at the second time it has succeeded. Still, once in a while during runtime, I get those CRC messages. 

    Then tried to re-flash the unit another time with BCH4 but god decoding errors on rootfs.

    Tried to reflash rootfs image using "nandecc hw 1", "nandecc bch4_sw" and "nandecc bch8_sw" while for the last two the kernel was changed and recompiled appropriately.

    No success, got the following log most of the time:

    [ 10.604431] JFFS2 error: (1) jffs2_build_inode_pass1: child dir "opkg" (ino #4485) of dir ino #4462 appears to be a hard link
    [ 10.626953] JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    [ 10.648468] VFS: Mounted root (jffs2 filesystem) on device 31:4.
    [ 10.655151] Freeing init memory: 200K
    [ 13.898986] JFFS2 error: (662) jffs2_do_read_inode_internal: Argh. Special inode #4483 with mode 0xa1ff had more than one node
    [ 13.911285]
    [ 13.911285] =====================================
    [ 13.917755] [ BUG: bad unlock balance detected! ]
    [ 13.922698] -------------------------------------
    [ 13.927642] sh/662 is trying to release lock (&f->sem) at:
    [ 13.933441] [<c01be460>] jffs2_iget+0x80/0x324
    [ 13.938079] but there are no more locks to release!
    [ 13.943206]
    [ 13.943206] other info that might help us debug this:
    [ 13.950073] 1 lock held by sh/662:
    [ 13.953643] #0: (&sb->s_type->i_mutex_key#4){+.+.+.}, at: [<c01040d8>] do_lookup+0x98/0x130
    [ 13.962646]
    [ 13.962646] stack backtrace:
    [ 13.967254] [<c004a348>] (unwind_backtrace+0x0/0xec) from [<c009ff8c>] (print_unlock_inbalance_bug+0x98/0xc8)
    [ 13.977691] [<c009ff8c>] (print_unlock_inbalance_bug+0x98/0xc8) from [<c00a046c>] (lock_release+0x1e0/0x214)
    [ 13.988037] [<c00a046c>] (lock_release+0x1e0/0x214) from [<c040f324>] (__mutex_unlock_slowpath+0xcc/0x134)
    [ 13.998168] [<c040f324>] (__mutex_unlock_slowpath+0xcc/0x134) from [<c01be460>] (jffs2_iget+0x80/0x324)
    [ 14.008056] [<c01be460>] (jffs2_iget+0x80/0x324) from [<c01b2870>] (jffs2_lookup+0xc8/0xfc)
    [ 14.016845] [<c01b2870>] (jffs2_lookup+0xc8/0xfc) from [<c0104024>] (d_alloc_and_lookup+0x44/0x60)
    [ 14.026275] [<c0104024>] (d_alloc_and_lookup+0x44/0x60) from [<c01040fc>] (do_lookup+0xbc/0x130)
    [ 14.035491] [<c01040fc>] (do_lookup+0xbc/0x130) from [<c01060f8>] (link_path_walk+0x668/0xae0)
    [ 14.044555] [<c01060f8>] (link_path_walk+0x668/0xae0) from [<c0106658>] (path_walk+0x44/0x94)
    [ 14.053497] [<c0106658>] (path_walk+0x44/0x94) from [<c01066cc>] (do_path_lookup+0x24/0x4c)
    [ 14.062286] [<c01066cc>] (do_path_lookup+0x24/0x4c) from [<c0106fe8>] (user_path_at+0x54/0x8c)
    [ 14.071350] [<c0106fe8>] (user_path_at+0x54/0x8c) from [<c00ff0a0>] (vfs_fstatat+0x28/0x50)
    [ 14.080108] [<c00ff0a0>] (vfs_fstatat+0x28/0x50) from [<c00ff1a4>] (sys_stat64+0x18/0x34)
    [ 14.088714] [<c00ff1a4>] (sys_stat64+0x18/0x34) from [<c0044540>] (ret_fast_syscall+0x0/0x3c)
    [ 14.097808] iget() failed for ino #4483
    [ 16.643768] davinci_mdio davinci_mdio: resetting idled controller
    [ 16.650878] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=ffffffff:00, id=7c0f1)
    [ 19.647521] PHY: ffffffff:00 - Link is Up - 100/Full
    [ 26.013854] JFFS2 error: (887) jffs2_do_read_inode_internal: Argh. Special inode #4484 with mode 0xa1ff had more than one node
    [ 26.026000] iget() failed for ino #4484

    Please advise,

    Yakir

  • was it possible to boot from NAND with this kernel probably in usual manner, not BCH8?

  • Have you tried using 1-bit hamming code? There are some know issues with the BCH8 algorithm. I don't have an AM3517 setup with me. Could you please send me the files drivers/mtd/nand/nand_base.c, drivers/mtd/nand/omap2.c to the mail id renjith.thomas@pathpartnertech.com?

  • Yes, I have and I have also sent you an email with the files plus nand datasheet.

    It's minimal requirements for error correction are BCH4. Used hamming in the kernel before figuring that fact out.

    Future thanks

  • Maxim,

    The answer is no.

    For example, using original uImage brings full of the following prints:

    mtd->read(0x4dc bytes from 0xe2ab24) returned ECC error
    [ 15.486297] mtd->read(0x44 bytes from 0xe2ab24) returned ECC error
    [ 15.507202] mtd->read(0x44 bytes from 0xe2ab24) returned ECC error
    [ 15.513977] mtd->read(0x3d bytes from 0xe2ab68) returned ECC error
    [ 15.544219] mtd->read(0x5c4 bytes from 0x852ca3c) returned ECC error
    [ 15.551391] mtd->read(0x3f4 bytes from 0x852840c) returned ECC error
    [ 15.573699] mtd->read(0x574 bytes from 0x852b28c) returned ECC error
    [ 15.580505] JFFS2 notice: (668) read_dnode: wrong data CRC in data node at 0x0852b28c: read 0xc6999b6d, calculated 0x2745b446.
    [ 15.686767] JFFS2 warning: (680) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 15.695373] JFFS2 warning: (680) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 15.704498] iget() failed for ino #11
    [ 15.857269] JFFS2 warning: (692) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 15.865966] JFFS2 warning: (692) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 15.875091] iget() failed for ino #11
    [ 15.938385] JFFS2 warning: (694) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 15.946990] JFFS2 warning: (694) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 15.956115] iget() failed for ino #11
    [ 16.010864] JFFS2 warning: (696) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 16.019470] JFFS2 warning: (696) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 16.028625] iget() failed for ino #11
    [ 16.280731] JFFS2 warning: (690) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 16.289337] JFFS2 warning: (690) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 16.298461] iget() failed for ino #11
    [ 16.453826] JFFS2 warning: (716) jffs2_get_inode_nodes: Eep. No valid nodes for ino #11.
    [ 16.462463] JFFS2 warning: (716) jffs2_do_read_inode_internal: no data nodes found for ino #11
    [ 16.471588] iget() failed for ino #11
    [ 16.487762] mtd->read(0x214 bytes from 0x852b5ec) returned ECC error
    [ 16.495666] Node CRC 0000011e != calculated CRC 6b5a72c9 for node at 000bbedc
    [ 16.504669] mtd->read(0x44 bytes from 0x852b5ec) returned ECC error
    [ 16.511596] mtd->read(0x8 bytes from 0x852b630) returned ECC error
    [ 16.518157] JFFS2 error: (713) jffs2_do_read_inode_internal: Argh. Special inode #4484 with mode 0xa1ff had more than one node
    [ 16.554565] iget() failed for ino #4484
    [ 16.613494] mtd->read(0x524 bytes from 0x852f2dc) returned ECC error
    [ 16.620758] mtd->read(0x568 bytes from 0x852f298) returned ECC error
    [ 16.628295] mtd->read(0x44 bytes from 0x852f2dc) returned ECC error
    [ 16.668884] mtd->read(0x44 bytes from 0x852f2dc) returned ECC error
    [ 16.675903] mtd->read(0xd bytes from 0x852f320) returned ECC error
    [ 16.767791] mtd->read(0x4d0 bytes from 0x852f330) returned ECC error

  • if it helps:

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/202990.aspx

  • Solved the NAND Error problem !!!

    I have reflashed the nand with kernel supporting BCH8 and flashed rootfs with "nandecc bch8_sw". The kernel itself is flashed with "nandecc hw 1".

    Worked for my flash.

    Thanks,

    Yakir

  • Yakir,

    You are using sw ecc here. I'm not sure about the performance here. Hardware BCH8 has some issues, but can make it work.

  • Yes, actually now I also tried to flash the rootfs image using "nandecc hw 1" [FS Layout] and it was also without errors, clean as for bch8

    So, I think before there was another problem related to jffs2 image creation. I have used the -q option for mkfs.jffs2 tool and it caused problem in the boot-up of rootfs. Couldn't execute the init, I think. Now the image, without the -q option, working good.

    Many thanks !!

    Yakir

  • -q, --squash
    Squash permissions and owners, making all files be owned by root and removing write permission for 'group' and 'other'.

    how does it relate to JFFS2 errors?? I don't think so

  • You are correct, it is not related to jffs2 errors, just another problem I had during the rootfs image bringup.