@@ -19,7 +19,7 @@ KERNEL_PACKAGE_NAME ??= "kernel"
KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison-native"
+DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison-native gzip-native"
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)}"
gzip-native is only in do_deploy[depends]. On a fresh work directory, do_compile runs the host gzip to create kernel/config_data.gz and, with CONFIG_KERNEL_GZIP, the compressed kernel payload. do_unpack cleans ${B} but not the recipe sysroot. After do_deploy has run once, a rebuild from do_unpack picks up pigz from gzip-native instead. Same .config, same uncompressed IKCONFIG data, but config_data.gz and the kernel image come out different. Add gzip-native to DEPENDS so the same compressor is used from the first do_compile. Signed-off-by: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com> --- Reproduced on master (fa83da7), nodistro, qemux86-64, linux-yocto 7.2.8: build linux-yocto, rerun do_unpack without touching the kernel sources or config (I added an unused file to SRC_URI), build again. A plain `-c compile -f` doesn't show it, kbuild doesn't regenerate the .gz files. - before do_deploy: host gzip 1.12, config_data.gz 38639 bytes - after do_deploy: sysroot pigz 2.8, config_data.gz 38702 bytes, bzImage 14844928 -> 14832640 bytes - with gzip-native in DEPENDS: pigz in both builds, same output Two fresh builds, and a rebuild without do_deploy in between, gave identical output. Bruce, you sent "[8/8] linux-yocto: add gzip-native to DEPENDS" in 2023 (patchwork 29990) and withdrew it. This one puts the dependency in the class instead. meta/classes-recipe/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)