Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yocto/bitbake/OpenEmbedded: Best place for build/conf/local.conf's content?

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!

like image 485
big_gie Avatar asked Dec 15 '15 22:12

big_gie


2 Answers

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 in build/conf/local.conf. This is how you tell yocto what you want to build.
  • MACHINE which is also set in build/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.
  • Layers are manually added to build/conf/layers.conf. That's the last bit I wish I could moved to my DISTRO or something. For now the folders are git submodules and they are added using bitbake-layers add-layer.
like image 163
big_gie Avatar answered Sep 28 '22 10:09

big_gie


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.

like image 25
Ross Burton Avatar answered Sep 28 '22 09:09

Ross Burton