Skip to content

Commit 078be24

Browse files
committed
linux-firmware: enable compression by default
At this moment firmware compression is disabled by default and device types that need it must enable it in the device repos. This patch flips the logic - we want firmware compression enabled by default and only opt-out on devices whose kernel doesn't support it. Change-type: patch Signed-off-by: Michal Toman <[email protected]>
1 parent 1f22533 commit 078be24

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

meta-balena-common/classes/balena-bootloader.bbclass

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ python do_kernel_resin_checkconfig() {
599599
configfilepath = d.getVar("B", True) + '/.config'
600600
allSetKernelConfigs = getKernelSetConfigs(configfilepath)
601601
configs = d.getVarFlags("BALENA_CONFIGS") or {}
602-
firmware_compression = d.getVar('FIRMWARE_COMPRESSION', True)
602+
firmware_compression = d.getVar('FIRMWARE_COMPRESSION', 'xz')
603603

604-
if firmware_compression == "1" and \
604+
if firmware_compression in ['xz', 'zst'] and \
605605
'firmware_compress' not in activatedflags:
606606
bb.fatal("Firmware compression is enabled for this device but" \
607607
" the kernel does not have support for it")

meta-balena-common/classes/kernel-balena.bbclass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ python do_kernel_resin_checkconfig() {
10661066
configfilepath = d.getVar("B", True) + '/.config'
10671067
allSetKernelConfigs = getKernelSetConfigs(configfilepath)
10681068
configs = d.getVarFlags("BALENA_CONFIGS") or {}
1069-
firmware_compression = d.getVar('FIRMWARE_COMPRESSION', True)
1069+
firmware_compression = d.getVar('FIRMWARE_COMPRESSION', 'xz')
10701070

10711071
if firmware_compression in ['xz', 'zst'] and \
10721072
'firmware_compress' not in activatedflags:

meta-balena-common/conf/distro/include/balena-os.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ GOVERSION = "1.17.13"
128128
PREFERRED_PROVIDER_go-native = "go-native"
129129

130130
# Firmware compression support
131-
FIRMWARE_COMPRESSION ?= ""
131+
FIRMWARE_COMPRESSION ?= "xz"
132132

133133
SIGN_API ?= ""
134134
# Signing keys

meta-balena-common/recipes-kernel/linux-firmware/linux-firmware_20250211.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ PACKAGECONFIG ??= ""
260260
PACKAGECONFIG[deduplicate] = ",,rdfind-native"
261261

262262
# Possible values are "xz" and "zst".
263-
FIRMWARE_COMPRESSION ?= ""
263+
FIRMWARE_COMPRESSION ?= "xz"
264264

265265
# Specifying -j requires GNU parallel, which is a part of meta-oe
266266
PARALLEL_MAKE = ""

0 commit comments

Comments
 (0)