path: root/scripts
diff options
authorNathan Rossi <>2019-04-03 05:37:02 +0000
committerRichard Purdie <>2019-04-05 17:33:01 +0100
commit7a1fabe4a24552ce8a50c8d6009969ca52a5fd27 (patch)
tree1fef9fdb0f45c901d706e60ace64f951ce1c85de /scripts
parent091c46a8ecba6b6b7c44078ae2b567a2ef6e72e9 (diff)
devtool: standard: Handle exporting generated config fragments
The cml1 and ccmake bbclasses generate configuration fragment source files that must be exported from the WORKDIR as a source file to be preserved across builds. This change adds detection of the current recipes inherited classes and for cml1 and ccmake classes checks for the specific generated configuration fragment files. These files are then exported by devtool and included as SRC_URI files from within the target layer. Signed-off-by: Nathan Rossi <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'scripts')
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/devtool/ b/scripts/lib/devtool/
index ea09bbff31..0a1e329e61 100644
--- a/scripts/lib/devtool/
+++ b/scripts/lib/devtool/
@@ -1328,6 +1328,20 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
if os.path.exists(os.path.join(local_files_dir, fragment_fn)):
os.unlink(os.path.join(local_files_dir, fragment_fn))
+ # Special handling for cml1, ccmake, etc bbclasses that generated
+ # configuration fragment files that are consumed as source files
+ for frag_class, frag_name in [("cml1", "fragment.cfg"), ("ccmake", "site-file.cmake")]:
+ if, rd):
+ srcpath = os.path.join(rd.getVar('WORKDIR'), frag_name)
+ if os.path.exists(srcpath):
+ if frag_name not in new_set:
+ new_set.append(frag_name)
+ # copy fragment into destdir
+ shutil.copy2(srcpath, destdir)
+ # copy fragment into local files if exists
+ if os.path.isdir(local_files_dir):
+ shutil.copy2(srcpath, local_files_dir)
if new_set is not None:
for fname in new_set:
if fname in existing_files: