kbuild: switch from lz4c to lz4 for compression
Subsystems (2)
PATCH v2 1/1 kbuild: switch from lz4c to lz4 for compression
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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
---
v2: correct the compression command line to make it compatible with lz4
v1: https://lore.kernel.org/all/[email protected]/
--- Makefile | 2 +- scripts/Makefile.lib | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Makefile +1 -1
@@ -508,7 +508,7 @@ KGZIP = gzip KBZIP2 = bzip2 KLZOP = lzop LZMA = lzma -LZ4 = lz4c +LZ4 = lz4 XZ = xz ZSTD = zstd
scripts/Makefile.lib +2 -2
@@ -371,10 +371,10 @@ quiet_cmd_lzo_with_size = LZO $@ cmd_lzo_with_size = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@ quiet_cmd_lz4 = LZ4 $@ - cmd_lz4 = cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout > $@ + cmd_lz4 = cat $(real-prereqs) | $(LZ4) -l -9 - - > $@ quiet_cmd_lz4_with_size = LZ4 $@ - cmd_lz4_with_size = { cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout; \ + cmd_lz4_with_size = { cat $(real-prereqs) | $(LZ4) -l -9 - -; \ $(size_append); } > $@ # U-Boot mkimage
Signature · 1 line
2.34.1
Greg KH
maintainerQuoted 22 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes the mainline kernel build failures with the latest master OpenEmbedded builds associated with the mentioned compatibility issues.
Quoted 7 lines
LZ4
arch/arm/boot/compressed/piggy_data/bin/sh: 1: lz4c: not found
...
...
ERROR:oe_runmakefailed
What bug does this resolve that it needs to be backported to stable kernels?
thanks,
greg k-h
Hello Greg,
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailed
Quoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Francesco
Greg KH
maintainerQuoted 47 lines · Francesco Dolcini
Hello Greg,
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Quoted 5 lines
Everything should be properly documented in the commit message already.
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.
thanks,
greg k-h
Quoted 48 lines · Greg KH
Quoted 47 lines · Francesco Dolcini
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
Quoted 8 lines
Quoted 3 lines
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.
Greg, ack.
Masahiro, can you please let me know if we should send a v3 with the stable tag removed or you can remove it yourself when applying?
Francesco
Quoted 59 lines · Francesco Dolcini
Quoted 48 lines · Greg KH
Quoted 47 lines · Francesco Dolcini
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
Quoted 8 lines
Quoted 3 lines
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.
Quoted 5 lines
Greg, ack.
Masahiro, can you please let me know if we should send a v3 with the stable tag removed or you can remove it yourself when applying?
I applied this with the stable tag removed.
Thanks.
(I guess someone may want to backport this eventually, as such distros cannot build stable kernels with ld4 compression.)
Signature · 2 lines
Best Regards Masahiro Yamada
Hi Greg, hi Yamada,
Quoted 66 lines · Masahiro Yamada
Quoted 59 lines · Francesco Dolcini
Quoted 48 lines · Greg KH
Quoted 47 lines · Francesco Dolcini
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
Quoted 8 lines
Quoted 3 lines
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.Quoted 5 lines
Greg, ack.
Masahiro, can you please let me know if we should send a v3 with the stable tag removed or you can remove it yourself when applying?
Quoted 5 lines
I applied this with the stable tag removed.
Thanks.(I guess someone may want to backport this eventually, as such distros cannot build stable kernels with ld4 compression.)
Yes please :)
Greg, are you willing to reconsider this and pick e397a603e49c ("kbuild: switch from lz4c to lz4 for compression") for inclusion to at least the more recent stable series (in particular 6.12.y).
For instance Debian trixie will ship with at least lz4/1.10.0 which does not include anymore lz4c.
In consequence our build fails now with the updated lz4 which "just" entered Debian unstable (for the kernel aimed to be used for the upcoming Debian trixie).
Regards:
https://salsa.debian.org/carnil/linux/-/jobs/7022458/raw
Regards,
Salvatore
Quoted 70 lines · Salvatore Bonaccorso
Hi Greg, hi Yamada,
Quoted 66 lines · Masahiro Yamada
Quoted 64 lines · Francesco Dolcini
Quoted 48 lines · Greg KH
Quoted 47 lines · Francesco Dolcini
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
Quoted 8 lines
Quoted 3 lines
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.Greg, ack.
Masahiro, can you please let me know if we should send a v3 with the stable tag removed or you can remove it yourself when applying?
Quoted 7 lines
Quoted 5 lines
I applied this with the stable tag removed.
Thanks.(I guess someone may want to backport this eventually, as such distros cannot build stable kernels with ld4 compression.)
Yes please :)
Agree.
This should be back-ported.
Signature · 2 lines
Best Regards Masahiro Yamada
Greg KH
maintainerQuoted 74 lines · Masahiro Yamada
Quoted 73 lines · Salvatore Bonaccorso
Hi Greg, hi Yamada,
Quoted 69 lines · Masahiro Yamada
Quoted 59 lines · Francesco Dolcini
Quoted 48 lines · Greg KH
Quoted 47 lines · Francesco Dolcini
Quoted 29 lines · Greg KH
Quoted 28 lines · Parth Pancholi
From: Parth Pancholi <[email protected]>
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 also updates the LZ4 compression commands to make it backward compatible by replacing stdin and stdout with the '-' option, due to some unclear reason, the stdout keyword does not work for lz4 and '-' works for both. In addition, this modifies the legacy '-c1' with '-9' which is also compatible with both. This fixes 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_runmakefailedQuoted 4 lines
Quoted 1 line
What bug does this resolve that it needs to be backported to stable kernels?
This is not solving any existing actual bug, and therefore there is no fixes tag.
The issue here is that the kernel build system is using lz4c, that is deprecated since 2018, and now distributions are actively moving away from it.
openSUSE Tumbleweed and OE already removed it, so you would not be able to compile a stable kernel on such distribution when using lz4 unless we backport such a patch.
Everything should be properly documented in the commit message already.
Quoted 8 lines
Quoted 3 lines
My understanding is that something like that would be a reason for backporting to stable, if my understanding is not correct we'll remove the cc:stable and send a v3.
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what meets stable kernel requirements. I don't think that this patch is that.Quoted 5 lines
Greg, ack.
Masahiro, can you please let me know if we should send a v3 with the stable tag removed or you can remove it yourself when applying?
I applied this with the stable tag removed.
Thanks.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
(I guess someone may want to backport this eventually, as such distros cannot build stable kernels with ld4 compression.)
Yes please :)
Agree.
This should be back-ported.
Ok, now queued up, thanks.
greg k-h
Sasha Levin
maintainer[ Sasha's backport helper bot ]
Hi,
Found matching upstream commit: e397a603e49cc7c7c113fad9f55a09637f290c34
WARNING: Author mismatch between patch and found commit:
Backport author: Parth Pancholi<[email protected]> Commit author: Parth Pancholi<[email protected]>
Status in newer kernel trees:
6.13.y | Present (exact SHA1)
Note: The patch differs from the upstream commit:
---
Failed to apply patch cleanly, falling back to interdiff...
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.13.y | Failed | N/A | | stable/linux-6.12.y | Success | Success | | stable/linux-6.6.y | Success | Success | | stable/linux-6.1.y | Success | Success | | stable/linux-5.15.y | Failed | N/A | | stable/linux-5.10.y | Failed | N/A | | stable/linux-5.4.y | Failed | N/A |