[oe] Getting Started -Makefile

pHilipp Zabel philipp.zabel at gmail.com
Tue Nov 20 09:12:27 UTC 2007


On Nov 20, 2007 12:51 AM, Rod Whitby <rod at whitby.id.au> wrote:
> Koen Kooi wrote:
> > David Farning schreef:
> >> $make setup
> >
> > nice
> >
> >> $make build-package-vim
> >
> > $deity just killed a few hundred kittens.
> >
> > At OEDEM we decided that we won't tolerate kindergarten-like,
> > hand-holding wrappers around bitbake. Typing 'bitbake vim' isn't rocket
> > science. To paraphrase Mickey: "If typing 'bitbake <foo>' is too hard,
> > you shouldn't be using OE".
>
> The challenge I put to yourself and a couple of other people from the OM
> core team in IRC a couple of weeks or months ago still stands:
>
> Show how you can use bitbake such that you can cd into a build area, and
> type a *single* bitbake command to do a build, then cd into a different
> build area (with a different distro and machine) and type a *single*
> bitbake command to do a build there.  No other commands are allowed.
>
> At the moment, you need to set many environment variables before bitbake
> can do it's job, and you need to reset them when you move into a
> different area to do a different build.  That's the reason why there are
> makefile wrappers around simple bitbake commands.

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.

regards
Philipp




More information about the Openembedded-devel mailing list