kbuild plugin can used when working with kBuild-based projects, commonly used to build the Linux kernel.
The plugin applies your selected defconfig first by running
make defconfig. The kconfigs flag is then used to augment the resulting config by prepending the configured kconfigs values to the
.config and then running
"yes" "" | make oldconfig. The result is an updated
If kconfigfile is provided by the user, it’s used as the starting point for this plugin instead of executing
If both kdefconfig and *kconfigfile are provided, the above kconfigfile process will be used.
This plugin is built on snapcraft.BasePlugin and inherits the same properties, with the following additional kBuild-specific options:
kdefconfig (list of kdefconfigs)
Defconfig target to use as the base configuration.
Path to file to use as base configuration. If provided this option wins over everything else.
Ubuntu config flavour to use as base configuration. If provided this option wins over kdefconfig.
kconfig (list of strings)
Explicit list of configs to force; this will override the configs that were set as base through kdefconfig and kconfigfile and dependent configs will be fixed using the defaults encoded in the kbuild config definitions. If you don’t want default for one or more implicit configs coming out of these, just add them to this list as well.
See The kernel plugin for additional options related to building a kernel snap.
For examples, search GitHub for projects already using the plugin.
Last updated 16 days ago. Help improve this document in the forum.