3.3.2. In-Tree Metadata

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.

Note

An orphan branch in Git is a branch with unique history and content to the other branches in the repository. Orphan branches are useful to track Metadata changes independently from the sources of the Linux kernel, while still keeping them together in the same repository.

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"