The simplest unit of kernel Metadata is the configuration-only
feature.
This feature consists of one or more Linux kernel configuration
parameters in a configuration fragment file
(.cfg
) and a .scc
file
that describes the fragment.
As an example, consider the Symmetric Multi-Processing (SMP)
fragment used with the linux-yocto-4.12
kernel as defined outside of the recipe space (i.e.
yocto-kernel-cache
).
This Metadata consists of two files: smp.scc
and smp.cfg
.
You can find these files in the cfg
directory
of the yocto-4.12
branch in the
yocto-kernel-cache
Git repository:
cfg/smp.scc: define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" define KFEATURE_COMPATIBILITY all kconf hardware smp.cfg cfg/smp.cfg: CONFIG_SMP=y CONFIG_SCHED_SMT=y # Increase default NR_CPUS from 8 to 64 so that platform with # more than 8 processors can be all activated at boot time CONFIG_NR_CPUS=64 # The following is needed when setting NR_CPUS to something # greater than 8 on x86 architectures, it should be automatically # disregarded by Kconfig when using a different arch CONFIG_X86_BIGSMP=y
You can find general information on configuration fragment files in the "Creating Configuration Fragments" section.
Within the smp.scc
file, the
KFEATURE_DESCRIPTION
statement provides a short description of the fragment.
Higher level kernel tools use this description.
Also within the smp.scc
file, the
kconf
command includes the
actual configuration fragment in an .scc
file, and the "hardware" keyword identifies the fragment as
being hardware enabling, as opposed to general policy,
which would use the "non-hardware" keyword.
The distinction is made for the benefit of the configuration
validation tools, which warn you if a hardware fragment
overrides a policy set by a non-hardware fragment.
kconf
statements, one per fragment.
As described in the "Validating Configuration" section, you can use the following BitBake command to audit your configuration:
$ bitbake linux-yocto -c kernel_configcheck -f