I'm new to yocto. I'm trying to learn how the packages are added, how to create new layers and so on... just poking around. Started by cloning poky and playing around.
To my understanding, the bblayers.conf
file is critical to the project configuration and what you end up building (what layers and packages go into your final image).
This might be the wrong assumption, but I also have a feeling that the build/ folder is where things you build (bitbake) stay. Images, lots of things needed to build them, a big cache of stuff... You can delete it and rebuild it if you somehow broke it. Or you can just copy everything without the build/ folder and continue working on a different computer.
Apparently it's not quite the case. The build/conf/
folder has the important .conf
files like the bblayers.conf
.
Can someone explain why is this the case? Is there an elegant way to separate the project config and the build folder?
There are a couple layers to the Yocto Project, mainly:
BSPDIR
: TOPDIR
(build), sources, setup-environmentBSPDIR/setup-environment
: initial all the variable to for bitbake;BSPDIR/sources
: meta-data/
TOPDIR
: conf/
sstate-cache/
cache/
tmp/
downloads/
TOPDIR/downloads
: recipe fetched packages;
TOPDIR/conf/
: stored all the configuration. Mainly bblayers.conf, local.conf, sanity_info;TOPDIR/conf/bblayers.conf
: stored all the path to meta-data that will be loaded;TOPDIR/conf/local.conf
: configuration to buildTOPDIR/conf/sanity_info
: path double check to make sure that all the path used in the last compile match the current compile;TOPDIR/tmp/
: Where all the compiling and building work happenIn BSPDIR/sources/poky/meta/conf/bitbake.conf
sources/poky/meta/conf/bitbake.conf:TMPDIR ?= "${TOPDIR}/tmp"
sources/poky/meta/conf/bitbake.conf:PERSISTENT_DIR = "${TOPDIR}/cache"
sources/poky/meta/conf/bitbake.conf:DL_DIR ?= "${TOPDIR}/downloads"
sources/poky/meta/conf/bitbake.conf:SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
TOPDIR
is where you initialize when run setup-environment
or oe-init-build-env
; All the other bitbake configuration environment variable can be changed based on your need in conf/local.conf
;
e.g. modify conf/local.conf
to change the downloads directory from TOPDIR/downloads
;
DL_DIR ?= "/home/downloads/"
To create new layer, please watch this video: https://www.youtube.com/watch?v=3HsaoVqX7dg