yoctoflagsrebootwatchdognxp-microcontroller

How to add more FLAG of reason cause reboot with watchdog in Linux?


I'm using iMX8MM with Yocto. I'm trying to figure out the reason cause reboot with Watchdog.

I find out watchdog.h and there are a lot of FLAGs:

#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */
#define WDIOF_FANFAULT 0x0002 /* Fan failed */
#define WDIOF_EXTERN1 0x0004 /* External relay 1 */
#define WDIOF_EXTERN2 0x0008 /* External relay 2 */
#define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */
#define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */
#define WDIOF_POWEROVER 0x0040 /* Power over voltage */
#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */
#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */
#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */
#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */

But when I check with command, I get only 4 FLAGs:

$ wdctl

Device: /dev/watchdog
Identity: imx2+ watchdog [version 0]
Timeout: 60 seconds
Pre-timeout: 0 seconds
FLAG                   DESCRIPTION                          STATUS           BOOT-STATUS
KEEPALIVEPING          Keep alive ping reply                  1                   0
MAGICCLOSE             Supports magic close char              0                   0
PRETIMEOUT             Pretimeout (in seconds)                0                   0
SETTIMEOUT             Set timeout (in seconds)               0                   0

How do I get more of FLAG to use?


Solution

  • This is how I solve the issue above.

    1. Find all file concert about imx2+ watchdog package.

    2. Modified by adding more flags as watchdog.h file.

    3. Access menuconfig in Yocto and turn on some options in Watchdog sections. This action makes sure that bitbake recognize the changing in driver.

    4. Rebuild and generate OS image.