A kernel type defines a high-level kernel policy by
aggregating non-hardware configuration fragments with
patches you want to use when building a Linux kernels of a
specific type.
Syntactically, kernel types are no different than features
as described in the "Features"
section.
The LINUX_KERNEL_TYPE
variable in the kernel
recipe selects the kernel type.
See the "Using Kernel Metadata in a Recipe"
section for more information.
As an example, the linux-yocto-3.19
tree defines three kernel types: "standard",
"tiny", and "preempt-rt":
"standard": Includes the generic Linux kernel policy of the Yocto Project linux-yocto kernel recipes. This policy includes, among other things, which file systems, networking options, core kernel features, and debugging and tracing options are supported.
"preempt-rt":
Applies the PREEMPT_RT
patches and the configuration options required to
build a real-time Linux kernel.
This kernel type inherits from the "standard" kernel type.
"tiny": Defines a bare minimum configuration meant to serve as a base for very small Linux kernels. The "tiny" kernel type is independent from the "standard" configuration. Although the "tiny" kernel type does not currently include any source changes, it might in the future.
The "standard" kernel type is defined by
standard.scc
:
# Include this kernel type fragment to get the standard features and # configuration values. # Include all standard features include standard-nocfg.scc kconf non-hardware standard.cfg # individual cfg block section include cfg/fs/devtmpfs.scc include cfg/fs/debugfs.scc include cfg/fs/btrfs.scc include cfg/fs/ext2.scc include cfg/fs/ext3.scc include cfg/fs/ext4.scc include cfg/net/ipv6.scc include cfg/net/ip_nf.scc include cfg/net/ip6_nf.scc include cfg/net/bridge.scc
As with any .scc
file, a
kernel type definition can aggregate other
.scc
files with
include
commands.
These definitions can also directly pull in
configuration fragments and patches with the
kconf
and patch
commands, respectively.
.scc
file.
The Board Support Package (BSP) file can implicitly define
the kernel type using a define
KTYPE myktype
line.
See the "BSP Descriptions"
section for more information.