Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Anuj Mittal <anuj.mittal@intel.com>
To: Jaewon Lee <jaewon.lee@xilinx.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] devtool-source.bbclass: Support kernel fragments not in SRC_URI
Date: Wed, 1 Aug 2018 19:25:07 +0800	[thread overview]
Message-ID: <ab3cf6da-5f2a-ef98-92ca-8aaa3721df7f@intel.com> (raw)
In-Reply-To: <1532985713-15283-1-git-send-email-jaewon.lee@xilinx.com>

On 07/31/2018 05:21 AM, Jaewon Lee wrote:
> 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@xilinx.com>
> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
> ---
>  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..c70fea2 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()
> +

Would the patches included in these .scc files also need to be handled
in the same way? Would this also work if there are other scc files
included in a scc file?

Thanks,

Anuj


  parent reply	other threads:[~2018-08-01 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 21:21 [PATCH] devtool-source.bbclass: Support kernel fragments not in SRC_URI Jaewon Lee
2018-07-30 21:21 ` [PATCH] kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directives Jaewon Lee
2018-08-01 11:25 ` Anuj Mittal [this message]
2018-08-01 23:30   ` [PATCH] devtool-source.bbclass: Support kernel fragments not in SRC_URI Alejandro Enedino Hernandez Samaniego
2018-08-02  2:55     ` Anuj Mittal
2018-08-02  8:53       ` Richard Purdie
2018-08-02 20:55         ` Alejandro Enedino Hernandez Samaniego
2018-08-10  2:36           ` Anuj Mittal
     [not found]   ` <MWHPR02MB27684D092677AC56F96464DAAF2C0@MWHPR02MB2768.namprd02.prod.outlook.com>
2018-08-02  1:32     ` Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab3cf6da-5f2a-ef98-92ca-8aaa3721df7f@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=jaewon.lee@xilinx.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox