Skip to content

Commit

Permalink
ni-rtfeatures: handle poweron reset_source
Browse files Browse the repository at this point in the history
When the reset_source register is `0x00` (no flags) - as in cases where
the system is totally powered off and then on - the ni-rtfeatures
driver writes "poweron" into the reset_source sysfs entry. The
ni-rtfeatures initscript does not handle this string, and warns that the
sysfs is malformed.

Handle this case in the initscript, and provide some useful logging
output.

Signed-off-by: Alex Stewart <[email protected]>
  • Loading branch information
amstewart committed Dec 5, 2023
1 parent b279f07 commit b42be87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions recipes-ni/ni-rtfeatures/files/ni-rtfeatures.initd
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ log_reset_source () {
ironclad)
log INFO "reset_source=${reason} # Ironclad watchdog timer expired"
;;
poweron)
log INFO "reset_source=${reason} # System powered-on; not reset."
;;
processor)
log INFO "reset_source=${reason} # Reset from MAX or command line"
;;
Expand Down
2 changes: 1 addition & 1 deletion recipes-ni/ni-rtfeatures/ni-rtfeatures.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda

DEPENDS += "update-rc.d-native"

PV = "2.0"
PV = "2.1"


SRC_URI += "\
Expand Down

0 comments on commit b42be87

Please sign in to comment.