Commit a5f05c98 authored by Dermot Bradley's avatar Dermot Bradley
Browse files

mkinitfs: handle compressed kernel modules

When determining which firmware needs to be includes in the initramfs
mkinitfs searches for kernel modules using the filename *.ko and so
does not cater for compressed modules (and therefore does not include
their required firmware in the initramfs).

Change the search pattern to deal with both uncompressed and
compressed modules.
parent 41bddaed
......@@ -138,9 +138,9 @@ initfs_firmware() {
rm -rf "$tmpdir"/lib/firmware
mkdir -p "$tmpdir"/lib/firmware
# Verify if there are initfs modules
_modules=`find "$tmpdir"/lib/modules -type f -name "*.ko" -print -quit`
_modules=`find "$tmpdir"/lib/modules -type f -name "*.ko*" -print -quit`
[ -n "$_modules" ] || return 0
find "$tmpdir"/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -u | while read FW; do
find "$tmpdir"/lib/modules -type f -name "*.ko*" | xargs modinfo -F firmware | sort -u | while read FW; do
[ -e "${basedir}/lib/firmware/${FW}" ] && install -pD "${basedir}/lib/firmware/${FW}" "$tmpdir"/lib/firmware/$FW
done
return 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment