All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: lothar@denx.de
Cc: yocto@yoctoproject.org
Subject: Re: SRC_URI_kernel in machine conf
Date: Thu, 05 Sep 2013 11:39:57 +0100	[thread overview]
Message-ID: <3128287.s7bpGpUtCd@helios> (raw)
In-Reply-To: <b9f5b1f042ece4ed9e9d70b71e919fcd@denx.de>

Hi Lothar,

On Thursday 05 September 2013 12:09:57 lothar@denx.de wrote:
> Is it possible to declare a kernels' SRC_URI, as also certain functions,
> directly in the machine config, instead of the kernel .bb?
> 
> Example: currently I declare the following in a mykernel.bb (derrived
> from kernel.bbclass)
>      SRC_URI_mymachine = "git:my-git-repo"
>      do_compile_append_mymachine(){
>          rm somefile
>      }
> 
> ...is it possible now, to move this specific code into the
> mymachine.conf file, like
>      SRC_URI_mykernel = "git:my-git-repo"
>      do_compile_mykernel_append(){
>          rm somefile
>      }
> 
> Questions:
> 1) Is this possible at all?

I don't think this will work; and even if it does it is not advisable. You 
should do one of two things instead:

A) Make the switch within the kernel recipe using machine overrides (this is 
often done with linux-yocto)

B) Have a different recipe for each kernel and select the appropriate one with 
PREFERRED_PROVIDER_virtual/kernel in the machine configuration

> 2) Is it better to use suffix "_mykernel", "_kernel" or
> "_virtual/kernel"?

I don't think any of these will work in this instance.

> 3) I saw settings sometimes using the suffix "_kernelname" e.g.
> "_linux-yocto" and other times "_virtual/kernel" - what are the
> differences between them? When better use one, when better use the
> other?

"virtual/kernel" or "linux-yocto" (or any recipe name) as an override will 
only work with certain variables, e.g. PREFERRED_VERSION or PREFERRED_PROVIDER 
at the global level. Elsewhere it will not work. If you run bitbake -e | less 
and search for ^OVERRIDES= you will see the overrides that generally work for 
all variables based on your current configuration, as well as how the overrides 
are set up based on the values of other variables such as DISTRO, MACHINE, PN 
etc.

Cheers,
Paul


-- 

Paul Eggleton
Intel Open Source Technology Centre


      reply	other threads:[~2013-09-05 10:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 10:09 SRC_URI_kernel in machine conf lothar
2013-09-05 10:39 ` Paul Eggleton [this message]

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=3128287.s7bpGpUtCd@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=lothar@denx.de \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.