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.

Kernel crashes on 2nd NOR boot

Other Parts Discussed in Thread: X5777AXGABC, X5777BXGABC

Hi TI

Hi TI 


We have NOR Flash in our custom board and we are able to boot only once i.e.after the Flashing Image content.

Once we do power cycle, we are getting oops message

[   89.330256] [<802069ec>] (jffs2_link_node_ref+0x0/0x1ac) from [<80218384>] (sum_link_node_ref+0x64/0x6c)
[   16.317468] Backtrace:
[   16.320054] [<802069ec>] (jffs2_link_node_ref+0x0/0x1ac) from [<8021837c>] (sum_link_node_ref+0x64/0x6c)
[   16.330042]  r7:c20b4280 r6:c3752c00 r5:00000000 r4:c37765f8
[   16.336036] [<80218318>] (sum_link_node_ref+0x0/0x6c) from [<80218ccc>] (jffs2_sum_scan_sumnode+0x244/0x640)
[   16.346387]  r8:00000000 r7:c37765f8 r6:80975ce4 r5:c3752c00 r4:cd55c600
[   16.353476] [<80218a88>] (jffs2_sum_scan_sumnode+0x0/0x640) from [<8020be34>] (jffs2_scan_medium+0x744/0x15dc)
[   16.364014] [<8020b6f0>] (jffs2_scan_medium+0x0/0x15dc) from [<8020f080>] (jffs2_do_mount_fs+0x1c0/0x664)
[   16.374096] [<8020eec0>] (jffs2_do_mount_fs+0x0/0x664) from [<80211330>] (jffs2_do_fill_super+0xc0/0x290)
[   16.384182] [<80211270>] (jffs2_do_fill_super+0x0/0x290) from [<80211bc4>] (jffs2_fill_super+0xcc/0x108)
[   16.394161]  r7:00000000 r6:00000000 r5:c373a000 r4:00018400
[   16.400152] [<80211af8>] (jffs2_fill_super+0x0/0x108) from [<803e416c>] (mount_mtd_aux.isra.0+0x80/0xcc)
[   16.410141]  r8:80918d64 r7:00000000 r6:00008000 r5:c364f400 r4:c373a000

BR

