Skip to content

Commit c732b61

Browse files
tabrisigorpecovnik
authored andcommitted
armbian build machinery - allow kernel module compression.
1 parent 7dd3780 commit c732b61

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

lib/functions/compilation/armbian-kernel.sh

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,25 @@ function armbian_kernel_config__netkit() {
5656
#
5757
# Globals:
5858
# kernel_config_modifying_hashes - Array tracking the configuration option changes.
59-
# KERNEL_MAJOR_MINOR - Kernel version used to apply version-specific configuration updates.
6059
#
6160
# Outputs:
6261
# Displays alerts to notify about the configuration changes being applied.
6362
#
6463
# Description:
65-
# This function disables several kernel configuration options such as module compression, module signing,
66-
# and automatic versioning to speed up the build process and ensure compatibility with Armbian requirements.
67-
# It forces EXPERT mode (EXPERT=y) to ensure hidden configurations are visible and applies different module
68-
# compression settings based on the kernel version. All modifications are only performed if the .config file exists.
64+
# This function disables several kernel configuration options such as
65+
# module signing and automatic versioning to speed up the build
66+
# process and ensure compatibility with Armbian requirements.
67+
# Additionally, it forces EXPERT mode (EXPERT=y) to ensure otherwise
68+
# hidden configurations are visible. All modifications are only
69+
# performed if the .config file exists.
6970
#
7071
function armbian_kernel_config__disable_various_options() {
71-
kernel_config_modifying_hashes+=("CONFIG_MODULE_COMPRESS_NONE=y" "CONFIG_MODULE_SIG=n" "CONFIG_LOCALVERSION_AUTO=n" "EXPERT=y")
72+
kernel_config_modifying_hashes+=("CONFIG_MODULE_SIG=n" "CONFIG_LOCALVERSION_AUTO=n" "EXPERT=y")
7273
if [[ -f .config ]]; then
7374
display_alert "Enable CONFIG_EXPERT=y" "armbian-kernel" "debug"
7475
kernel_config_set_y EXPERT # Too many config options are hidden behind EXPERT=y, lets have it always on
7576

76-
display_alert "Disabling module compression and signing / debug / auto version" "armbian-kernel" "debug"
77-
# DONE: Disable: signing, and compression of modules, for speed.
78-
kernel_config_set_n CONFIG_MODULE_COMPRESS_XZ # No use double-compressing modules
79-
kernel_config_set_n CONFIG_MODULE_COMPRESS_ZSTD
80-
kernel_config_set_n CONFIG_MODULE_COMPRESS_GZIP
81-
82-
if linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.12; then
83-
kernel_config_set_n CONFIG_MODULE_COMPRESS # Introduced in 6.12 (see https://github.com/torvalds/linux/commit/c7ff693fa2094ba0a9d0a20feb4ab1658eff9c33)
84-
elif linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.0; then
85-
kernel_config_set_y CONFIG_MODULE_COMPRESS_NONE # Introduced in 6.0
86-
else
87-
kernel_config_set_n CONFIG_MODULE_COMPRESS # Only available up to 5.12
88-
fi
89-
77+
display_alert "Disabling module signing / debug / auto version" "armbian-kernel" "debug"
9078
kernel_config_set_n CONFIG_SECURITY_LOCKDOWN_LSM
9179
kernel_config_set_n CONFIG_MODULE_SIG # No use signing modules
9280
kernel_config_set_n CONFIG_MODULE_SIG_ALL # No use auto-signing modules

0 commit comments

Comments
 (0)