All of lore.kernel.org
 help / color / mirror / Atom feed
* SRC_URI_kernel in machine conf
@ 2013-09-05 10:09 lothar
  2013-09-05 10:39 ` Paul Eggleton
  0 siblings, 1 reply; 2+ messages in thread
From: lothar @ 2013-09-05 10:09 UTC (permalink / raw)
  To: yocto

Hello Yoctoholics!

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?

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

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?

BR,
L


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SRC_URI_kernel in machine conf
  2013-09-05 10:09 SRC_URI_kernel in machine conf lothar
@ 2013-09-05 10:39 ` Paul Eggleton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2013-09-05 10:39 UTC (permalink / raw)
  To: lothar; +Cc: yocto

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-05 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 10:09 SRC_URI_kernel in machine conf lothar
2013-09-05 10:39 ` Paul Eggleton

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.