Last active
November 30, 2022 02:04
-
-
Save rgov/aac0450ee3b9fb528f93b8ca37d56896 to your computer and use it in GitHub Desktop.
Tool to reboot an NVIDIA Jetson device into recovery mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Tool to reboot an NVIDIA Jetson device into recovery mode. Run as root. | |
Based on https://forums.developer.nvidia.com/t/remote-reboot-into-recovery-mode/36032/4 | |
*/ | |
#include <linux/reboot.h> | |
#include <sys/syscall.h> | |
#include <unistd.h> | |
int main() { | |
return (int)syscall( | |
SYS_reboot, | |
LINUX_REBOOT_MAGIC1, | |
LINUX_REBOOT_MAGIC2, | |
LINUX_REBOOT_CMD_RESTART2, | |
"forced-recovery" | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment