Skip to content

Commit

Permalink
Merge pull request #3416 from balena-os/module-compression
Browse files Browse the repository at this point in the history
Module compression
  • Loading branch information
flowzone-app[bot] authored Jul 19, 2024
2 parents eefb5c8 + fbb35d5 commit e5ed142
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 84 deletions.
83 changes: 0 additions & 83 deletions meta-balena-common/classes/compress-kernel-modules.bbclass

This file was deleted.

2 changes: 1 addition & 1 deletion meta-balena-common/classes/image-balena.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ init_config_json() {
def check_for_compressed_kernel_modules(modules_dir):
for root, dirs, files in os.walk(modules_dir, topdown=True):
for name in files:
found_ko = name.endswith(".ko.gz") or name.endswith(".ko.xz")
found_ko = name.endswith(".ko.gz") or name.endswith(".ko.xz") or name.endswith('.ko.zst')
if found_ko:
return found_ko
return False
Expand Down
6 changes: 6 additions & 0 deletions meta-balena-common/classes/kernel-balena.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ BALENA_CONFIGS ?= " \
${RAID} \
no_gcc_plugins \
${FIRMWARE_COMPRESS} \
${MODULE_COMPRESS} \
${WIREGUARD} \
"

Expand Down Expand Up @@ -222,6 +223,11 @@ BALENA_CONFIGS[firmware_compress] = " \
CONFIG_FW_LOADER_COMPRESS=y \
"

MODULE_COMPRESS = "${@configure_from_version("5.13", "module_compress", "", d)}"
BALENA_CONFIGS[module_compress] = " \
CONFIG_MODULE_COMPRESS_ZSTD=y \
"

WIREGUARD = "${@configure_from_version("5.10", "wireguard", "", d)}"
BALENA_CONFIGS[wireguard] = " \
CONFIG_WIREGUARD=m \
Expand Down
1 change: 1 addition & 0 deletions meta-balena-common/recipes-kernel/kmod/kmod_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PACKAGECONFIG:append = " zstd"

0 comments on commit e5ed142

Please sign in to comment.