pocket beagle not clean shutdown?

254 views
Skip to first unread message

Fred Kerr

unread,
Mar 16, 2018, 5:13:18 PM3/16/18
to BeagleBoard
Using the serial connection to bacon bits cape to pocket beagle, it seems that it doesn't shut down cleanly?

debian@beaglebone:~/src$ sudo shutdown -h now
[85060.880449] reboot: Power down
[85063.372620] rtc_power_off failed, bailing out.
[85063.398178] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00
[85063.398178] 
[85063.407436] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.9.82-ti-r102 #1
[85063.414625] Hardware name: Generic AM33XX (Flattened Device Tree)
[85063.420846] [<c0114468>] (unwind_backtrace) from [<c010dd20>] (show_stack+0x)
[85063.428686] [<c010dd20>] (show_stack) from [<c07451e0>] (dump_stack+0x80/0x9)
[85063.436003] [<c07451e0>] (dump_stack) from [<c0272c90>] (panic+0x100/0x28c)
[85063.443055] [<c0272c90>] (panic) from [<c0144220>] (complete_and_exit+0x0/0x)
[85063.450450] [<c0144220>] (complete_and_exit) from [<c0165b88>] (SyS_reboot+0)
[85063.458545] [<c0165b88>] (SyS_reboot) from [<c0108f80>] (ret_fast_syscall+0x)
[85063.466330] ---[ end Kernel panic - not syncing: Attempted to kill init! exi0
[85063.466330] 


Robert Nelson

unread,
Mar 16, 2018, 5:16:48 PM3/16/18
to Beagle Board, fek...@gmail.com
It's fine, the mmc/drive was already down.

We just need to figure out the proper way to tell the RTC to power off
the unit..

Regards,

--
Robert Nelson
https://rcn-ee.com/

beatb...@gmail.com

unread,
Apr 4, 2018, 9:55:41 AM4/4/18
to BeagleBoard
The problem seems to be, that the rtc has no active oscillator:
If I set RTC_OSC_REG to 0x40 (internal oscillator) shutdown works normal.
But I'm not sure whether this is the correct way to solve this issue.

Regards
Beat Bieler

Robert Nelson

unread,
Apr 5, 2018, 2:58:40 PM4/5/18
to Beagle Board, beatb...@gmail.com
Thanks guys, with the help of Matthijs, we have this implement in
u-boot and the kernel..

My PocketBeagle now shut's down..

You can get the updated bootloader via:

debian@beaglebone:~$ sudo /opt/scripts/tools/developers/update_bootloader.sh

I've also add a print statement about the RTC

U-Boot 2018.03-00002-gac9cce7c6a (Apr 05 2018 - 13:07:46 -0500),
Build: jenkins-github_Bootloader-Builder-47

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: Internal. <-------------------

Pocket: Internal
BeagleBone Black: External

Right now only v4.16.0-bone7 has the kernel change, and it's building right now

http://gfnd.rcn-ee.org:81/farm/deb/

I'll start the backport shortly to previous kernels..

kristianbe...@gmail.com

unread,
Mar 19, 2019, 2:23:59 PM3/19/19
to BeagleBoard
How exactly do i change the value of the register? I have no idea which file to look for 

Robert Nelson

unread,
Mar 19, 2019, 2:41:17 PM3/19/19
to Beagle Board, kristianbe...@gmail.com
On Tue, Mar 19, 2019 at 1:23 PM <kristianbe...@gmail.com> wrote:
>
> How exactly do i change the value of the register? I have no idea which file to look for

The default BeagleBoard images already take care of this issue now..

Are you trying to modify that register in a non-u-boot, non-linux OS?

Robert Nelson

unread,
Mar 19, 2019, 4:30:39 PM3/19/19
to Beagle Board, Kristian Bertram
On Tue, Mar 19, 2019 at 3:09 PM Kristian Bertram
<kristianbe...@gmail.com> wrote:
>
> No, i just have to use kernel 4.9 because og some legacy code unfortunately, so the issues is still there for me

Well it's a two part fix.

1: u-boot has to set the correct rtc bit:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2018.09/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch#L173-L195

2: the kernel has to have the correct bit set:

https://github.com/beagleboard/linux/blob/4.9/arch/arm/boot/dts/am335x-pocketbeagle-common.dtsi#L1127-L1129

When those two are set, it'll properly shutdown.
Reply all
Reply to author
Forward
0 new messages