33b5f1bcf4
This has been done in CentOS Stream already: https://gitlab.com/redhat/centos-stream/rpms/kernel-srpm-macros/-/merge_requests/1
15 lines
336 B
Bash
15 lines
336 B
Bash
#!/bin/sh
|
|
#
|
|
# firmware.prov - Automatically extract any and all firmware dependencies from
|
|
# kernel object (.ko) files and add to RPM deps.
|
|
|
|
IFS=$'\n'
|
|
|
|
for module in $(grep -E '/lib/modules/.+\.ko$') $*;
|
|
do
|
|
for firmware in `/sbin/modinfo -F firmware $module`;
|
|
do
|
|
echo "firmware($firmware)"
|
|
done
|
|
done
|