* [PATCH] move find_cfgs() helper to cml1.bbclass
@ 2020-07-09 20:19 Rasmus Villemoes
2020-07-09 20:32 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2020-07-09 20:19 UTC (permalink / raw)
To: openembedded-core; +Cc: Richard Purdie, Rasmus Villemoes
u-boot.inc and busybox.inc contain identical copies of this little
helper. They both inherit the cml1 class and use cml1_do_configure
right after having used this helper, and other recipes that want to
write similar logic for doing Kconfig via fragments will also need it
or something equivalent.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
Those other recipes can certainly also just copy-paste find_cfgs(),
but I think it's nice to avoid even small pieces of code duplication
(it all adds up).
What does cml1 stand for? I can't find anything in git history or
comments, and "basic support for the Linux kernel style build
configuration system" doesn't provide much of a clue either.
meta/classes/cml1.bbclass | 10 ++++++++++
meta/recipes-bsp/u-boot/u-boot.inc | 10 ----------
meta/recipes-core/busybox/busybox.inc | 10 ----------
3 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index c7f6723cb3..8ab240589a 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -1,3 +1,13 @@
+# returns all the elements from the src uri that are .cfg files
+def find_cfgs(d):
+ sources=src_patches(d, True)
+ sources_list=[]
+ for s in sources:
+ if s.endswith('.cfg'):
+ sources_list.append(s)
+
+ return sources_list
+
cml1_do_configure() {
set -e
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c91da02959..5ec3d90764 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -70,16 +70,6 @@ UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
-# returns all the elements from the src uri that are .cfg files
-def find_cfgs(d):
- sources=src_patches(d, True)
- sources_list=[]
- for s in sources:
- if s.endswith('.cfg'):
- sources_list.append(s)
-
- return sources_list
-
do_configure () {
if [ -n "${UBOOT_CONFIG}" ]; then
unset i j
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 6cfdcd7344..45aaa2b41c 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -133,16 +133,6 @@ do_prepare_config () {
fi
}
-# returns all the elements from the src uri that are .cfg files
-def find_cfgs(d):
- sources=src_patches(d, True)
- sources_list=[]
- for s in sources:
- if s.endswith('.cfg'):
- sources_list.append(s)
-
- return sources_list
-
do_configure () {
set -x
do_prepare_config
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-09 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-09 20:19 [PATCH] move find_cfgs() helper to cml1.bbclass Rasmus Villemoes
2020-07-09 20:32 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox