Provide a udev-hid-bpf install command
Installing a HID-BPF consists in 2 things:
- put the file in a dedicated directory (
/lib/firmware/hid
or/usr/local/lib/firmware/hid
) - add a udev mechanism to load that particular HID-BPF object when the matching device is attached
The first part is easy enough to explain to users.
The second one, though simple, is slightly more tricky as we need to create the correct udev rule, and/or append the modalias to the hwdb.
However, for user hacks, or tests it's likely that the user actually have the device and that the user will likely use it.
So we could drop the hwdb requirement in those case as the penalty to have a non used specific udev rules is relatively small (this shouldn't be the general case with millions of HID-BPF programs).
And udev-hid-bpf install
could then:
- put the file in
/usr/local/lib/firmware/hid
- create a device specific udev rule in
/etc
We require #9 (closed) for this, and then it should be a matter of just having a generic template for the new rules.