Skip to contentSkip to conversation

Crazy versioning

DISCUSSION Gary Thomas 5 participants 7 messages Sep 27, 2011

lore
Share & tools
lore
#0 lore raw

I'm trying to use the recipe meta/recipes-bsp/u-boot/u-boot_2011.06.bb Since there are a number of u-boot recipes, I want to make sure I get the right one, plus I'm writing a .bbappend file to add patches for my own boards.

So I added this to my MACHINE.conf:
PREFERRED_VERSION_u-boot = "2011.06"

When I try to build, I get this error:
NOTE: preferred version 2011.06 of u-boot not available (for item u-boot)
NOTE: versions of u-boot available: git v2011.06+git16+b1af6f532e0d348b153d5c148369229d24af361a
I guess this is because the recipe has this for PV
SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a"
PV = "v2011.06+git${SRCPV}"
The truly bizarre thing is that if my cache is rebuilt, the version printed changes, e.g.
% touch conf/local.conf
% bitbake u-boot
NOTE: versions of u-boot available: git v2011.06+git18+b1af6f532e0d348b153d5c148369229d24af361a

So, how do I specify the right value in PREFERRED_VERSION?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 22 lines · Gary Thomas

I'm trying to use the recipe meta/recipes-bsp/u-boot/u-boot_2011.06.bb Since there are a number of u-boot recipes, I want to make sure I get the right one, plus I'm writing a .bbappend file to add patches for my own boards.

So I added this to my MACHINE.conf:
 PREFERRED_VERSION_u-boot = "2011.06"

When I try to build, I get this error:
 NOTE: preferred version 2011.06 of u-boot not available (for item u-boot)
 NOTE: versions of u-boot available: git v2011.06+git16+b1af6f532e0d348b153d5c148369229d24af361a
I guess this is because the recipe has this for PV
 SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a"
 PV = "v2011.06+git${SRCPV}"
The truly bizarre thing is that if my cache is rebuilt, the version printed changes, e.g.
 % touch conf/local.conf
 % bitbake u-boot
 NOTE: versions of u-boot available: git v2011.06+git18+b1af6f532e0d348b153d5c148369229d24af361a

Quoted 1 line

So, how do I specify the right value in PREFERRED_VERSION?

Should just be:

PREFERRED_VERSION_u-boot = "v2011.06%"

or

PREFERRED_VERSION_u-boot = "v2011.06+git%"

if you like that format more. I went through the same thing with the kernel recipes, and the solution is to specify a wildcard via %

Cheers,

Bruce

Quoted 11 lines

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#2 lore raw
In reply to Gary Thomas
Quoted 19 lines · Gary Thomas

I'm trying to use the recipe meta/recipes-bsp/u-boot/u-boot_2011.06.bb Since there are a number of u-boot recipes, I want to make sure I get the right one, plus I'm writing a .bbappend file to add patches for my own boards.

So I added this to my MACHINE.conf:

   PREFERRED_VERSION_u-boot = "2011.06"

When I try to build, I get this error:
NOTE: preferred version 2011.06 of u-boot not available (for item u-boot)
NOTE: versions of u-boot available: git v2011.06+git16+b1af6f532e0d348b153d5c148369229d24af361a
I guess this is because the recipe has this for PV
SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a"
PV = "v2011.06+git${SRCPV}"
The truly bizarre thing is that if my cache is rebuilt, the version printed changes, e.g.
% touch conf/local.conf
% bitbake u-boot
NOTE: versions of u-boot available: git v2011.06+git18+b1af6f532e0d348b153d5c148369229d24af361a

Quoted 1 line

So, how do I specify the right value in PREFERRED_VERSION?

with % as wildchar

PREFERRED_VERSION_u-boot = "v2011.06%"

Quoted 10 lines
Signature · 9 lines
-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
In reply to Gary Thomas
Quoted 19 lines · Gary Thomas

