BelaPlatform / bela-image-builder

Scripts to build a Bela image from scratch
MIT License
36 stars 16 forks source link

shutdown -h now does not turn off PWR LED on PocketBeagle #71

Closed giuliomoro closed 2 years ago

giuliomoro commented 5 years ago

[testing below done with a v2019.01-r3 uboot]. There is a kernel panic at shutdown:

[   70.503052] rtc_power_off failed, bailing out.
[   70.513483] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[   70.513483]
[   70.522696] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[   70.522696]

This, combined with

root@bela:~# hwclock -f /dev/rtc0 --debug
hwclock from util-linux 2.29.2
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
select() to /dev/rtc0 to wait for clock tick timed out...synchronization failed

* seems to indicate that there is a problem in the RTC (see here).

This means that RCN's suggestion here that it was an u-boot related issue may be inaccurate (given how we are now running a uboot with said patch).

*: Note that on BeagleboneBlack, we get:

hwclock -f /dev/rtc0 --debug
hwclock from util-linux 2.29.2
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2000/01/01 00:01:55
Hw clock time : 2000/01/01 00:01:55 = 946684915 seconds since 1969
Time since last adjustment is 946684915 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2000-01-01 00:01:54.091528+0000

which is what we would expect on the PB as well.

giuliomoro commented 2 years ago

sorted with 4.14 kernel