For now it tries to match -n -q -v behaviour from the shell script
version where possible. -v has minor alterations given we no longer
have individual shell scripts.
Added -D directory which is helpful while working on fwget to point it
to where to find the firmware table files given I was tired of env.
Added -d which outputs debug warnings which would otherwise be silent
like overlapping/duplicate firmware table entries (some may be false
positives); no primary key found; invalid lines, duplicate selectors, ...
The firmware table input files are modelled after the output of their
tool (pciconf -l or usbconfig -l dump_device_desc) and use the same
selectors. The "vendor id" is set to tbe the mandatory selector for
both busses. The firmware file(s) information is appended.
Selection starts on the entries with the most selectors (more
specific if I got the iterator right).
For now I kept the firmware tables split into individual files as
that may help maintainance (especially if auto-generated).
I should also help to sort certain things initially (now):
(a) pci wireless devices do not match subclass, and qca and mediatek
need individual checks for class as they use "old" or "misc" as class for some (all?) chipsets.
(b) for pci video I currently modelled the files after the shell
scripts replacing globbing with masks BUT I also added the individual records I extracted from the drivers. There are some which I do not fully understand how they fit together and others in the Intel case which are entirely unhandled. I left them for now to be clarified or cleaned up. Someone should look over them. if we fix the current shell version I'll try to keep this updated too. The masked device entries likely should vanish at the end?
(c) The real motiviation for cleaning it up was so that I could add the
USB Bluetooth bits for Intel and Realtek and prepared qca and brcm but the latter two need ports work first.