Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

 

  

  • Author

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.


 

 

 

 

 

 

 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.