usbboot
usbboot copied to clipboard
Disconnect device
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.
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.
Thanks, can I ask what that does; sorry to be dense!
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.