All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: add gzip-native to DEPENDS
@ 2026-10-29 12:47 Vinicius Pedrosa
  2026-10-29 13:11 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Pedrosa @ 2026-10-29 12:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Bruce Ashfield, Vinicius Pedrosa

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(-)

diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 0a6d754..99d652b 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -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)}"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-29 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 12:47 [PATCH] kernel.bbclass: add gzip-native to DEPENDS Vinicius Pedrosa
2026-10-29 13:11 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.