3.4.1. Configuration

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.

The Symmetric Multi-Processing (SMP) fragment included in the linux-yocto-3.19 Git repository consists of the following two files:

     cfg/smp.scc:
        define KFEATURE_DESCRIPTION "Enable SMP"
        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
            

You can find information on configuration fragment files in the "Creating Configuration Fragments" section of the Yocto Project Development Manual and in the "Generating Configuration Files" section earlier in this manual.

KFEATURE_DESCRIPTION provides a short description of the fragment. Higher level kernel tools use this description.

The kconf command is used to include 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.

Note

The description file can include multiple kconf statements, one per fragment.

As described in the "Generating Configuration Files" section, you can use the following BitBake command to audit your configuration:

     $ bitbake linux-yocto -c kernel_configcheck -f