All of lore.kernel.org
 help / color / mirror / Atom feed
* How to switch kernel version without touching PREFERED VERSION
@ 2015-02-18 10:53 Valentin Le bescond
  2015-02-18 11:43 ` Gaurang Shastri
  2015-02-18 12:11 ` Paul Eggleton
  0 siblings, 2 replies; 8+ messages in thread
From: Valentin Le bescond @ 2015-02-18 10:53 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Hi all,

I'm working an a meta-wolfson layer to add the wolfson audio card support
to the meta-raspberrypi layer.

It's a very simple set of patche, but they apply to linux kernel 3.10.*

And the PREFERED_VERSION of the machine configuration (raspberrypi.conf)
is  :
PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%"

I would like to build my images using
linux-raspberrypi_3.10.38.bb
instead of
linux-raspberrypi_3.12.26.bb

What is the most "best practice" whay to achive this ?

Best regards

Valentin

[-- Attachment #2: Type: text/html, Size: 861 bytes --]

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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 10:53 How to switch kernel version without touching PREFERED VERSION Valentin Le bescond
@ 2015-02-18 11:43 ` Gaurang Shastri
  2015-02-18 12:06   ` Valentin Le bescond
  2015-02-18 12:11 ` Paul Eggleton
  1 sibling, 1 reply; 8+ messages in thread
From: Gaurang Shastri @ 2015-02-18 11:43 UTC (permalink / raw)
  To: Valentin Le bescond; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Well, if you want to use your own kernel source, you can use something like
this:
==
inherit kernel externalsrc
EXTERNALSRC = "/home/xyz/linux-stable"
S = "${EXTERNALSRC}"
...
==

//Gaurang Shastri


On Wed, Feb 18, 2015 at 4:23 PM, Valentin Le bescond <
valentin.lebescond@gmail.com> wrote:

> Hi all,
>
> I'm working an a meta-wolfson layer to add the wolfson audio card support
> to the meta-raspberrypi layer.
>
> It's a very simple set of patche, but they apply to linux kernel 3.10.*
>
> And the PREFERED_VERSION of the machine configuration (raspberrypi.conf)
> is  :
> PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%"
>
> I would like to build my images using
> linux-raspberrypi_3.10.38.bb
> instead of
> linux-raspberrypi_3.12.26.bb
>
> What is the most "best practice" whay to achive this ?
>
> Best regards
>
> Valentin
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #2: Type: text/html, Size: 1967 bytes --]

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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 11:43 ` Gaurang Shastri
@ 2015-02-18 12:06   ` Valentin Le bescond
  0 siblings, 0 replies; 8+ messages in thread
From: Valentin Le bescond @ 2015-02-18 12:06 UTC (permalink / raw)
  To: Gaurang Shastri; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2349 bytes --]

Thank you for your help !

What you propose is using a kernel downloaded manually and outside of the
yocto build directory ?

I don't intend to use a custom kernel source. I was hopping to just use the
existing 3.10.% kernel recipe.

this is the content of the recipes-kernel folder :

~/yocto/poky/meta-raspberrypi/recipes-kernel/linux$ ll
linux.inc
linux-raspberrypi/
linux-raspberrypi_3.10.38.bb
linux-raspberrypi_3.12.26.bb
linux-raspberrypi_3.16.1.bb
linux-raspberrypi_3.2.27.bb
linux-raspberrypi_3.6.11.bb
linux-raspberrypi_3.8.13.bb
linux-raspberrypi.inc

The way I understand it, bitbake looks into
~/yocto/poky/meta-raspberrypi/conf/machine to find the MACHINE defined in
the layer.conf (of the build directory).
it then looks at the PREFERED_VERSION_linux-raspberrypi variable inside the
raspberrypi.conf file, to know whitch linux-raspberrypi_${PV} to use.

Am i correct ?

What I WOULD like to do is : inside a meta-wolfson layer (wich includes a
linux-raspberrypi_3.10.38.bbappend) how to change the
linux-raspberrypi_${PV} that bitbake will use.

some kind of conf/machine/raspberryppi.conf.bbappend would be nice :)

Any ideas ?




2015-02-18 12:43 GMT+01:00 Gaurang Shastri <gmshastri@gmail.com>:

> Well, if you want to use your own kernel source, you can use something
> like this:
> ==
> inherit kernel externalsrc
> EXTERNALSRC = "/home/xyz/linux-stable"
> S = "${EXTERNALSRC}"
> ...
> ==
>
> //Gaurang Shastri
>
>
> On Wed, Feb 18, 2015 at 4:23 PM, Valentin Le bescond <
> valentin.lebescond@gmail.com> wrote:
>
>> Hi all,
>>
>> I'm working an a meta-wolfson layer to add the wolfson audio card support
>> to the meta-raspberrypi layer.
>>
>> It's a very simple set of patche, but they apply to linux kernel 3.10.*
>>
>> And the PREFERED_VERSION of the machine configuration (raspberrypi.conf)
>> is  :
>> PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%"
>>
>> I would like to build my images using
>> linux-raspberrypi_3.10.38.bb
>> instead of
>> linux-raspberrypi_3.12.26.bb
>>
>> What is the most "best practice" whay to achive this ?
>>
>> Best regards
>>
>> Valentin
>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4171 bytes --]

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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 10:53 How to switch kernel version without touching PREFERED VERSION Valentin Le bescond
  2015-02-18 11:43 ` Gaurang Shastri
@ 2015-02-18 12:11 ` Paul Eggleton
  2015-02-18 16:33   ` Valentin Le bescond
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2015-02-18 12:11 UTC (permalink / raw)
  To: Valentin Le bescond; +Cc: yocto

Hi Valentin,

On Wednesday 18 February 2015 11:53:57 Valentin Le bescond wrote:
> I'm working an a meta-wolfson layer to add the wolfson audio card support
> to the meta-raspberrypi layer.
> 
> It's a very simple set of patche, but they apply to linux kernel 3.10.*
> 
> And the PREFERED_VERSION of the machine configuration (raspberrypi.conf)
> is  :
> PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%"
> 
> I would like to build my images using
> linux-raspberrypi_3.10.38.bb
> instead of
> linux-raspberrypi_3.12.26.bb
> 
> What is the most "best practice" whay to achive this ?

Why do you say "without touching PREFERRED_VERSION"? That would be the proper 
way to select that kernel for building. Seeing as it is set with ?= it is easy 
to override it with = from your local.conf if that's what you want to do.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 12:11 ` Paul Eggleton
@ 2015-02-18 16:33   ` Valentin Le bescond
  2015-02-18 16:41     ` Gary Thomas
  2015-02-18 16:48     ` Paul Eggleton
  0 siblings, 2 replies; 8+ messages in thread
From: Valentin Le bescond @ 2015-02-18 16:33 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Hi Paul, thank you.

I tryed editing /meta-wolfson/conf/layer.conf or /build/conf/layer.conf,
adding :
PREFERED_VERSION_linux-raspberrypi = "3.10.%"

but neither worked (still using 3.12)

I endded up editing meta-raspberrypi's machine configuration and it works
fine.

It's good, but that means I will need to apply this change to every
building machine I will use, or fork the meta-raspberrypi repo, witch is
another story.
I was hoping to keep everything inside my wolfson layer. too bad.

Thanks again.

V.

[-- Attachment #2: Type: text/html, Size: 728 bytes --]

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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 16:33   ` Valentin Le bescond
@ 2015-02-18 16:41     ` Gary Thomas
  2015-02-18 16:48     ` Paul Eggleton
  1 sibling, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2015-02-18 16:41 UTC (permalink / raw)
  To: yocto

On 2015-02-18 09:33, Valentin Le bescond wrote:
> Hi Paul, thank you.
>
> I tryed editing /meta-wolfson/conf/layer.conf or /build/conf/layer.conf, adding :
> PREFERED_VERSION_linux-raspberrypi = "3.10.%"
>
> but neither worked (still using 3.12)
>
> I endded up editing meta-raspberrypi's machine configuration and it works fine.
>
> It's good, but that means I will need to apply this change to every building machine I will use, or fork the meta-raspberrypi repo, witch is another story.
> I was hoping to keep everything inside my wolfson layer. too bad.
>
> Thanks again.

Is this the actual line you used?  It should be
   PREFERRED_VERSION_linux-raspberrypi = "3.10.%"

Note the spelling.

Also, if you want to make a change like this, use local.conf.
It really doesn't belong in any layer.conf

BTW, what's your reason for using an older kernel?

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


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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 16:33   ` Valentin Le bescond
  2015-02-18 16:41     ` Gary Thomas
@ 2015-02-18 16:48     ` Paul Eggleton
  2015-02-18 17:36       ` Valentin Le bescond
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2015-02-18 16:48 UTC (permalink / raw)
  To: Valentin Le bescond; +Cc: yocto

On Wednesday 18 February 2015 17:33:26 Valentin Le bescond wrote:
> I tryed editing /meta-wolfson/conf/layer.conf or /build/conf/layer.conf,
> adding :
> PREFERED_VERSION_linux-raspberrypi = "3.10.%"
> 
> but neither worked (still using 3.12)

I assume you tried build/conf/local.conf not build/conf/layer.conf?

If so, that should have worked. You can run bitbake -e | less and look through 
the history to see what is overriding it if it doesn't work.
 
> I endded up editing meta-raspberrypi's machine configuration and it works
> fine.
> 
> It's good, but that means I will need to apply this change to every
> building machine I will use, or fork the meta-raspberrypi repo, witch is
> another story.
> I was hoping to keep everything inside my wolfson layer. too bad.

FWIW, in general forcing a particular kernel version from a layer.conf like 
this isn't very good practice. People who use your layer may not expect to 
have the kernel version switched just by adding it to their bblayers.conf. 
(There may perhaps be mitigating circumstances in this case.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: How to switch kernel version without touching PREFERED VERSION
  2015-02-18 16:48     ` Paul Eggleton
@ 2015-02-18 17:36       ` Valentin Le bescond
  0 siblings, 0 replies; 8+ messages in thread
From: Valentin Le bescond @ 2015-02-18 17:36 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]

@Gary, you were right on the spelling. It always works best without
spelling mistakes (inside "meta-wolfson/conf/layer.conf")

I did indeed meant local.conf, not layer.conf in the build dir.

I wanted to use an older kernel because the wolfson audio card for the rpi
is distributed as a set of patch dedicated to the 3.10 kernel.

But then I tried the build and even with the right kernel, the patch list
threw errors.

Anyway, I found that cirrus logic just bought wolfson and created a new
audio extension for the rpi.
So I dumped the idea of the meta-wolfson layer and will start with
meta-cirrus.

This time the bbappend will have to change the github source directly as
cirrus provides the whole kernel (3.12 amongst others...).

Well thank you all very much !

Valentin






2015-02-18 17:48 GMT+01:00 Paul Eggleton <paul.eggleton@linux.intel.com>:

> On Wednesday 18 February 2015 17:33:26 Valentin Le bescond wrote:
> > I tryed editing /meta-wolfson/conf/layer.conf or /build/conf/layer.conf,
> > adding :
> > PREFERED_VERSION_linux-raspberrypi = "3.10.%"
> >
> > but neither worked (still using 3.12)
>
> I assume you tried build/conf/local.conf not build/conf/layer.conf?
>
> If so, that should have worked. You can run bitbake -e | less and look
> through
> the history to see what is overriding it if it doesn't work.
>
> > I endded up editing meta-raspberrypi's machine configuration and it works
> > fine.
> >
> > It's good, but that means I will need to apply this change to every
> > building machine I will use, or fork the meta-raspberrypi repo, witch is
> > another story.
> > I was hoping to keep everything inside my wolfson layer. too bad.
>
> FWIW, in general forcing a particular kernel version from a layer.conf like
> this isn't very good practice. People who use your layer may not expect to
> have the kernel version switched just by adding it to their bblayers.conf.
> (There may perhaps be mitigating circumstances in this case.)
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>

[-- Attachment #2: Type: text/html, Size: 2849 bytes --]

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

end of thread, other threads:[~2015-02-18 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 10:53 How to switch kernel version without touching PREFERED VERSION Valentin Le bescond
2015-02-18 11:43 ` Gaurang Shastri
2015-02-18 12:06   ` Valentin Le bescond
2015-02-18 12:11 ` Paul Eggleton
2015-02-18 16:33   ` Valentin Le bescond
2015-02-18 16:41     ` Gary Thomas
2015-02-18 16:48     ` Paul Eggleton
2015-02-18 17:36       ` Valentin Le bescond

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.