[meta-freescale] Help with variable expansion in bbappend

Alex Gonzalez alex at lindusembedded.com
Fri Nov 30 08:18:13 PST 2012


Thanks Otavio,

I changed the family overrides for machine overrrides as you suggested
and it is working now.

One more thing, I was browsing at the meta-fsl-arm classes and I found
a possible unbound exception in fsl_bin_do_unpack.

If fsl-eula is not present or False, save_cwd won't be set but it will
be used on the last line.

I guess if fsl-eula always had to be true it wouldn't be an option, so
maybe the following patch or similar is acceptable:

diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass
index 7a6a554..d4dbab8 100644
--- a/classes/fsl-eula-unpack.bbclass
+++ b/classes/fsl-eula-unpack.bbclass
@@ -7,6 +7,7 @@
 #  SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true"

 python fsl_bin_do_unpack() {
+    save_cwd = os.getcwd()
     src_uri = (d.getVar('SRC_URI', True) or "").split()
     if len(src_uri) == 0:
         return

Alex



On Fri, Nov 30, 2012 at 3:36 PM, Otavio Salvador
<otavio at ossystems.com.br> wrote:
>
>
>
> 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
>



More information about the meta-freescale mailing list