diff mbox series

kernel.bbclass: add lz4-native dependency for Image.lz4

Message ID 20250918-kernel-lz4-v1-1-b40ccf21bbe3@linaro.org
State New
Headers show
Series kernel.bbclass: add lz4-native dependency for Image.lz4 | expand

Commit Message

Tudor Ambarus Sept. 18, 2025, 1:01 p.m. UTC
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.

Suggested-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 meta/classes-recipe/kernel.bbclass | 1 +
 1 file changed, 1 insertion(+)


---
base-commit: cfbb00657ab961a3c3a8e6619fc08a2a3f4255c7
change-id: 20250918-kernel-lz4-248b9bfff0ed

Best regards,
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index eb03424dfc3e023842f7b67ef47468210af72cd1..003a155e794388efd3fa29c2c946b18542f4cef8 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -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"