[meta-freescale] Help with variable expansion in bbappend

Otavio Salvador otavio at ossystems.com.br
Fri Nov 30 06:36:53 PST 2012


On Fri, Nov 30, 2012 at 11:32 AM, Alex Gonzalez <alex at lindusembedded.com>wrote:

> Hi,
>
> I am stuck with a problem I don't seem able to debug.
>
> I am using the denzil branch of meta-fsl-arm, and I am overriding some
> recipes on a different layer. For example I have a
> linux-libc-headers-imx_2.6.35.3.bbappend recipe that looks like:
>
> PR_append = "+custom.0"
>
> SRCREV_mx5 := "mybranch"
> SRC_URI_mx5 := "git://myworking.git.server/linux-2.6.git"
>

Use:

SRC_URI_mx5 =

Not:

SRC_URI_mx5 :=


> do_fetch_prepend() {
>         bb.warn("[AG] SOC family " + d.getVar('SOC_FAMILY', True))
>         bb.warn("[AG] SRC_URI " + d.getVar('SRC_URI', True))
> }
>

The getVar won't take the override in account so for it to work you need to
use:

do_fetch_prepend() {
         soc_family = d.getVar('SOC_FAMILY', True)
         bb.warn("[AG] SOC family " + soc_family )
         bb.warn("[AG] SRC_URI " + d.getVar("SRC_URI_%s" % soc_family,
True))
 }

When I do:
>
> bitbake -e linux-libc-headers | grep SRC_URI
> # SRC_URI=git://git.freescale.com/imx/linux-2.6-imx.git
> SRC_URI="git://git.freescale.com/imx/linux-2.6-imx.git"
> # SRC_URI_mx5=git://myworking.git.server/linux-2.6.git
> SRC_URI_mx5="git://myworking.git.server/linux-2.6.git"
>
> This seems to imply the overriden SRC_URI will be used.
>
> But when I try to build I get:
>
> NOTE: Running task 234 of 441 (ID: 4,
> /home/alex/Projects/meta-fsl-arm/recipes-kernel/linux-libc-headers/
> linux-libc-headers-imx_2.6.35.3.bb,
> do_fetch)
> NOTE: package linux-libc-headers-imx-2.6.35.3-r6+custom.0: task
> do_fetch: Started
> WARNING: [AG] SOC family mx5
> WARNING: [AG] SRC_URI git://git.freescale.com/imx/linux-2.6-imx.git
> ERROR: Function failed: Fetcher failure for URL:
> 'git://git.freescale.com/imx/linux-2.6-imx.git'. Please set SRCREV to
> a valid value
>
> So it is trying to use the original SRC_URI, even though the
> SOC_FAMILY is set to mx5.
>
> Any idea as to why is this happening or where to debug next?
>

But it seems you're doing this for one specific board so using the family
seems wrong; you could specify it for the board name instead and it would
allow it to keep working for the default boards.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20121130/8290a7a9/attachment.html>


More information about the meta-freescale mailing list