When stored in-tree, the kernel Metadata files reside in the
meta
directory of the Linux kernel sources.
The meta
directory can be present in the
same repository branch as the sources,
such as "master", or meta
can be its own
orphan branch.
For the purposes of this document, we will discuss all
in-tree Metadata as residing below the
meta/cfg/kernel-cache
directory.
Following is an example that shows how a trivial tree of Metadata is stored in a custom Linux kernel Git repository:
meta/ `-- cfg `-- kernel-cache |-- bsp-standard.scc |-- bsp.cfg `-- standard.cfg
To use a branch different from where the sources reside,
specify the branch in the KMETA
variable
in your Linux kernel recipe.
Here is an example:
KMETA = "meta"
To use the same branch as the sources, set
KMETA
to an empty string:
KMETA = ""
If you are working with your own sources and want to create an
orphan meta
branch, use these commands
from within your Linux kernel Git repository:
$ git checkout --orphan meta $ git rm -rf . $ git commit --allow-empty -m "Create orphan meta branch"
If you modify the Metadata in the linux-yocto
meta
branch, you must not forget to update
the
SRCREV
statements in the kernel's recipe.
In particular, you need to update the
SRCREV_meta
variable to match the commit in
the KMETA
branch you wish to use.
Changing the data in these branches and not updating the
SRCREV
statements to match will cause the
build to fetch an older commit.