summary refs log tree commit diff
path: root/pkgs/build-support/kernel
diff options
context:
space:
mode:
authorDominik Xaver Hörl <hoe.dom@gmx.de>2021-01-11 17:23:24 +0100
committerDominik Xaver Hörl <hoe.dom@gmx.de>2021-01-11 17:26:33 +0100
commit49130f93b73e61a9e3dff31c3c13c5a9096fa969 (patch)
tree29c984f1a06be14e0b033795e6b04a812600240d /pkgs/build-support/kernel
parentdb132fe8db548325fbf288981523a51d0e48b215 (diff)
downloadnixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar.gz
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar.bz2
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar.lz
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar.xz
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.tar.zst
nixpkgs-49130f93b73e61a9e3dff31c3c13c5a9096fa969.zip
nixos/modules-closure.sh: don't fail if firmware is missing
Since fdf32154fc90698ef72ffa96ef39d920e1b9c951, we no longer allow
missing modules in the initrd. Unfortunately since before this commit,
the modules-closure script would also fail on missing firmware, which
is a very common case (e.g. xhci-pci.ko.xz lists renesas_usb_fw.mem as
dependent firmware). Fix this by only issuing a warning instead.
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r--pkgs/build-support/kernel/modules-closure.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh
index 3f895d9cfed..3b3a38ea1d3 100644
--- a/pkgs/build-support/kernel/modules-closure.sh
+++ b/pkgs/build-support/kernel/modules-closure.sh
@@ -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