Antriksh

  • Hi Antriksh,

    Which processor you use?
    What is the version of your SDK/linux kernel?

    Regards,
    Yordan
  • Hi Yordan

    we were using soC X5777AXGABC and it is obsoleted, Currently we are using soC X5777BXGABC.
    glsdk version :- ti-glsdk_dra7xx-evm_6_10_00_02.
    We are using kernel version 3.12.25.

    BR
    Antriksh
  • Hi Antriksh,

    I have forwarded your question to a kernel expert.

    Regards,
    Yordan
  • Thanks Yordan

    BR
    Antriksh
  • Hi Yordon

    We were looking update on the same, if any.

    BR

    Antriksh

  • Antriksh
    We have primarily been supporting QSPI NOR for boot as it requires far less number of pins and is used by most customers and more easily verifiable on our EVMs(to test NOR we will need to carry out some EVM modifications).

    You seem to be using a very old version of the SDK - it will be quite difficult to replicate the test and support on older SDK version.

    Can you also clarify what operations do yo undertake on the first boot , especially with respect to access to NOR flash (read , write operations)
  • Hi Sriram,

    Thanks for replying.

    For Debugging I have disabled the CONFIG_JFFS2_SUMMARY in kernel.

    After that it is getting crashed in the 1st attempt of NOR boot itself.

    When I have analysed further i got to know,it is getting crashed at  "jffs2: jffs2_flash_writev(): Non-contiguous write to "

    which is in  jffs2_flash_writev of fs/jffs2/wbuf.c

    For further debugging i have added dump_stack() before calling BUG() to get stack information.

    [   19.134115] jffs2: jffs2_flash_writev(): Non-contiguous write to 0434aa7c


    [   19.141262] ********Dumping
    [   19.144205] CPU: 1 PID: 1150 Comm: init Not tainted 3.12.25 #31
    [   19.150464] Backtrace:
    [   19.153052] [<800181d4>] (dump_backtrace+0x0/0x10c) from [<80018370>] (show_stack+0x18/0x1c)
    [   19.161948]  r6:c3744c00 r5:ffffffff r4:00000000 r3:00000000
    [   19.167953] [<80018358>] (show_stack+0x0/0x1c) from [<80642168>] (dump_stack+0x74/0xb4)
    [   19.176391] [<806420f4>] (dump_stack+0x0/0xb4) from [<802169bc>] (jffs2_flash_writev+0x498/0x514)
    [   19.185730]  r5:00000000 r4:0434aa7c
    [   19.189505] [<80216524>] (jffs2_flash_writev+0x0/0x514) from [<80216a8c>] (jffs2_flash_write+0x54/0x7c)
    [   19.199397] [<80216a38>] (jffs2_flash_write+0x0/0x7c) from [<802086fc>] (jffs2_mark_node_obsolete+0x4ac/0x654)
    [   19.209932]  r5:c3776d48 r4:c3744c00
    [   19.213714] [<80208250>] (jffs2_mark_node_obsolete+0x0/0x654) from [<8020c04c>] (jffs2_write_inode_range+0x19c/0x2d0)
    [   19.224902] [<8020beb0>] (jffs2_write_inode_range+0x0/0x2d0) from [<802058a0>] (jffs2_write_end+0x100/0x22c)
    [   19.235265] [<802057a0>] (jffs2_write_end+0x0/0x22c) from [<800b32e8>] (generic_file_buffered_write+0xf0/0x274)
    [   19.245901] [<800b31f8>] (generic_file_buffered_write+0x0/0x274) from [<800b4ddc>] (__generic_file_aio_write+0x208/0x458)
    [   19.257440] [<800b4bd4>] (__generic_file_aio_write+0x0/0x458) from [<800b5088>] (generic_file_aio_write+0x5c/0xa4)
    [   19.268341] [<800b502c>] (generic_file_aio_write+0x0/0xa4) from [<800eceac>] (do_sync_write+0x88/0xb0)
    [   19.278145] [<800ece24>] (do_sync_write+0x0/0xb0) from [<800ed948>] (vfs_write+0xb8/0x190)
    [   19.286842]  r7:c20c7f78 r6:7ebcc56c r5:00000180 r4:c3514980
    [   19.292829] [<800ed890>] (vfs_write+0x0/0x190) from [<800edd18>] (SyS_write+0x44/0x78)
    [   19.301171] [<800edcd4>] (SyS_write+0x0/0x78) from [<80014640>] (ret_fast_syscall+0x0/0x30)
    [   19.309963] *****End of Dump

    I am suspecting in jffs2_mark_node_obsolete.I will try to debug further .please let me know if any patch is required.

    Regards,

    Antriksh

  • Hi Sriram,
    I forgot to answer your query.
    After we flash the rootfs.jffs2,uImage,lib.jffs2 and app.jffs2 in NOR flash,we just boot the Device.In the first attempt it got booted successfully.But in 2nd attempt it got crashed.

    Below are few more analysis:
    After I have disabled the CONFIG_JFFS2_SUMMARY in kernel and modified the jffs2_can_mark_obsolete(c) to 0 present in os-linux.h,kernel booted successfully several times without any issue.But the booting from NOR is very slow.

    Please help me in debugging on the same.

    Migrating to processor-SDK will be more tedious task.

    Regards,
    Antriksh
  • Antriksh

    I checked on the support status/plan for NOR flash- we havent validated support for NOR flash or JFFS2 in a while now and there are no plans to take this up in the near future(most customers use QSPI instead)

    i am afraid it will be a challenge to support NOR Flash given the current status

    Regards

    sriram

  • Hello Sriram,

    This has come as a shocker for us ! We have been trying all the while now to gain ground on this NOR booting and now that after much understanding and progress we have hit a DEAD END. This is a show stopper issue for us.
    How come there is no backward compatibility for new Silicon Revision 2(X5777BXGABC) in which the kernel is getting crashed while booting from NOR. But the same used to work fine with older Silicon revision(X5777AXGABC).
    Please let us know how to progress on the same, for our customer will not accept our product without this issue being resoved. Need your co-operation to escalate this issue internally within TI on highest priority and get the same addressed.
    Regards
    Naveen Shetti
  • Naveen
    Parallel NOR was never supported as part of the SDK releases (even on the SDK release version quoted in this thread)- as i mentioned we validate support for QSPI NOR.

    This will be new validation effort and will be a challenge to do so on an older SDK version.

    from the thread so far, it seemed that you were trying to bring up NOR on your custom board for the first time. But from your last post, you are claiming this was working before and identical software does not work when you migrate to newer Silicon - please confirm and add details if there are differences . Do not expect this to Si backward compatibility issues if we are able to read/write/verify access to NOR. Please confirm
  • Hi Sriram,
    As you mentioned Parallel NOR is not supported in the SDK which we use.So can you please let me know in which SDK it is validated.So that we will try to migrate it to the same.

    Regards,
    Antriksh
  • Antriksh
    It is not validated on the current SDKs - will require Board modification to enable Nor and Validate from our side which is currently not planned for. Curious to know if this is first time you are doing a bringup or if you are seeing regression when migrating to a newer Si
    Regards
    Sriram