]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
classes/kernel-check: add a class to check kernel config options
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 1 Dec 2015 22:44:30 +0000 (11:44 +1300)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 9 May 2016 04:18:56 +0000 (16:18 +1200)
commit85ffd927c7834f4111ae1740b8aad5a9c444b7aa
tree898da0cc0d09981db93e3c38289d64406a520e64
parentece101be5158beee709cdfbb85ecdbdc8d9fb864
classes/kernel-check: add a class to check kernel config options

Some user-space software has specific requirements about the kernel
configuration options selected. This class allows a recipe to explicitly
state the kernel configuration options it needs (through a
REQUIRED_KERNEL_OPTIONS variable). This is a space separated list, where
each item is one of:
  (a) an option name (e.g. CONFIG_FHANDLE, in which case CONFIG_FHANDLE
      must be set to y or m to match)
  (b) optionname=value (e.g. CONFIG_FHANDLE=y, in which case
      CONFIG_FHANDLE must be set to y). If the specified value is n,
      it will also match if the option is not present.
  (c) optionname1|optionname2|... (e.g.
      CONFIG_EXT2_FS|CONFIG_EXT4_USE_FOR_EXT23, meaning that either
      CONFIG_EXT2_FS or CONFIG_EXT4_USE_FOR_EXT23 must be set to y or
      m to match).

Inheriting the class will also add a dependency from do_configure on
virtual/kernel:do_shared_workdir so that the kernel config is there to
check. If one or more items are not matched, then a warning will be
printed at do_configure time. (This is a warning rather than an error
in case you are using linux-dummy with an externally built kernel).

A separate function is also provided should you wish to check a config
option from python code - but note you must only call this in a place
where you can guarantee that the kernel config has been written to the
sysroot (i.e. from a task that has virtual/kernel:do_shared_workdir in
its depends varflag value).

Fixes [YOCTO #5574].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/kernel-check.bbclass [new file with mode: 0644]