HW watchdog

Post Reply
themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

HW watchdog

Unread post by themoonlitknight » Mon Jan 14, 2019 7:36 pm

Hello, I have a Odroid C2 with Android 6.0.1. I need to use a hardware watchdog but I can't find a way to use it on Android, since all the guides (like https://wiki.odroid.com/odroid-c2/appli ... hdog_timer) refer to Linux only. I looked into /lib/modules directory and there is nothing similar to gxbb_wdt. Also there is no /dev/watchdog path.

Is it possible to activate it? How?

Thank you!

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: HW watchdog

Unread post by odroid » Tue Jan 15, 2019 8:59 am

Can you build Android OS?
https://wiki.odroid.com/odroid-c2/softw ... ng_android

If yes, you can modify Kernel configuration and device-tree file to enable the WDT.

themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

Re: HW watchdog

Unread post by themoonlitknight » Tue Jan 15, 2019 7:31 pm

Is it possible to build and install the kernel only, without all Android OS?

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: HW watchdog

Unread post by odroid » Wed Jan 16, 2019 8:35 am

Yes, Kernel and DTB should be fine.

themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

Re: HW watchdog

Unread post by themoonlitknight » Thu Jan 17, 2019 9:10 am

I compiled the kernel as specified in https://wiki.odroid.com/odroid-c2/softw ... lchain_492 for Android Marshmallow, after enabled all available wdt drivers:
dw_wdt.ko
gpio_wdt.ko
mena21_wdt.ko
softdog.ko
sp805_wdt.ko
Then I copied them onto the C2 and run

Code: Select all

insmod
for each of them.

Only with softdog I'm able to see the /dev/watchdog file, but actually it's not a hardware watchdog.

Browsing the repo for linux I saw that there exists a meson_gxbb_wdt driver which is not present for Android.

Am I missing something?

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: HW watchdog

Unread post by odroid » Thu Jan 17, 2019 12:04 pm

Device tree file should be considered too.
We will check it.


themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

Re: HW watchdog

Unread post by themoonlitknight » Fri Jan 18, 2019 4:49 am

This is unbelievable for the following reasons:
- you made a commit in no time
- it works

Thanks to the wonderful community

User avatar
rooted
Posts: 6436
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: HW watchdog

Unread post by rooted » Fri Jan 18, 2019 8:07 am

themoonlitknight wrote:This is unbelievable for the following reasons:
- you made a commit in no time
- it works

Thanks to the wonderful community
That's how we roll around here ImageImage

themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

Re: HW watchdog

Unread post by themoonlitknight » Fri Jan 18, 2019 8:38 am

haha I was just surprised that I succeeded in building the kernel with the right driver at the first try :)

User avatar
codewalker
Posts: 521
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Contact:

Re: HW watchdog

Unread post by codewalker » Fri Jan 18, 2019 9:36 am

We've released a new version.
Try to update.
https://wiki.odroid.com/odroid-c2/os_im ... allow_v4.9

themoonlitknight
Posts: 10
Joined: Mon Jul 07, 2014 2:55 am
languages_spoken: english
ODROIDs: C2, C1, U3
Contact:

Re: HW watchdog

Unread post by themoonlitknight » Mon Feb 04, 2019 3:53 am

After I stop the watchdog process in adb shell with "stop watchdogd" the reset is not triggered. Is it normal?
Is there something else keeping it alive? It doesn't seem to respond at all to any write.
It responds to ioctl system call for WDIOC_GETSUPPORT, WDIOC_SETTIMEOUT, WDIOC_GETTIMEOUT, though.

I tried with softdog on /dev/watchdog1 and it does work as expected.

User avatar
codewalker
Posts: 521
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Contact:

Re: HW watchdog

Unread post by codewalker » Mon Feb 18, 2019 11:59 am

Hi, themoonlitknight.
I tested on Ubuntu. the reset is not triggered too.

odroid@odroid:~$ service watchdog stop
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to stop 'watchdog.service'.
Authenticating as: ,,, (odroid)
Password:
==== AUTHENTICATION COMPLETE ===
odroid@odroid:~$

themoonlitknight wrote:
Mon Feb 04, 2019 3:53 am
After I stop the watchdog process in adb shell with "stop watchdogd" the reset is not triggered. Is it normal?
Is there something else keeping it alive? It doesn't seem to respond at all to any write.
It responds to ioctl system call for WDIOC_GETSUPPORT, WDIOC_SETTIMEOUT, WDIOC_GETTIMEOUT, though.

I tried with softdog on /dev/watchdog1 and it does work as expected.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest