[oe] Getting Started -Makefile

Esben Haabendal eha at doredevelopment.dk
Wed Nov 21 06:20:57 UTC 2007


On Tue, 2007-11-20 at 10:12 +0100, pHilipp Zabel wrote:
> On Nov 20, 2007 12:51 AM, Rod Whitby <rod at whitby.id.au> wrote:
> > Koen Kooi wrote:
> So why not provide a simple shell wrapper instead of setup-env and the
> Makefile's build-package-% part? That way, at least people would learn
> the correct bitbake syntax from the beginning.
> 
> $ cat ~/bin/bitbake
> #!/bin/sh
> export OEDIR=${OEDIR:-$PWD}
> export BBPATH=${BBPATH:-$OEDIR/build:$OEDIR/openembedded}
> /usr/local/bin/bitbake $*
> 
> > If we can fix the underlying problem (needing to type more than one
> > command to build an image with bitbake), then I will fully support a
> > move to get rid of all bitbake wrappers from all the Makefiles that I
> > manage.
> 
> The question is how to fix this problem correctly.
> One possibility would be that bitbake, if BBPATH is unset, issues a
> warning and scans the file system (starting from the $PWD) for a
> certain file (local.conf) in which BBPATH would be specified.

Something like that would be nice. When bitbake finds BBPATH unset, it
traverses from $PWD to / to find a .bbenv (or some other filename, but
local.conf is probably not a good one), which can setup BBPATH,
PYTHONPATH, OEDIR or whatever env virables is used in the
conf/local.conf file. To guard against bad bitbake versions (as BBPATH
is unset, bitbake can be expected to be picked up from a generic PATH)
it might be smart to introduce a variable in local.conf stating specific
or minimum version requirements for bitbake.

Would there by any problems in extending bitbake calling convention in
this way?

/Esben

-- 
Esben Haabendal
Embedded Software Consultant, Dore Development ApS
Phone: +45 5192 5393  Email: eha at doredevelopment.dk





More information about the Openembedded-devel mailing list