Date
1 - 5 of 5
How to set environment variables inside a recipe?
Bodke, Kishore K <kishore.k.bodke@...>
Hi,
I am writing a recipe to build a driver specific for my BSP.
The driver needs a bunch of environmental variables to be set ( specific to driver only ) to build.
Right now to move forward I am doing like below in my recipe to build it.
export AAA = “${S}”
export BBB = “${B}”
export CCC = “{S}/build-system”
export DDD = “{S}/env-files”
Is this right way to do? Are there any other ways to set the environment variables inside a recipe?
Any suggestions would be helpful.
Thanks
Kishore.
Paul Eggleton
On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:
do_configure) rather than at the recipe level, assuming that works for your
case.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
The driver needs a bunch of environmental variables to be set ( specific toThis is valid; I would recommend setting them within the function though (e.g.
driver only ) to build.
Right now to move forward I am doing like below in my recipe to build it.
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
Is this right way to do? Are there any other ways to set the environment
variables inside a recipe?
do_configure) rather than at the recipe level, assuming that works for your
case.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
Bodke, Kishore K <kishore.k.bodke@...>
toggle quoted message
Show quoted text
But If I do inside
do_confiugre() {
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
}
run.do_configure.20832: line 78: export: `=': not a valid identifier
NOTE: task do_configure: Failed
Is the syntax wrong here? What is the correct syntax?
Thanks
Kishore.
-----Original Message-----If I set outside the do_configure it builds fine.
From: Paul Eggleton [mailto:paul.eggleton@...]
Sent: Friday, July 20, 2012 3:14 AM
To: Bodke, Kishore K
Cc: yocto@...
Subject: Re: [yocto] How to set environment variables inside a recipe?
On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:The driver needs a bunch of environmental variables to be set ( specific toThis is valid; I would recommend setting them within the function though (e.g.
driver only ) to build.
Right now to move forward I am doing like below in my recipe to build it.
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
Is this right way to do? Are there any other ways to set the environment
variables inside a recipe?
do_configure) rather than at the recipe level, assuming that works for your
case.
But If I do inside
do_confiugre() {
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
}
run.do_configure.20832: line 78: export: `=': not a valid identifier
NOTE: task do_configure: Failed
Is the syntax wrong here? What is the correct syntax?
Thanks
Kishore.
Robert P. J. Day
On Fri, 20 Jul 2012, Bodke, Kishore K wrote:
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
pretty sure you can't have spaces around the "=".-----Original Message-----If I set outside the do_configure it builds fine.
From: Paul Eggleton [mailto:paul.eggleton@...]
Sent: Friday, July 20, 2012 3:14 AM
To: Bodke, Kishore K
Cc: yocto@...
Subject: Re: [yocto] How to set environment variables inside a recipe?
On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:The driver needs a bunch of environmental variables to be set ( specific toThis is valid; I would recommend setting them within the function though (e.g.
driver only ) to build.
Right now to move forward I am doing like below in my recipe to build it.
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
Is this right way to do? Are there any other ways to set the environment
variables inside a recipe?
do_configure) rather than at the recipe level, assuming that works for your
case.
But If I do inside
do_confiugre() {
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
}
run.do_configure.20832: line 78: export: `=': not a valid identifier
NOTE: task do_configure: Failed
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
Bodke, Kishore K <kishore.k.bodke@...>
toggle quoted message
Show quoted text
Works fine now.
Thanks
Kishore.
-----Original Message-----Yes, the spaces was an issue.
From: Robert P. J. Day [mailto:rpjday@...]
Sent: Friday, July 20, 2012 10:13 AM
To: Bodke, Kishore K
Cc: Paul Eggleton; yocto@...
Subject: Re: [yocto] How to set environment variables inside a recipe?
On Fri, 20 Jul 2012, Bodke, Kishore K wrote:to-----Original Message-----
From: Paul Eggleton [mailto:paul.eggleton@...]
Sent: Friday, July 20, 2012 3:14 AM
To: Bodke, Kishore K
Cc: yocto@...
Subject: Re: [yocto] How to set environment variables inside a recipe?
On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:The driver needs a bunch of environmental variables to be set ( specific(e.g.driver only ) to build.This is valid; I would recommend setting them within the function though
Right now to move forward I am doing like below in my recipe to build it.
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
Is this right way to do? Are there any other ways to set the environment
variables inside a recipe?pretty sure you can't have spaces around the "=".do_configure) rather than at the recipe level, assuming that works for yourIf I set outside the do_configure it builds fine.
case.
But If I do inside
do_confiugre() {
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
}
run.do_configure.20832: line 78: export: `=': not a valid identifier
NOTE: task do_configure: Failed
Works fine now.
Thanks
Kishore.