[yocto] Environment Variables being unset by bitbake?

2014-07-09 Thread Allen Kennedy Jr.
I am trying to run java program from a recipe.

I get an error that JAVA_HOME is not set.
I can verify that JAVA_HOME is set by echo $JAVA_HOME.

I can then run the program without issue, but from within a recipe it
seems that $JAVA_HOME is unset.

I have verified this with 'bbnote "java is here: ${JAVA_HOME}"' from within
a recipe.

Any ideas why or how this is getting unset, and how to fix?
I couldn't find any documentation that talks about this.

Thanks
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Environment Variables being unset by bitbake?

2014-07-10 Thread Allen Kennedy Jr.
Nicholas,
  Thanks for your response.  I tried the following permutations:
I added this: BB_ENV_EXTRAWHITE += " JAVA_HOME" to the top of my recipe.
I added this: BB_ENV_EXTRAWHITE += "JAVA_HOME" to the top of my recipe.
I added this: BB_ENV_EXTRAWHITE = "JAVA_HOME" to the top of my recipe.
I added this: export BB_ENV_EXTRAWHITE="JAVA_HOME" to the top of my recipe
I added this: export BB_ENV_EXTRAWHITE="JAVA_HOME" to a function in my
recipe

All with no joy.  I did a bit of google-fu and came up with this one:
on the command line: BB_ENV_EXTRAWHITE="JAVA_HOME" bitbake myRecipe

Which almost works, but not really.  my bbnote in my recipe exclaims: NOTE:
java is here: /usr/local/java/jdk
which is right, but then in the shell script that gets called after that,
the first lines are:
if [ -z "$JAVA_HOME" ]; then
echo "JAVA_HOME is not set"
exit 1
fi

Which turns out the error that JAVA_HOME is not set.

again, this shell script works perfectly fine outside of the bitbake system.

Any other ideas?
thanks,
-allen




On Thu, Jul 10, 2014 at 3:29 AM, Nicolas Dechesne <
nicolas.deche...@linaro.org> wrote:

> On Wed, Jul 9, 2014 at 10:58 PM, Allen Kennedy Jr.
>  wrote:
> > Any ideas why or how this is getting unset, and how to fix?
> > I couldn't find any documentation that talks about this.
>
> by the way, this is not a bug, and doesn't need to be 'fixed'. this is
> purposely done this way to avoid leaking too much information from
> your environment into the build environment. bitbake tries to isolate
> as much as possible from the host.
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Environment Variables being unset by bitbake?

2014-07-10 Thread Allen Kennedy Jr.
Thanks again.

Perhaps I'll write a shell script that calls bitbake after properly setting
up the environment.


On Thu, Jul 10, 2014 at 9:23 AM, Nicolas Dechesne <
nicolas.deche...@linaro.org> wrote:

> +list. please let's discuss on the list.
>
> On Thu, Jul 10, 2014 at 4:01 PM, Allen Kennedy Jr.
>  wrote:
> > That did it.  thanks.
> >
> > Is there is no way to add this to the layer?  Must I distrubute my layer
> > with instructions to set BB_ENV_EXTRAWHITE variable before running
> bitbake?
> > I would think there would be someway to make it easy for the user?
>
> well, i don't think so. at this point, i think you need to think about
> why you need that in the first place... i have not done any JAVA + OE
> stuff, so i cannot really comment on that... but explicitly
> contaminating your build environment with host 'stuff' sounds wrong to
> me.
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] read only rootfs & systemd

2014-07-22 Thread Allen Kennedy Jr.
Christopher,
  Thanks for the information.  I too have been looking for this.

It seems odd to me that this build system that is designed for an embedded
device, doesn't have this feature by default.


On Tue, Jul 22, 2014 at 10:44 AM, Christopher Larson 
wrote:

>
> On Tue, Jul 22, 2014 at 4:43 AM, Maciek Borzecki <
> maciej.borze...@open-rnd.pl> wrote:
>
>> Is read-only-rootfs supported on systemd setups?
>>
>> The current dev manual is not clear about this. Also in image.bbclass
>> there are comments that read_only_rootfs_hook supports only sysvinit
>> setups.
>>
>
> Not in oe-core, no. https://github.com/MentorEmbedded/meta-ro-rootfs is
> how we're handling it at mentor today, we haven't gotten around to pursuing
> an upstream solution, whether integration of this or something else, as of
> yet. If you follow the instructions at
> https://github.com/MentorEmbedded/meta-ro-rootfs#usage it should work
> fine for you.
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto