Power off Jetson instead of rebooting when flash is successful
Issue Overview
Users are experiencing an automatic reboot of the Nvidia Jetson Orin Nano (or NX 16GB) after successfully flashing the device using the command ./tools/kernel_flash/l4t_initrd_flash.sh
with JetPack 6.0. The log indicates that the flash process completes successfully, but the system reboots instead of powering off.
The relevant log excerpt shows that the flash is successful, and the device is set to reboot:
Flash is successful
Reboot device
Cleaning up...
Log is saved to Linux_for_Tegra/initrdlog/flash_3-1_0_20240712-133636.log
Users have expressed a desire to modify this behavior so that the system powers off instead of rebooting. Attempts to change the script by inserting halt -p
in place of reboot now
have not yielded results, as the system still reboots.
Possible Causes
-
Script Logic: The default setting for the
no_reboot
variable is set to 1, which may influence the reboot behavior. -
Script Modification Limitations: The shutdown command may not be available in the initrd environment, preventing users from executing a power-off command directly.
-
Dependency on Systemd: The shutdown process relies on systemd functionality, which is not available in the initrd environment. This means that even if users manage to include shutdown binaries, they will not function as expected.
Troubleshooting Steps, Solutions & Fixes
-
Modify Flash Script:
- Navigate to
Linux_for_Tegra/tools/kernel_flash/l4t_network_flash.func
. - Change the section that handles rebooting:
if ! sshpass -p root ssh "root@${1}" "${SSH_OPT[@]}" "nohup echo o > /proc/sysrq-trigger"; then echo "Reboot failure" exit 104 fi
- This modification allows for a controlled shutdown instead of a reboot.
- Navigate to
-
Testing Modifications:
- After making changes, run the flash command again and observe if the device powers off as intended.
- Ensure that you have access to logs for debugging any failures during this process.
-
Check for Dependencies:
- Verify whether any additional dependencies or scripts need modification to support power-off commands.
- Users should ensure that any required binaries are included in the initrd environment if modifications are attempted.
-
Alternative Commands:
- If direct modifications do not work, consider using alternative commands or scripts that may allow for a safe shutdown post-flashing.
-
Documentation and Resources:
- Consult Nvidia’s official documentation for any updates regarding Jetson Orin Nano flashing procedures.
- Check forums or community discussions for additional user experiences and solutions.
-
Best Practices:
- Always back up original scripts before making modifications.
- Document changes made for future reference and troubleshooting.
-
Unresolved Aspects:
- Users may need further assistance if issues persist after following these steps.
- Continuous monitoring of community discussions can provide insights into new solutions or updates from Nvidia.
By following these steps, users can address the issue of unwanted reboots after flashing their Jetson Orin Nano devices and implement a power-off solution effectively.