October 2017
Intermediate to advanced
586 pages
14h 8m
English
The depmod utility doesn't only build modules.dep and modules.dep.bin files. It does more than that. When a kernel developer actually writes a driver, they know exactly what hardware the driver will support. They are then responsible for feeding the driver with the product and vendor IDs of all devices supported by the driver. depmod also processes module files in order to extract and gather that information, and generates a modules.alias file, located in /lib/modules/<kernel_release>/modules.alias, which will map devices to their drivers.
An excerpt from modules.alias is as follows:
alias usb:v0403pFF1Cd*dc*dsc*dp*ic*isc*ip*in* ftdi_sio alias usb:v0403pFF18d*dc*dsc*dp*ic*isc*ip*in* ftdi_sio alias usb:v0403pDAFFd*dc*dsc*dp*ic*isc*ip*in* ...