[yocto] Hello world-Checksum error

michael at cubic.org michael at cubic.org
Tue Jun 4 09:19:39 PDT 2013


> I think yes. I usually give just *source oe-init-build-env *command, this
> is how i used earlier and failed. May be that is the reason it has created
> another build directory in /poky.

We have a script for that in our build directory that we source and that
calls oe-init-build-env relatively. With that the chance to do a mistake
is minimized. It uses a relative path to oe-init-build-env.
We also use relative paths to all the layers we use in out bblayers.conf.
As reference we use ${TOPDIR}, which is the build directory.

METADIR_BUILDSYSTEMBASE="${TOPDIR}/../buildsystem_base"
BBLAYERS ?= " \
  ${METADIR_BUILDSYSTEMBASE}/poky-dylan-9.0.0/meta \
  ${METADIR_BUILDSYSTEMBASE}/poky-dylan-9.0.0/meta-yocto \
  ${METADIR_BUILDSYSTEMBASE}/poky-dylan-9.0.0/meta-yocto-bsp \
  ${METADIR_BUILDSYSTEMBASE}/meta-openembedded/meta-oe \
  ${METADIR_BUILDSYSTEMBASE}/meta-ti \
  "

The oeenv script is no rocket science and mostly looks like this:
----------[oeenv]-------------
#!/bin/sh
if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./oeenv" ]; then
   echo "Error: This script needs to be sourced. Please run as '. ./oeenv'"
else
# path to poky relative to build dir
   RELPATHTOOEENV="../buildsystem_base/poky-dylan-9.0.0/oe-init-build-env"

   if [ -n "$BASH_SOURCE" ]; then
      _BUILDROOT="`dirname $BASH_SOURCE`"
   else
      _BUILDROOT="`pwd`"
   fi
   _BUILDROOT=`readlink -f "$_BUILDROOT"`

   source "$_BUILDROOT"/"$RELPATHTOOEENV" "$_BUILDROOT"

   unset _BUILDROOT
   unset RELPATHTOOEENV
fi
--------[end]----------




More information about the yocto mailing list