Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: install .config to deploy dir
@ 2024-02-07 10:25 Matthias Schiffer
  2024-02-07 12:42 ` [OE-core] " Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Matthias Schiffer @ 2024-02-07 10:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: oss, Matthias Schiffer

Deploy the kernel configuration with the built images, so it is easy to
check its contents, or rebuild the same configuration outside of the
Yocto build system.

This can be particularly convenient when running a Yocto build as a CI
job, and only the deploy dir is made available for download.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
 meta/classes-recipe/kernel-artifact-names.bbclass | 3 +++
 meta/classes-recipe/kernel.bbclass                | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass
index 1a7611a15e..8e2ef0d627 100644
--- a/meta/classes-recipe/kernel-artifact-names.bbclass
+++ b/meta/classes-recipe/kernel-artifact-names.bbclass
@@ -16,6 +16,9 @@ KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_V
 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
 KERNEL_ARTIFACT_BIN_EXT ?= ".bin"
 
+KERNEL_CONFIG_NAME ?= "${KERNEL_ARTIFACT_NAME}"
+KERNEL_CONFIG_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
+
 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
 KERNEL_IMAGE_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}"
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index a76aaee5ba..8a98899e04 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -812,6 +812,13 @@ kernel_do_deploy() {
 		mkdir "$deployDir"
 	fi
 
+	if [ -n "${KERNEL_CONFIG_NAME}" ]; then
+		install -m 0644 .config $deployDir/config-${KERNEL_CONFIG_NAME}
+		if [ -n "${KERNEL_CONFIG_LINK_NAME}" ]; then
+			ln -sf config-${KERNEL_CONFIG_NAME} $deployDir/config-${KERNEL_CONFIG_LINK_NAME}
+		fi
+	fi
+
 	for imageType in ${KERNEL_IMAGETYPES} ; do
 		baseName=$imageType-${KERNEL_IMAGE_NAME}
 
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/



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

end of thread, other threads:[~2024-02-09  7:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 10:25 [PATCH] kernel.bbclass: install .config to deploy dir Matthias Schiffer
2024-02-07 12:42 ` [OE-core] " Bruce Ashfield
2024-02-07 13:14   ` Matthias Schiffer
2024-02-07 13:33     ` Mikko Rapeli
2024-02-07 13:51       ` Bruce Ashfield
2024-02-07 15:58 ` Ross Burton
2024-02-08  8:50   ` Matthias Schiffer
2024-02-08  9:31     ` Jose Quaresma
2024-02-08 13:54 ` Jörg Sommer
2024-02-08 23:16   ` Alexandre Belloni
2024-02-09  7:25     ` Jörg Sommer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox