[bitbake-devel] how easy to extend "bitbake -e" to print *selected* subset of variables?

Chris Larson clarson at kergoth.com
Sat Nov 24 22:49:49 UTC 2012


On Sat, Nov 24, 2012 at 5:12 AM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:

> > I personally think that something like it would be useful in bitbake
> proper.
> >
> > FYI, bitbake-env now supports optionally showing function dependencies:
> >
> > $ bitbake-env -d TARGET_PREFIX
> > def csl_target_sys(d):
> >     toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True)
> >
> >     for triplet in d.getVar('CSL_TARGET_SYS', True).split():
> >         gcc = os.path.join(toolchain_path, 'bin', triplet + '-gcc')
> >         if os.path.exists(gcc):
> >             return triplet + '-'
> >     return 'powerpc-mel-linux-gnuspe-'
> >
> > # TARGET_PREFIX="${@csl_target_sys(d)}"
> > TARGET_PREFIX="powerpc-linux-gnu-"
> >
> > $ bitbake-env -d do_compile
> > base_do_compile () {
> >         if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
> >                 oe_runmake || die "make failed"
> >         else
> >                 bbnote "nothing to compile"
> >         fi
> > }
> >
> > do_compile () {
> >     base_do_compile
> > }
>
>   whoa, where *is* this?  is it on tap to be added to bitbake/bin,
> since i think that would be a delightful idea.
>

The latest code at https://gist.github.com/4133101 has it. The new readme
there describes the usage and behavioral differences relative to bitbake -e.

  just to recap, my interest in this sort of thing is not so much for
> debugging as for instruction -- when i last taught an intro class
> in OE/yocto, i made extensive use of the "bitbake-layers" utility when
> explaining and defining layers, and the class loved it, that they
> could see the results of adding a new layer.
>

Ah! Interesting. I hadn't considered the training aspects of that sort of
utility, as I normally just use them in debugging. I'll have to keep that
in mind in the future.
-- 
Christopher Larson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20121124/5885e668/attachment-0001.html>


More information about the bitbake-devel mailing list