[oe-commits] [openembedded-core] 02/03: devtool-source.bbclass: Support kernel fragments not in SRC_URI
git at git.openembedded.org
git at git.openembedded.org
Wed Aug 1 09:28:35 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 773d0432e5e946eb126f69b39d77a9f78b83d258
Author: Jaewon Lee <jaewon.lee at xilinx.com>
AuthorDate: Mon Jul 30 14:21:52 2018 -0700
devtool-source.bbclass: Support kernel fragments not in SRC_URI
When using a recipe space kernel-meta, scc files are added through
SRC_URI, but they may include corresponding kernel fragments that are
not necessarily in SRC_URI.
For bitbake, this is not a problem because the kernel-yocto class adds
the path where the .scc file was found to includes which consequentially
makes the .cfg file available to the kernel build.
However, when using devtool, only files specified in SRC_URI are copied
to oe-local-files in devtool's workspace. So if the cfg file is not in
SRC_URI, it won't be copied, causing a kernel build failure when trying
to find it.
This fix parses local .scc files in SRC_URI, copies the corresponding .cfg
file to devtool's workdir, and also adds it to local_files so it is
available when doing a devtool build for the kernel.
[YOCTO #12858]
Signed-off-by: Jaewon Lee <jaewon.lee at xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr at xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/devtool-source.bbclass | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
index 56882a4..29be998 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -90,11 +90,23 @@ python devtool_post_unpack() {
fname in files])
return ret
+ is_kernel_yocto = bb.data.inherits_class('kernel-yocto', d)
# Move local source files into separate subdir
recipe_patches = [os.path.basename(patch) for patch in
oe.recipeutils.get_recipe_patches(d)]
local_files = oe.recipeutils.get_recipe_local_files(d)
+ if is_kernel_yocto:
+ for key in local_files.copy():
+ if key.endswith('scc'):
+ sccfile = open(local_files[key], 'r')
+ for l in sccfile:
+ line = l.split()
+ if line and line[0] == 'kconf' and line[-1].endswith('.cfg'):
+ local_files[line[-1]] = os.path.join(os.path.dirname(local_files[key]), line[-1])
+ shutil.copy2(os.path.join(os.path.dirname(local_files[key]), line[-1]), workdir)
+ sccfile.close()
+
# Ignore local files with subdir={BP}
srcabspath = os.path.abspath(srcsubdir)
local_files = [fname for fname in local_files if
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list