Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect device #224

Closed
neil-benn opened this issue Jun 19, 2024 · 3 comments
Closed

Disconnect device #224

neil-benn opened this issue Jun 19, 2024 · 3 comments

Comments

@neil-benn
Copy link

Is your feature request related to a problem? Please describe.
I am setting up a system to reset CM4 devices to factory settings - however I need to reset the partitions and then replace the eeprom which requires me to power cycle the target CM4 between partition clearing and resetting the eeprom. Is there a way to disconnect a device once rpiboot has connected it?

Describe the solution you'd like
An rpiboot command witha command line switch to disconnect teh edvice and if not then some bash command(s) to disconnect teh device.

Describe alternatives you've considered
Using a hardware solution with a switch on a relay connected to a GPIO port but that is a lot of work for the solution.

@timg236
Copy link
Collaborator

timg236 commented Jun 19, 2024

Set recovery_reboot=1 in the config.txt file in the recovery sub-directory.

Make sure that you have the latest version of the code / recovery.bin.

@neil-benn
Copy link
Author

Thanks, can I ask what that does; sorry to be dense!

@tdewey-rpi
Copy link
Contributor

Thanks, can I ask what that does; sorry to be dense!

This enforces an automatic reboot of the device after your recovery.bin has executed. Note that if you are getting the devices into rpiboot using a GPIO, this would require you to disconnect the GPIO to continue along a 'normal' boot flow.

Otherwise, consider investing in a per-port-power-switching USB hub. In the past, I've used a Mega4 (https://www.uugear.com/product/mega4-4-port-usb-3-ppps-hub-for-raspberry-pi-4b/) for such cases - but other commercial off the shelf parts are available.

Unfortunately, I'm going to have to close this as 'Won't Address', as rpiboot cannot address this issue directly - recovery_reboot will get you so far, but your use case sounds like it requires hardware support.

@tdewey-rpi tdewey-rpi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants