Merge pull request #109030 from xaverdh/modules-closure-ignore-missing-firmware

nixos/modules-closure.sh: don't fail if firmware is missing
This commit is contained in:
Jörg Thalheim 2021-01-12 14:30:41 +00:00 committed by GitHub
commit ba0910069d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,8 @@ for module in $(cat closure); do
for i in $(modinfo -b $kernel --set-version "$version" -F firmware $module | grep -v '^name:'); do
mkdir -p "$out/lib/firmware/$(dirname "$i")"
echo "firmware for $module: $i"
cp "$firmware/lib/firmware/$i" "$out/lib/firmware/$i" 2>/dev/null || if test -z "$allowMissing"; then exit 1; fi
cp "$firmware/lib/firmware/$i" "$out/lib/firmware/$i" 2>/dev/null \
|| echo "WARNING: missing firmware $i for module $module"
done
done