intelligent-agent / Rebuild

Linux OS for Recore
0 stars 3 forks source link

Disable the USB role switcher script on Recore boards that are not A8. #34

Closed eliasbakken closed 5 months ago

eliasbakken commented 5 months ago

There is now a new script that handles OTG/USB-C role change for Recore A8. This script should be disabled for boards that are not A8.

eliasbakken commented 5 months ago

Any ideas on how to disable this? Since the service is running every 10 seconds, I don't think it's a good idea to let it check which hardware version it has every time since that requires mounting a hardware boot partition. 1) We could add a check for hardware revision in Reflash and then disable it there, but that requires a change to Reflash, not to Rebuild. 2) We add a separate first-boot script/service that checks for it. That could be useful to have regardless since we can tack on different checks there. 3) We check the hardware revision in the script and cache it in a file. Other ideas?

obgr commented 5 months ago

I would probobly use a first boot script that does a bunch of tasks.

obgr commented 5 months ago

i would also enable services based on different parameters in firstboot instead of enabling on build.

eliasbakken commented 5 months ago

Ok, I agree. Let's add a "rebuild-firstrun" service that can enable the usb role switcher script for A8. I'm sure we can find other things to put in there.