Files
nixpkgs/pkgs/os-specific/linux/kernel/setup-module-compression.sh
Jared Baur cad163aa3e linux: add setup hook for kernel compression
This setup hook ensures that kernel modules are compressed with
parameters the kernel is capable of decompressing. This is currently
only effective when xz is used as the kernel module compression
algorithm.
2026-08-22 16:35:37 -07:00

12 lines
365 B
Bash

# shellcheck shell=bash
setupModuleCompressionHook() {
# Ensure CRC32 is used, which the kernel is capable of decompressing natively (enabled by CONFIG_MODULE_DECOMPRESS=y).
export XZ_OPT="--check=crc32"
}
if [[ -z "${dontSetupModuleCompression-}" ]]; then
nixInfoLog "Using setupModuleCompressionHook"
postConfigureHooks+=(setupModuleCompressionHook)
fi