kernel.bbclass: add lz4-native dependency for Image.lz4
PATCH 1/1 kernel.bbclass: add lz4-native dependency for Image.lz4
The pixel6 kernel build fails with "lz4: command not found" when KERNEL_IMAGETYPE is set to Image.lz4.
Upstream commit 0c7dc5bae1 ("bitbake.conf: Drop lz4 from HOSTTOOLS") dropped lz4 from the global HOSTTOOLS variable. This meant that the lz4 binary was no longer automatically provided to build tasks, causing the compilation to fail.
Add a conditional dependency on lz4-native directly to kernel.bbclass. It ties the dependency directly to the image type that requires it, making the build more robust.
--- meta/classes-recipe/kernel.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes-recipe/kernel.bbclass +1 -0
@@ -20,6 +20,7 @@ DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison- DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" +DEPENDS += "${@bb.utils.contains("KERNEL_IMAGETYPES", "Image.lz4", "lz4-native", "", d)}" PACKAGE_WRITE_DEPS += "depmodwrapper-cross" do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot gzip-native:do_populate_sysroot"
---
base-commit: cfbb00657ab961a3c3a8e6619fc08a2a3f4255c7
change-id: 20250918-kernel-lz4-248b9bfff0ed
Best regards,
Signature · 1 line
Tudor Ambarus <[email protected]>
Hi Tudor,
Quoted 25 lines · Tudor Ambarus via lists.openembedded.org
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
The pixel6 kernel build fails with "lz4: command not found" when
KERNEL_IMAGETYPEis set toImage.lz4.Upstream commit
0c7dc5bae1("bitbake.conf: Drop lz4 from HOSTTOOLS") dropped lz4 from the globalHOSTTOOLSvariable. This meant that the lz4 binary was no longer automatically provided to build tasks, causing the compilation to fail.Add a conditional dependency on
lz4-nativedirectly tokernel.bbclass. It ties the dependency directly to the image type that requires it, making the build more robust.Suggested-by André Draszik <[email protected]>Signed-off-by Tudor Ambarus <[email protected]>--- meta/classes-recipe/kernel.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes-recipe/kernel.bbclass +0
-0
meta/classes-recipe/kernel.bbclass DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison- · line 23
Quoted 4 lines
meta/classes-recipe/kernel.bbclass +1
-0@@ -20,6 +20,7 @@ DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison- DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" +DEPENDS += "${@bb.utils.contains("KERNEL_IMAGETYPES", "Image.lz4", "lz4-native", "", d)}"
There's also gzip, lzo, lzma and xz support for aarch32 per arch/arm/boot/compressed/Makefile.
Additionally also bz2, zst and fit for Aarch64 per arch/arm64/boot/Makefile.
What about adding those as well so we cover everything?
Cheers,
Quentin
Quoted 1 line · Quentin Schulz
Hi Tudor,
Hi!
Quoted 34 lines · Tudor Ambarus via lists.openembedded.org
Quoted 25 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
The pixel6 kernel build fails with "lz4: command not found" when
KERNEL_IMAGETYPEis set toImage.lz4.Upstream commit
0c7dc5bae1("bitbake.conf: Drop lz4 from HOSTTOOLS") dropped lz4 from the globalHOSTTOOLSvariable. This meant that the lz4 binary was no longer automatically provided to build tasks, causing the compilation to fail.Add a conditional dependency on
lz4-nativedirectly tokernel.bbclass. It ties the dependency directly to the image type that requires it, making the build more robust.Suggested-by André Draszik <[email protected]>Signed-off-by Tudor Ambarus <[email protected]>---
meta/classes-recipe/kernel.bbclass | 1 +1 file changed, 1 insertion(+)meta/classes-recipe/kernel.bbclass +0
-0@@ -20,6 +20,7 @@ DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison-Quoted 4 lines
DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" +DEPENDS += "${@bb.utils.contains("KERNEL_IMAGETYPES", "Image.lz4", "lz4-native", "", d)}"
There's also gzip, lzo, lzma and xz support for aarch32 per
arch/arm/boot/compressed/Makefile.
Quoted 4 lines
Additionally also bz2, zst and fit for Aarch64 per
arch/arm64/boot/Makefile.What about adding those as well so we cover everything?
I guess that would be alright, but maybe in a different patch? This one adds back something that worked before, but no longer works, the others are an extension maybe?
Thanks,
ta
Quoted 41 lines · Tudor Ambarus
Quoted 1 line · Quentin Schulz
Hi Tudor,
Hi!
Quoted 34 lines · Tudor Ambarus via lists.openembedded.org
Quoted 25 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
The pixel6 kernel build fails with "lz4: command not found" when
KERNEL_IMAGETYPEis set toImage.lz4.Upstream commit
0c7dc5bae1("bitbake.conf: Drop lz4 from HOSTTOOLS") dropped lz4 from the globalHOSTTOOLSvariable. This meant that the lz4 binary was no longer automatically provided to build tasks, causing the compilation to fail.Add a conditional dependency on
lz4-nativedirectly tokernel.bbclass. It ties the dependency directly to the image type that requires it, making the build more robust.Suggested-by André Draszik <[email protected]>Signed-off-by Tudor Ambarus <[email protected]>--- meta/classes-recipe/kernel.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes-recipe/kernel.bbclass +0
-0meta/classes-recipe/kernel.bbclass DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison- · line 23
Quoted 4 lines
meta/classes-recipe/kernel.bbclass +1
-0@@ -20,6 +20,7 @@ DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison- DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" +DEPENDS += "${@bb.utils.contains("KERNEL_IMAGETYPES", "Image.lz4", "lz4-native", "", d)}"There's also gzip, lzo, lzma and xz support for aarch32 per
arch/arm/boot/compressed/Makefile.
Quoted 9 lines
Quoted 4 lines
Additionally also bz2, zst and fit for Aarch64 per
arch/arm64/boot/Makefile.What about adding those as well so we cover everything?
I guess that would be alright, but maybe in a different patch? This one adds back something that worked before, but no longer works, the others are an extension maybe?
Indeed, I read a bit too fast the commit log :)
In any case, the patch is already merged so it's necessarily in a new patch :)
Cheers,
Quentin