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

2

13

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!

Callahan answered 15/12, 2015 at 22:20 Comment(0)
N
10

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.

Nay answered 15/12, 2015 at 23:6 Comment(0)
C
11

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.
Callahan answered 21/12, 2015 at 16:23 Comment(1)
Are you still using this file organization, that is, putting your configuration files such as local.conf in meta-mylayer, and then comitting meta-mylayer to your VCS? If not, what changes/improvements have you made?Felt
N
10

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.

Nay answered 15/12, 2015 at 23:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.