mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-07 15:10:09 +00:00
arm-autonomy/classes: Introduce alternate-kernel.bbclass
The alternate-kernel.bbclass is to be inherited by image recipes that want to
build and install an alternate kernel (set via
PREFERRED_PROVIDER_alternate/kernel).
It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
its value needs to be different from "kernel" since this is the default set
for PREFERRED_PROVIDER_virtual/kernel.
When building and installing an alternate kernel, the kernel-modules packages
for both virtual/kernel and alternate/kernel will be installed.
Change-Id: I1cd0c425c39206fe449fb5f8761ed6de95cfb442
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# This class is to be inherited by image recipes that want to build and install
|
||||
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
|
||||
#
|
||||
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
|
||||
# recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
|
||||
# its value needs to be different from "kernel" since this is the default set
|
||||
# for PREFERRED_PROVIDER_virtual/kernel.
|
||||
#
|
||||
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
|
||||
#
|
||||
# When building and installing an alternate kernel, the kernel-modules packages
|
||||
# for both virtual/kernel and alternate/kernel will be installed.
|
||||
|
||||
PREFERRED_PROVIDER_alternate/kernel ??= ""
|
||||
|
||||
python () {
|
||||
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
|
||||
if alternate_kernel:
|
||||
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME_pn-%s' % alternate_kernel)
|
||||
if alternate_kernel_pkg_name:
|
||||
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
|
||||
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
|
||||
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
|
||||
else:
|
||||
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME_pn-%s set" % alternate_kernel )
|
||||
}
|
||||
Reference in New Issue
Block a user