Bug 12858

Summary: devtool build fails on kernel if including any local scc file
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jaewon Lee <jaewon>
Component: Scripts and ToolsAssignee: Jaewon Lee <jaewon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alejandr, ross.burton
Version: 2.6   
Target Milestone: 2.6 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Jaewon Lee 2018-07-18 22:53:44 UTC
When an scc file is added to SRC_URI without adding the cfg file as well, devtool build fails.

Taking the example of meta-openamp layer with local kmeta files,
https://github.com/OpenAMP/meta-openamp/blob/master/recipes-kernel/linux/linux-%25.bbappend


Using bitbake, the scc file is pulled from  sources/meta-openamp/recipes-kernel/linux/configs. (This folder is in FILESEXTRAPATHS)
These lines in kernel-yocto.bbclass:
         for s in ${sccs} ${patches}; do
                 sdir=$(dirname $s)
                 includes="$includes -I${sdir}"

add the directory containing the scc file to includes and this works because the openamp scc and cfg files are both in that directory (...recipes-kernel/linux/configs) so it can find the cfg file 

Using devtool however, the scc file is pulled from oe-local-files. (only files in SRC_URI are copied to oe-local-files/ directory in devtool's workspace) and this is a problem because the cfg file is not copied (because its not in SRC_URI) along with the scc file.

Seeing as documentation says "It is only necessary to specify the .scc files on the SRC_URI."
https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#recipe-space-metadata
This should be supported by devtool as well.