I'm trying out yocto (2.0, jethro) and I want to build an image starting from core-image-minimal
. This works fine.
Every website out there mention modifying the file build/config/local.conf
with (some of) my customization. For example, the target machine (through MACHINE
) or some global settings (through EXTRA_IMAGE_FEATURES
).
I also need to modify some specific packages and the way to do it is to create a custom layer. So far so good.
What I don't understand is how to "save" all my configuration to version control. I want everything I change to be locate in files that I can commit so that anybody else can reproduce the exact same build (or even contribute to that project). Putting almost everything in build/config/local.conf
goes against that goal; the file is under a "build" directory and so I can't just clone a git repo and start the building...
Is it really the way the yocto project works? Or am I missing a different configuration file where I need to put these settings? I though I could place all these in a custom layer but it does not seem to work...
Any idea or suggestion?
Thanks!
In general everything in your local.conf that is "your project" should be moved to your own distro configuration (MACHINE, image features, package lists). Stuff like where DL_DIR is can be moved to a common site.conf if you wish. Eventually you should end up with a local.conf which just sets DISTRO and some other personal variables.
Thanks Ross, that clarified it!
Here's some notes about my file organization which I couldn't format into a comment to your answer.
Thanks. So all my custom configurations went into
meta-mylayer/conf/distro/mylayer.conf
Almost all my customization went into a layer
meta-mylayer
, except:DISTRO
which is set inbuild/conf/local.conf
. This is how you tell yocto what you want to build.MACHINE
which is also set inbuild/conf/local.conf
. The reason is that the same image/distro combination could be built for different machines and thus this can't be hard-coded for every images.build/conf/layers.conf
. That's the last bit I wish I could moved to myDISTRO
or something. For now the folders are git submodules and they are added usingbitbake-layers add-layer
.