All of lore.kernel.org
 help / color / mirror / Atom feed
* Customizing kernels
@ 2011-07-27 17:25 Gary Thomas
  2011-07-27 19:58 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2011-07-27 17:25 UTC (permalink / raw)
  To: Poky Project

To run a customized kernel configuration, I've been doing this:
   % bitbake virtual/kernel
   % bitbake virtual/kernel -c menuconfig
   % bitbake virtual/kernel -c compile -f
   % bitbake virtual/kernel

Is there some way that the kernel recipes (probably kernel.bbclass)
could mark the compile state as invalid so that the '-c compile -f'
step is no longer needed (implied)?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: Customizing kernels
  2011-07-27 17:25 Customizing kernels Gary Thomas
@ 2011-07-27 19:58 ` Tom Rini
  2011-07-27 20:08   ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2011-07-27 19:58 UTC (permalink / raw)
  To: poky

On 07/27/2011 10:25 AM, Gary Thomas wrote:
> To run a customized kernel configuration, I've been doing this:
>   % bitbake virtual/kernel
>   % bitbake virtual/kernel -c menuconfig
>   % bitbake virtual/kernel -c compile -f
>   % bitbake virtual/kernel
> 
> Is there some way that the kernel recipes (probably kernel.bbclass)
> could mark the compile state as invalid so that the '-c compile -f'
> step is no longer needed (implied)?

What's the reason around the first bitbake?  I know with pstage you
needed to do that for an empty TMPDIR to populate out everything else,
but sstate shouldn't have that weakness.  It should just be:
$ bitbake virtual/kernel -c menuconfig
$ bitbake virtual/kernel

And get populating from sstate correct.

-- 
Tom Rini
Mentor Graphics Corporation


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

* Re: Customizing kernels
  2011-07-27 19:58 ` Tom Rini
@ 2011-07-27 20:08   ` Gary Thomas
  2011-07-27 20:17     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2011-07-27 20:08 UTC (permalink / raw)
  To: Tom Rini; +Cc: poky

On 2011-07-27 13:58, Tom Rini wrote:
> On 07/27/2011 10:25 AM, Gary Thomas wrote:
>> To run a customized kernel configuration, I've been doing this:
>>    % bitbake virtual/kernel
>>    % bitbake virtual/kernel -c menuconfig
>>    % bitbake virtual/kernel -c compile -f
>>    % bitbake virtual/kernel
>>
>> Is there some way that the kernel recipes (probably kernel.bbclass)
>> could mark the compile state as invalid so that the '-c compile -f'
>> step is no longer needed (implied)?
>
> What's the reason around the first bitbake?  I know with pstage you
> needed to do that for an empty TMPDIR to populate out everything else,
> but sstate shouldn't have that weakness.  It should just be:
> $ bitbake virtual/kernel -c menuconfig
> $ bitbake virtual/kernel

>
> And get populating from sstate correct.
>

The first step was just to get started, e.g. from scratch (no sstate, etc)

The situation I'm really talking about is when you've already built the
whole thing (presumably a full image, etc) and then want to change some
kernel option, e.g. add a non-module driver and not rebuild the kernel
from scratch, just recompile the required bits.  In this case, if you
just run the two steps you quote, nothing happens during the second
step because bitbake thinks that the whole recipe is complete.  Once
you run '-c compile -f', it will rerun the compile and that invalidates
the steps that follow in the recipe so they all run as well.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: Customizing kernels
  2011-07-27 20:08   ` Gary Thomas
@ 2011-07-27 20:17     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2011-07-27 20:17 UTC (permalink / raw)
  To: Gary Thomas; +Cc: poky

On 07/27/2011 01:08 PM, Gary Thomas wrote:
> On 2011-07-27 13:58, Tom Rini wrote:
>> On 07/27/2011 10:25 AM, Gary Thomas wrote:
>>> To run a customized kernel configuration, I've been doing this:
>>>    % bitbake virtual/kernel
>>>    % bitbake virtual/kernel -c menuconfig
>>>    % bitbake virtual/kernel -c compile -f
>>>    % bitbake virtual/kernel
>>>
>>> Is there some way that the kernel recipes (probably kernel.bbclass)
>>> could mark the compile state as invalid so that the '-c compile -f'
>>> step is no longer needed (implied)?
>>
>> What's the reason around the first bitbake?  I know with pstage you
>> needed to do that for an empty TMPDIR to populate out everything else,
>> but sstate shouldn't have that weakness.  It should just be:
>> $ bitbake virtual/kernel -c menuconfig
>> $ bitbake virtual/kernel
> 
>>
>> And get populating from sstate correct.
>>
> 
> The first step was just to get started, e.g. from scratch (no sstate, etc)

In that case, you can just to -c menuconfig and then build, but...

> The situation I'm really talking about is when you've already built the
> whole thing (presumably a full image, etc) and then want to change some
> kernel option, e.g. add a non-module driver and not rebuild the kernel
> from scratch, just recompile the required bits.  In this case, if you
> just run the two steps you quote, nothing happens during the second
> step because bitbake thinks that the whole recipe is complete.  Once
> you run '-c compile -f', it will rerun the compile and that invalidates
> the steps that follow in the recipe so they all run as well.

Yes, this is annoying.  The problem stems from menuconfig being
optional.  You could do instead:
bitbake -f -c configure virtual/kernel
bitbake -c menuconfig virtual/kernel
bitbake virtual/kernel

But indeed, that's not much better, it's just re-ordering things.  I
don't know off hand if there's a way to mark a task as invalid from
another task, which is what's needed here (especially when we move the
menuconfig bits to where busybox/etc can use them).

-- 
Tom Rini
Mentor Graphics Corporation


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

end of thread, other threads:[~2011-07-27 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 17:25 Customizing kernels Gary Thomas
2011-07-27 19:58 ` Tom Rini
2011-07-27 20:08   ` Gary Thomas
2011-07-27 20:17     ` Tom Rini

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.