[yocto] external variable

jan alexandru vaduva vaduva.jan.alexandru at gmail.com
Fri Oct 18 07:53:52 PDT 2013


I am currently trying  to copy using sed the variable into local.conf.
But: grep -q "^AAA=" ${BUILDDIR}/conf/local.conf && \
        sed "s/^AAA=.*/AAA="${D}"/" -i ${BUILDDIR}/conf/local.conf || \
        sed "$ a\AAA="${D}"" -i ${BUILDDIR}/conf/local.conf
Is giving me some errors, like:
ParseError: ParseError at
/media/sdc1/fb/alvd/test/buildToolchain/conf/local.conf:258: unparsed line:
'AAA=/media/sdc1/fb/alvd/test/buildToolchain/tmp/work/xxx-poky-linux/base-files/3.0.14-r73/image'

I`ll try resolving this error and remain with this solution because I can`t
seem to find a better one. For any ideas, here is my scenario:
My final scope is to copy from a kernel initramfs template some information
into rootfs.
I observed that base-files is creating the rootfs structure and I wanted to
copy the files in the <base-files_location>/image location. to be available
into the final rootfs archive.


Alex
.


On Fri, Oct 18, 2013 at 4:41 PM, Paul Eggleton <
paul.eggleton at linux.intel.com> wrote:

> Hi Alex,
>
> On Friday 18 October 2013 15:19:57 jan alexandru vaduva wrote:
> > Is there any way of defining a variable into a recipe and use it in
> another.
> > I tried: export VAR="value" but when I tested it`s existence in devshell
> it
> > did not exist(echo $VAR).
>
> No, this is not possible. The only way you can share data between recipes
> like
> this is to write it into a file within the sysroot, or rely on it being
> specified for both recipes at the configuration level (although you've
> suggested
> the latter won't work for your situation).
>
> Can you elaborate on what exactly you're trying to achieve?
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20131018/c350caab/attachment.html>


More information about the yocto mailing list