From d4616276689a2878eece75ae0f7c9c86b3fd8907 Mon Sep 17 00:00:00 2001 From: Bill XIE Date: Wed, 4 Jun 2025 08:38:52 +0800 Subject: [PATCH] payloads/Kconfig: Allow compression for Linux payloads Linux (bzImage) payloads used to be totally not compressed with cbfstool. However, only bzImage is already compressed and initrd is usually compressed, but the trampoline, parameter, and kernel command line should be compressible. Now cbfstool can copy segments instead when compression fails, so compression for Linux payloads (including LinuxBoot) could be enabled for compressible components. TEST=With LZMA, parameter is compressed from 0x1000 to 0x4c, trampoline is compressed from 0x171 to 0x14b, kernel command line is not compressed for being too short (0x22), initrd is not compressed for being already compressed. Signed-off-by: Bill XIE Change-Id: I8af3c904de55910a1298673d8ec2925a317bcff5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87935 Tested-by: build bot (Jenkins) Reviewed-by: Alicja Michalska Reviewed-by: Matt DeVillier --- payloads/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/payloads/Kconfig b/payloads/Kconfig index 49486246c6..586e54a4dd 100644 --- a/payloads/Kconfig +++ b/payloads/Kconfig @@ -68,8 +68,8 @@ config PAYLOAD_FILE choice prompt "Payload compression algorithm" default COMPRESSED_PAYLOAD_LZMA - default COMPRESSED_PAYLOAD_NONE if PAYLOAD_LINUX || PAYLOAD_LINUXBOOT || PAYLOAD_FIT - depends on !PAYLOAD_LINUX && !PAYLOAD_LINUXBOOT && !PAYLOAD_FIT + default COMPRESSED_PAYLOAD_NONE if PAYLOAD_FIT + depends on !PAYLOAD_FIT help Choose the compression algorithm for the chosen payloads. You can choose between None, LZMA, or LZ4.