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.

AM57x Linux startup error

How do I fix linux startup error: [FAILED] Failed to start Synchronize System and HW clocks.

I am running the sdk-linux-am57xx-evm-03.00.00.04 on a custom am57xx board.

Linux does power up all the way to the cmd prompt and seems to be working as best as I can tell,  but I am concerned about this error.

I've done many searches through the linux kernel source and I can not seem to find where this error is generated in the linux source code.

what does it mean?   How do I diagnose and fix it?

  • Hi Tom,

    what does it mean?

    It means that the system failed to sync the system time with the hw clock (rtc).

    How do I diagnose and fix it?

    You should be able to sync the system time with the hw clock through user space commands like hwclock:

    date --set "<current date>"

    hwclock --systohc --localtime

    Best Regards,
    Yordan
  • OK I think part of the problem is our custom board is different than the am57xx evm (which I'm leveraging the device tree from) because the am57xx has "rtc0" = mcp_rtc = microchip mcp7941x, and our custom board does not.

    in the am57xx -evm device tree, there are three rtc's.

    aliases {
    rtc0 = &mcp_rtc;
    rtc1 = &tps659038_rtc;
    rtc2 = &rtc;

    rtco 0 is a microchip mcp7941x. our custom board does not have this rtc.
    We do however have rtc1 and rtc2.

    So I changed the following lines in the .config file. They used to point to "rtc0" . Now they point to "rtc2":

    CONFIG_RTC_HCTOSYS_DEVICE="rtc2"
    CONFIG_RTC_SYSTOHC_DEVICE="rtc2"

    However, after recompiling zImage, rebooting, I still got the same error I originally reported:
    [FAILED] Failed to start Synchronize System and HW clocks.

    I also see these additional errors in the linux boot log:

    [ 1.352278] hctosys: unable to open rtc device (rtc2)
    [ 13.935890] rtc-ds1307: probe of 2-006f failed with error -5
    [ 13.981019] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc2


    Prior to changing "rtc0" -> "rtc2", the errors looked like this (previous zImage):

    [ 1.352754] hctosys: unable to open rtc device (rtc0)
    [ 10.907593] rtc-ds1307: probe of 2-006f failed with error -5
    [ 10.980178] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc2

    So of course when I try to execute the cmds you listed, I get an error:

    root@am57xx-evm:~# date
    Wed Nov 2 20:16:34 UTC 2016
    root@am57xx-evm:~# hwclock --systohc --localtime
    hwclock: can't open '/dev/misc/rtc': No such file or directory



    Any more suggestions what may be wrong?
  • Hi,

    Sorry for the delayed respnose.

    In that case it seems, that your RTC node in the device tree is not configured properly..
    Do you call the correct compatible driver? Can you share the dts?

    Best Regards,
    Yordan