diff mbox series

kbuild: switch from lz4c to lz4 for compression

Message ID 20241112150006.265900-1-parth105105@gmail.com (mailing list archive)
State New
Headers show
Series kbuild: switch from lz4c to lz4 for compression | expand

Commit Message

Parth Pancholi Nov. 12, 2024, 3 p.m. UTC
From: Parth Pancholi <parth.pancholi@toradex.com>

Replace lz4c with lz4 for kernel image compression.
Although lz4 and lz4c are functionally similar, lz4c has been
deprecated upstream since 2018. Since as early as Ubuntu 16.04 and
Fedora 25, lz4 and lz4c have been packaged together, making it safe
to update the requirement from lz4c to lz4. Consequently, some
distributions and build systems, such as OpenEmbedded, have fully
transitioned to using lz4. OpenEmbedded core adopted this change in
commit fe167e082cbd ("bitbake.conf: require lz4 instead of lz4c"),
causing compatibility issues when building the mainline kernel in
the latest OpenEmbedded environment, as seen in the errors below.
This change maintains compatibility with current kernel builds
because both tools have a similar command-line interface while
fixing the mainline kernel build failures with the latest master
OpenEmbedded builds associated with the mentioned compatibility
issues.

LZ4     arch/arm/boot/compressed/piggy_data
/bin/sh: 1: lz4c: not found
...
...
ERROR: oe_runmake failed

Cc: stable@vger.kernel.org
Link: https://github.com/lz4/lz4/pull/553
Suggested-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 79192a3024bf..7630f763f5b2 100644
--- a/Makefile
+++ b/Makefile
@@ -508,7 +508,7 @@  KGZIP		= gzip
 KBZIP2		= bzip2
 KLZOP		= lzop
 LZMA		= lzma
-LZ4		= lz4c
+LZ4		= lz4
 XZ		= xz
 ZSTD		= zstd