Skip to contentSkip to conversation

kernel.bbclass: add gzip-native to DEPENDS

PATCH New Vinicius Pedrosa 1 participant 1 message Oct 29

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kernel.bbclass: add gzip-native to DEPENDS

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.

---

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/[email protected]/

 meta/classes-recipe/kernel.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes-recipe/kernel.bbclass +2 -2
index 0a6d754..46da867 100644
@@ -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
Signature · 1 line
2.43.0