Skip to contentSkip to conversation

Getting bitbake to use 'local' versions of local.conf/bblayers.conf

DISCUSSION Colin Helliwell 2 participants 3 messages Sep 24, 2015

lore
Share & tools
lore
#0 lore raw

We have an automated build which pulls our own layers & amendments from our version control system. We don't really want (need?) to have a full *unpacked* Yocto in the repository too, so we have just the Fido tarball in there, and unpack this as the first step of the build.

But, we then need to copy our local.conf and bblayers.conf across into the (transient) build directory. Is there a way to tell bitbake to override the default ones (in build/local/) with ours? I did see that it's maybe possible to set up variables for the 'oe-init-build-env' script, but I think this will still copy them into build/local/ - what we want is to leave them in place (so if we make any changes they will remain under, and trackable by, the version control)

#1 lore raw
Quoted 6 lines · Colin Helliwell

We have an automated build which pulls our own layers & amendments from our version control system. We don’t really want (need?) to have a full *unpacked* Yocto in the repository too, so we have just the Fido tarball in there, and unpack this as the first step of the build.

But, we then need to copy our local.conf and bblayers.conf across into the (transient) build directory. Is there a way to tell bitbake to override the default ones (in build/local/) with ours? I did see that it’s maybe possible to set up variables for the ‘oe-init-build-env’ script, but I think this will still copy them into build/local/ - what we want is to leave them in place (so if we make any changes they will remain under, and trackable by, the version control)

Just put "bblayers.conf.sample" and/or "local.conf.sample" in one of your layers. I do this with the BSPs I build and then set up the basic configuration quite automatically. For example, I have a pesudo-BSP (layer) for the RaspberryPi which includes
meta-rpi/conf/
meta-rpi/conf/local.conf.sample meta-rpi/conf/bblayers.conf.sample meta-rpi/conf/layer.conf
Then to configure a build using this layer I run
% TEMPLATECONF=meta-rpi/conf . ${YOCTO}/oe-init-build-env ${BUILD}

In this way, it's easy to keep the meta-rpi under my own SCM and manage any changes there.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#2 lore raw

Thanks Gary - I'll give that a try, looks like just what I'm after.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Gary Thomas
Sent: 24 September 2015 16:56
To: [email protected]
Subject: Re: [yocto] Getting bitbake to use 'local' versions of local.conf/bblayers.conf

Quoted 2 lines · Colin Helliwell

We have an automated build which pulls our own layers & amendments from our version control system. We don't really want (need?) to have a

full *unpacked* Yocto in the repository too, so we have just the Fido tarball in there, and unpack this as the first step of the build.

Quoted 9 lines

But, we then need to copy our local.conf and bblayers.conf across into the (transient) build directory. Is there a way to tell bitbake to override the default ones (in
build/local/) with ours? I did see that it's maybe possible to set up variables for the 'oe-init-build-env' script, but I think this will still copy them into build/local/ - what we want is to leave them in place (so if we make any changes they will remain under, and trackable by, the version control)

Just put "bblayers.conf.sample" and/or "local.conf.sample" in one of your layers. I do this with the BSPs I build and then set up the basic configuration quite automatically. For example, I have a pesudo-BSP (layer) for the RaspberryPi which includes
meta-rpi/conf/
meta-rpi/conf/local.conf.sample meta-rpi/conf/bblayers.conf.sample
meta-rpi/conf/layer.conf
Then to configure a build using this layer I run
% TEMPLATECONF=meta-rpi/conf . ${YOCTO}/oe-init-build-env ${BUILD}

In this way, it's easy to keep the meta-rpi under my own SCM and manage any changes there.

--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto