diff options
author | Linus Heckemann <git@sphalerite.org> | 2020-08-28 14:04:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 14:04:10 +0200 |
commit | 86fa61033a96d3b58838bb399cc16514a0b5c71e (patch) | |
tree | 7944d325a80472883707a9bd716f9ca3b8c346e5 /pkgs/build-support | |
parent | b120adbf224417dbc6b2ffc5bc49ce4b4a75839f (diff) | |
parent | 70bc1a3f49516a407d8f919c161162951d34ceaf (diff) | |
download | nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar.gz nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar.bz2 nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar.lz nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar.xz nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.tar.zst nixpkgs-86fa61033a96d3b58838bb399cc16514a0b5c71e.zip |
Merge pull request #96008 from baloo/baloo/bugfixes/make-modules-closure_firmware
makeModulesClosure: fixup firmware extraction
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/kernel/modules-closure.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh index 68d840f1614..3f895d9cfed 100644 --- a/pkgs/build-support/kernel/modules-closure.sh +++ b/pkgs/build-support/kernel/modules-closure.sh @@ -68,7 +68,17 @@ done mkdir -p $out/lib/firmware for module in $(cat closure); do - for i in $(modinfo -F firmware $module); do + # for builtin modules, modinfo will reply with a wrong output looking like: + # $ modinfo -F firmware unix + # name: unix + # + # There is a pending attempt to fix this: + # https://github.com/NixOS/nixpkgs/pull/96153 + # https://lore.kernel.org/linux-modules/20200823215433.j5gc5rnsmahpf43v@blumerang/T/#u + # + # For now, the workaround is just to filter out the extraneous lines out + # of its output. + 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 |