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

余生颓废 提交于 2019-12-22 04:35:35

问题


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!


回答1:


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.




回答2:


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.


来源:https://stackoverflow.com/questions/34300532/yocto-bitbake-openembedded-best-place-for-build-conf-local-confs-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!