Jump to content

Modify reboot.c for a H5 custom board (doesn't reboot)


OpenglMan
 Share

Recommended Posts

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

 

  

Link to comment
Share on other sites

Open source development is fun. Join Armbian Linux development team today!

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.


 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...