I'm trying to use the recipe meta/recipes-bsp/u-boot/u-boot_2011.06.bb Since there are a number of u-boot recipes, I want to make sure I get the right one, plus I'm writing a .bbappend file to add patches for my own boards.

So I added this to my MACHINE.conf:

   PREFERRED_VERSION_u-boot = "2011.06"

When I try to build, I get this error:
NOTE: preferred version 2011.06 of u-boot not available (for item u-boot)
NOTE: versions of u-boot available: git v2011.06+git16+b1af6f532e0d348b153d5c148369229d24af361a
I guess this is because the recipe has this for PV
SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a"
PV = "v2011.06+git${SRCPV}"
The truly bizarre thing is that if my cache is rebuilt, the version printed changes, e.g.
% touch conf/local.conf
% bitbake u-boot
NOTE: versions of u-boot available: git v2011.06+git18+b1af6f532e0d348b153d5c148369229d24af361a

Quoted 1 line

So, how do I specify the right value in PREFERRED_VERSION?

You look at the PV value in the recipe and then write something like:

PREFERRED_VERSION_u-boot = "2011.06+git%"

where % is a wildcard that matches the revision.

The reason the version incremented is down to bitbake thinking multiple versions were being built and trying to keep versions atomically increasing.

Cheers,

Richard

#4 lore raw
Quoted 24 lines · Richard Purdie
Quoted 12 lines · Gary Thomas

I'm trying to use the recipe meta/recipes-bsp/u-boot/u-boot_2011.06.bb Since there are a number of u-boot recipes, I want to make sure I get the right one, plus I'm writing a .bbappend file to add patches for my own boards.

So I added this to my MACHINE.conf:

    PREFERRED_VERSION_u-boot = "2011.06"

When I try to build, I get this error:
NOTE: preferred version 2011.06 of u-boot not available (for item u-boot)
NOTE: versions of u-boot available: git v2011.06+git16+b1af6f532e0d348b153d5c148369229d24af361a
I guess this is because the recipe has this for PV

Quoted 8 lines
    SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a"
    PV = "v2011.06+git${SRCPV}"

The truly bizarre thing is that if my cache is rebuilt, the version printed changes, e.g.
% touch conf/local.conf
% bitbake u-boot
NOTE: versions of u-boot available: git v2011.06+git18+b1af6f532e0d348b153d5c148369229d24af361a

So, how do I specify the right value in PREFERRED_VERSION?

You look at the PV value in the recipe and then write something like:

Quoted 7 lines

PREFERRED_VERSION_u-boot = "2011.06+git%"

where % is a wildcard that matches the revision.

The reason the version incremented is down to bitbake thinking multiple versions were being built and trying to keep versions atomically increasing.

Thanks, that does work.

I gave a cursory look in the documentation (both Yocto & bitbake) and I didn't see an explanation of this. There's a single reference
../documentation/bsp-guide/bsp.xml: PREFERRED_VERSION_linux-yocto = "3.0%"
but nothing that explains it.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#5 lore raw

Hi Gary,

Quoted 4 lines · On Tuesday 27 September 2011 14:19:02 Gary Thomas wrote:

I gave a cursory look in the documentation (both Yocto & bitbake) and I didn't see an explanation of this. There's a single reference
../documentation/bsp-guide/bsp.xml: PREFERRED_VERSION_linux-yocto =
"3.0%" but nothing that explains it.

FYI I have sent Scott R some additions to the variable reference in the manual that will mention the % wildcard and give an example.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#6 lore raw
Quoted 10 lines · Paul Eggleton

Hi Gary,

Quoted 4 lines · On Tuesday 27 September 2011 14:19:02 Gary Thomas wrote:

I gave a cursory look in the documentation (both Yocto& bitbake) and I didn't see an explanation of this. There's a single reference
../documentation/bsp-guide/bsp.xml: PREFERRED_VERSION_linux-yocto =
"3.0%" but nothing that explains it.

FYI I have sent Scott R some additions to the variable reference in the manual that will mention the % wildcard and give an example.

Thanks :-)

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------