diff mbox series

[v2] kernel.bbclass: add gzip-native to DEPENDS

Message ID 20261029174229.3427875-1-vinicius.eduardo.pedrosa@gmail.com
State New
Headers show
Series [v2] kernel.bbclass: add gzip-native to DEPENDS | expand

Commit Message

Vinicius Pedrosa Oct. 29, 2026, 5:42 p.m. UTC
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, and drop it from do_deploy[depends], which DEPENDS
now covers.

Acked-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
---

Notes:
    Changes in v2:
    - drop gzip-native from do_deploy[depends], as Bruce suggested. The
      modules tarball in do_deploy still gets pigz: do_deploy reaches
      gzip-native through do_install (checked with bitbake -g, not with
      a build).
    - kept Bruce's Ack, the only change is the one he suggested
    
    v1: https://patchwork.yoctoproject.org/project/oe-core/patch/20261029124742.3223868-1-vinicius.eduardo.pedrosa@gmail.com/

 meta/classes-recipe/kernel.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 0a6d754..46da867 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -19,14 +19,14 @@  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)}"
 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"
+do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
 do_clean[depends] += "make-mod-scripts:do_clean"
 
 # CPE entries from NVD use linux_kernel, but the raw CVE entries from the kernel CNA have