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
Add usbip mount option #3895
Add usbip mount option #3895
Conversation
- Add optional boolean parameter 'usbip' which will add the following mount points for the container all with 'rw' mode: /sys/devices/platform, /sys/bus/platform/drivers, /sys/module - Logic to check if usbip & gpio are both enabled to prevent mounting on top of an already mounted path (/sys/devices/platform/soc_ - Test and fixture
Fix mounting issue
Hi @irakhlin, I would recommend also adding the 'hwids-usb' package to aid in identifying remote USB devices. I thought you had mentioned that package before in another thread regarding this, but I was unable to find it to add a link. :-) |
@axemann Yes you are right this is a good package to have in the addon when testing this. I think the goal is to have these or a version of these changes added to supervisor to be able to create a cleaner addon with simple configurations to managing the mounting of the devices. That addon will definitely benefit from hwids-usb, I am still tinkering with the best way to implement that in an addon but if you have any ideas feel free to ping me. edit: I have a basic working version of a very simple add-on using a slimmed down image with only needed packages with support for the standard add-on configuration system https://github.com/irakhlin/hassio-usbip-mounter it should be useful for anyone testing this |
Hi @irakhlin, thank you for your contribution. I'm discussing that today with our team. It seems to be pretty heavy from the access/security perspective. But on the other hand, it would be lame if everyone implemented their solution for that. We should solve that more central. Our idea is to create a plugin called: connector (?). They would support usbip + uart/serial over IP (socat) and generate devices on /dev that other add-ons/core can access it (at least on usbip, that is the default anyway). Do you want work with us to archive that? We have to create follow:
|
@pvizeli I totally agree that it is indeed pretty heavy on access exposure. When initially sitting down to do the work I had hoped the exposure would be scoped to the the vhci_hcd (usbip device hub) ex ( /sys/devices/platform/vhci_hcd.0 ) but this was not possible as the driver has to be loaded for that mount point to exist .. which had to be done during the start of the add-on and the mount points had to be configured before the start of the add-on. Big circular mess. I think the idea of using a plugin makes sense. Its not something I thought of as I was not too familiar with supervisor code before looking into this. |
Correct, you can reach me out on discord. I think there are 2 ways but we can discuss that later 👍 |
Proposed change
This proposed change resolves feature requested tracked here: #3861
A new boolean option (usbip) is added which can be used to mount required '/sys' mount points inside addon container.
Type of change
Additional information
Checklist
black --fast supervisor tests
)If API endpoints of add-on configuration are added/changed: