Search code examples
fedorakernel-module

What does it meam a kernel module for wireless card ends with .ko.xz instead of .ko


I am on Fedora 38 and I cannot install the kernel module for a Broadcom BCM 43142 Network Controller. I eventually understood that it is because the module is not correctly signed and that I have to:

  1. disable secure boot
  2. self sign the module.

After disabling secure boot I could manage to have the module loaded and the wifi working.

But I came back re-enabling secure boot in order to try self sign the module.

I followed this tutorial Working with kerned modules but it didn't worked as I do not fully understand everything.

Particularly the module I have is /lib/modules/6.4.15-200.fc38.x86_64/extra/wl/wl.ko.xz

Question 1:

Is it normal that it ends with .ko.xz?

Question 2:

Will the signed module have the same name?


Solution

  • Is it normal that it ends with .ko.xz?

    Yes.

    .xz just means it's a compressed binary:

    https://unix.stackexchange.com/questions/416397/centos7-latest-kernel-moved-from-kernel-ko-to-kernel-ko-xz

    Modules can be compressed using either gzip or xz. Compression is enabled using the MODULE_COMPRESS kernel build option, with MODULE_COMPRESS_GZIP or MODULE_COMPRESS_XZ to select the compression tool.


    Will the signed module have the same name?

    By default, No.

    ...though a thoroughly correct answer would depend on how, exactly, you intend to sign and recompress the module file, though:

    1. You need to first unpack/decompress the module (i.e. from .ko.xz to just .ko).
    2. Then sign the decompressed module.
    3. Then either use the now-signed decompressed module .ko as-is, or you can recompress it again back with xz -f yourModule.ko

    See also: https://unix.stackexchange.com/questions/438954/signing-a-compressed-kernel-module-for-use-with-secure-boot