OpenglMan Posted December 12, 2019 Posted December 12, 2019 Hello, I have the following problem: A custom board (H5) doesn't reboot using the reboot command. Same problem from u-boot using reset command. If you check the log, all is normal for the halt or power off proccess. The problem happens when the board is going to make the power on, it hangs, and you can't see anything using the debug serial. As a solution, i can reset the voltage regulators using a digital GPIO pin. Of this way i am able to reset the board. But i need a soft solution, and of course, if linux itself makes a reboot it should activate the digital GPIO pin in this custom board. So my question is: Would it be possible to recompile reboot.c or other file for activating a digital pin as last action of the reboot proccess? Thanks a lot in advance
OpenglMan Posted December 12, 2019 Author Posted December 12, 2019 I think i have found a dirty and very different solution but it works: I have created a service in systemd that is run before reboot.target The service created is: [Unit] Description=test Before=reboot.target DefaultDependencies=no [Service] ExecStart=/path_to_your_bash_file/file.sh Type=oneshot RemainAfterExit=yes [Install] WantedBy=reboot.target In the file.sh i activate a digital gpio pin for runnig a HW reset using the voltage regulators.
Recommended Posts