kernel-srpm-macros/SOURCES/firmware.prov

15 lines
360 B
Plaintext
Raw Permalink Normal View History

2021-11-02 10:14:16 +00:00
#!/bin/sh
#
# firmware.prov - Automatically extract any and all firmware dependencies from
# kernel object (.ko) files and add to RPM deps.
IFS=$'\n'
2021-12-07 17:24:18 +00:00
for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') $*;
2021-11-02 10:14:16 +00:00
do
for firmware in `/sbin/modinfo -F firmware $module`;
do
echo "firmware($firmware)"
done
done