Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-Core][PATCH v2 1/3] kernel: classes: Extract savedefconfig to a class
@ 2022-10-12  7:18 Alex Kiernan
  2022-10-12  7:18 ` [OE-Core][PATCH v2 2/3] u-boot: Remove duplicate inherit of cml1 Alex Kiernan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alex Kiernan @ 2022-10-12  7:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Move savedefconfig task to a class so we can reuse it in other recipes
which support it.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 meta/classes-recipe/cml1-savedefconfig.bbclass | 12 ++++++++++++
 meta/classes-recipe/kernel.bbclass             |  9 +--------
 2 files changed, 13 insertions(+), 8 deletions(-)
 create mode 100644 meta/classes-recipe/cml1-savedefconfig.bbclass

diff --git a/meta/classes-recipe/cml1-savedefconfig.bbclass b/meta/classes-recipe/cml1-savedefconfig.bbclass
new file mode 100644
index 000000000000..c340aac11204
--- /dev/null
+++ b/meta/classes-recipe/cml1-savedefconfig.bbclass
@@ -0,0 +1,12 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+do_savedefconfig() {
+	bbplain "Saving defconfig to:\n${B}/defconfig"
+	oe_runmake -C ${B} savedefconfig
+}
+do_savedefconfig[nostamp] = "1"
+addtask savedefconfig after do_configure
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index e4e69e076375..eae7b2f78a9e 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -634,14 +634,7 @@ kernel_do_configure() {
 	${KERNEL_CONFIG_COMMAND}
 }
 
-do_savedefconfig() {
-	bbplain "Saving defconfig to:\n${B}/defconfig"
-	oe_runmake -C ${B} savedefconfig
-}
-do_savedefconfig[nostamp] = "1"
-addtask savedefconfig after do_configure
-
-inherit cml1
+inherit cml1 cml1-savedefconfig
 
 # Need LD, HOSTLDFLAGS and more for config operations
 KCONFIG_CONFIG_COMMAND:append = " ${EXTRA_OEMAKE}"
-- 
2.35.1



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

end of thread, other threads:[~2022-11-01 11:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-12  7:18 [OE-Core][PATCH v2 1/3] kernel: classes: Extract savedefconfig to a class Alex Kiernan
2022-10-12  7:18 ` [OE-Core][PATCH v2 2/3] u-boot: Remove duplicate inherit of cml1 Alex Kiernan
2022-10-12  7:18 ` [OE-Core][PATCH v2 3/3] u-boot: Add savedefconfig task Alex Kiernan
2022-10-12 16:35 ` [OE-Core][PATCH v2 1/3] kernel: classes: Extract savedefconfig to a class Ross Burton
2022-10-12 17:49   ` Khem Raj
2022-10-12 19:43   ` Alex Kiernan
2022-10-13  5:31     ` Ulrich Ölmann
2022-10-31 22:12     ` Ross Burton
2022-11-01 11:32       ` Richard Purdie

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