mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
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.
12 lines
365 B
Bash
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
|