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.

AM335x: Kernel panic is happen when Linux is shutdown

Guru 24520 points

Hi community member,

Would you please provide your advice for phenomenon?

[Phenomenon]

 When we input the shutdown command on Linux, it showed "Kernel Panic" on console.

[Command]

  shutdown -h now

[Console]

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

[   85.525547] musb-hdrc musb-hdrc.0.auto: USB bus 2 deregistered

[   85.532576] Disabling non-boot CPUs ...

[   85.536758] Power down.

[   85.539376] System will go to power_off state in approx. 2 secs

[   85.548014] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000

[   85.548014]

[   85.557629] [<c0013558>] (unwind_backtrace+0x0/0xe0) from [<c05e6410>] (panic+0x84/0x1e0)

[   85.566198] [<c05e6410>] (panic+0x84/0x1e0) from [<c00408cc>] (do_exit+0x438/0x874)

[   85.574226] [<c00408cc>] (do_exit+0x438/0x874) from [<c004f478>] (sys_reboot+0x128/0x1b8)

[   85.582794] [<c004f478>] (sys_reboot+0x128/0x1b8) from [<c000d880>] (ret_fast_syscall+0x0/0x30)

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

If you have any question, please let me know.

Best regards,

Kaka

  • Hi Kaka,
    Is this from EVM board or custom board ?
    What kinf of boot are you doing (boot method : NAND, SD, etc.,) ?
  • Hi Stalin,
    Thank you for your reply.

    We observed this phenomenon on BBB. And this board was booting from eMMC which it was programmed on factory.

    Best regards.
    Kaka
  • Hi Kato,
    I've tried it on AM335x starter kit and not facing any problem.
    But I did it in SD card boot mode with SDK 7.0 (linux 3.12)
    What about your SDK version & kernel ?
    Attach your complete shutdown log.
  • Hi Stalin,
    Thank you for your confirming.
    We also had checked whether this phenomenon will be occurred with Starterkit and SDK version7. As a result, we could not confirmed this phenomenon as you can see.
    As I described in my previous post, I used the Beagle bone black board and used the pre-programmed image for boot.
    I think this image is Linux 3.8(Angstrom). Please see this URL: http://beagleboard.org/latest-images

    And I understand that we should discuss about this topic in Begalebone.org community, but we need your help as soon as possible.
    Thus, your advice are very helpful for us.

    Best regards.
    Kaka

  • Hi Kaka,

    I checked with pre build images from SDK 7 and "shutdown -h now" works well on my BBB. Do you use a custom board or changed the kernel?
     
    BR
    Ivan

  • As Ivan also confirmed that TI SDK doesn't have that problem on both TI AM335x starter kit and BBB board.

    http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/132451.html
    https://groups.google.com/forum/#!topic/rtc-linux/cj2UnFPRdcc

    I think, the source code you are using is the similar to above link, so you need to put your PMIC shutdown code for the processor before "while(1)" loop if your product is battery operated.
  • Hi Iavn
    Thank you for your response.

    We used the BBB board and Linux image is Linux 3.8(Angstrom). Please see this URL: http://beagleboard.org/latest-images.
    I will check the behavior in case of using SDK7.0
    Best regards.
    Kaka
  • Hi Stalin,
    Thank you for your advice.
    I will confirm this phenomenon in case of using the SDK7.
    If we do not meet this phenomenon, we will request to customer to see the difference in SDK and BBB kernel.

    Best regards.
    Kaka

  • Hi Ivan, Stalin,

    I checked the behavior of BBB with using SDK7. As a result, this phenomenon did not occurred.
    Also I checked the output power of PMIC(TPS65217C). The power lines are enabled even though Linux was shutdown.
    On the other hands, some power lines are disabled in case of using the Linux 3.8(Angstrom).
    * I would like to know why the power line of LDO3 and LDO4 of TPS65217C were not disabled even though the Linux is shutdown.

    I think that the PMIC power is why this phenomenon was occurred. How do you think of this?

    Best regards.
    Kaka
  • I didn't see the PMIC power off control in SDK7.0, I'm not sure why.

    I think, you can apply the patch from the following link to do that.

    https://groups.google.com/forum/#!topic/rtc-linux/yKfIpoD5gRI
    Please note that it is not developed by TI so it is purely depends on the customer risk.

    If it is SDK7.0, you have to put the PMIC shutdown code before "while(1)" in "machine_halt"
    The "arch/arm/kernel/process.c" last file accessed by the kernel while power off so you can also put power down code (PMIC seq for processor shutdown) before "while(1)"
  • Hi Stalin,
    Thank you for your opinion.
    I will inform your introduced URL and comments to my customer.

    Best regards.
    Kaka