moxa-it87-wdt-driver
Moxa IT87 Watchdog Timer Driver
moxa-it87-wdt-driver
: Watchdog Timer Driver for ITE IT87xx Environment Control
Support Models
- DA Series:
- MC Series:
- V Series:
- EXPC Series:
Source Code Link
For Kernel Version >= 5.x
For Kernel Version >= 4.x
info
Please install moxa-it87-wdt-driver (5.x) on CentOS 7.9
What Tools Depend On?
Watchdog deamon from Linux Distributions
- Debian: https://packages.debian.org/bullseye/watchdog
- Ubuntu: https://manpages.ubuntu.com/manpages/focal/man8/watchdog.8.html
- CentOS 7: https://centos.pkgs.org/7/centos-x86_64/watchdog-5.13-12.el7.x86_64.rpm.html
Usage (Ubuntu 20.04/Debian 11)
- Install required packages
apt update
apt install --no-install-recommends -qqy build-essential
apt install --no-install-recommends -qqy linux-headers-$(uname -r)
- Build kernel module
- Run
make
to build kernel module - Once build successful,
it87_wdt.ko
could be found under current directory - Run
make install
to install kernel module on/usr/lib/modules/$(uname -r)/
- Run
Usage (CentOS 7.9)
- Sync the latest version available from any enabled repository and reboot system
yum distro-sync
reboot
- Install required packages
yum install "kernel-devel-$(uname -r)"
yum install "kernel-headers-$(uname -r)"
yum groupinstall "Development Tools"
- Build kernel module
- Run
make
to build kernel module - Once build successful,
it87_wdt.ko
could be found under current directory - Run
make install
to install kernel module on/usr/lib/modules/$(uname -r)/
- Run
note
CentOS 7 latest kernel moved from "kernel.ko" to "kernel.ko.xz", please ensure target "kernel.ko.xz" is removed or moved as a backup.
Probing it87_wdt
driver on boot.
- Add configuration file.
Debian/CentOS Edit
/lib/modprobe.d/watchdog.conf
Ubuntu Edit
/etc/modprobe.d/watchdog.conf
# timeout:Watchdog timeout in seconds, default=60 (int)
# nowayout:Watchdog cannot be stopped once started, default=0 (bool)
options it87_wdt nowayout=1 timeout=60
caution
V3000
and EXPC-F2000
platform should default disable watchdog KRST
reset pin
- Upgrade
it87_wdt
driver to1.4.0
or later version - Add
krst=0
option into onfiguration file:
# timeout: Watchdog timeout in seconds, default=60 (int)
# nowayout: Watchdog cannot be stopped once started, default=0 (bool)
# krst: Watchdog enable KRST reset output, default=1 (bool)
options it87_wdt nowayout=1 timeout=60 krst=0
Disable
iTCO_wdt
driver.Edit
/lib/modprobe.d/iTCO-blacklist.conf
blacklist iTCO_wdt
blacklist iTCO_vendor_support
Disable NMI watchdog
driver (Ubuntu)
Edit the /etc/default/grub
file as root and then add nmi_watchdog=0 to the line starting with GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="nmi_watchdog=0"
After adding the kernel parameter, don't forget to update the GRUB
sudo update-grub
Watchdog daemon package (Debian/Ubuntu)
Install package
sudo apt-get update
sudo apt-get install watchdogEdit
/etc/default/watchdog
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Start wd_keepalive after stopping watchdog? 0 or 1
run_wd_keepalive=0
# Load module before starting watchdog
watchdog_module="it87_wdt"
# Specify additional watchdog options here (see manpage).Add device node to config, edit
/etc/watchdog.conf
watchdog-device = /dev/watchdog
Troubleshooting for
V3000
platformcaution
V3000
platform super IO gpio value maybe changed when probingit87_wdt
driver somehow, please using/usr/sbin/mx-uart-ctl
to fix the issue in watchdog service file. See mx-uart-ctl.Edit
/lib/systemd/system/watchdog.service
file, and add this lineExecStartPre=/bin/bash -c '/usr/sbin/mx-uart-ctl -p 0 && /usr/sbin/mx-uart-ctl -p 1'
in [Service] section.[Unit]
Description=watchdog daemon
Conflicts=wd_keepalive.service
After=multi-user.target
OnFailure=wd_keepalive.service
[Service]
ExecStartPre=/bin/bash -c '/usr/sbin/mx-uart-ctl -p 0 && /usr/sbin/mx-uart-ctl -p 1'
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'
[Install]
WantedBy=default.target
Last updated on 2023-02-15 by Wilson Huang