mirror of
git://git.yoctoproject.org/poky.git
synced 2025-08-22 00:42:05 +02:00

Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
python __anonymous () {
|
|
if d.getVar('PREFERRED_PROVIDER_virtual/kernel') == 'linux-dummy':
|
|
# copy part codes from kernel.bbclass
|
|
kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
|
|
|
|
# set an empty package of kernel-devicetree
|
|
d.appendVar('PACKAGES', ' %s-devicetree' % kname)
|
|
d.setVar('ALLOW_EMPTY:%s-devicetree' % kname, '1')
|
|
|
|
# Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
|
|
type = d.getVar('KERNEL_IMAGETYPE') or ""
|
|
alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
|
|
types = d.getVar('KERNEL_IMAGETYPES') or ""
|
|
if type not in types.split():
|
|
types = (type + ' ' + types).strip()
|
|
if alttype not in types.split():
|
|
types = (alttype + ' ' + types).strip()
|
|
|
|
# set empty packages of kernel-image-*
|
|
for type in types.split():
|
|
typelower = type.lower()
|
|
d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
|
|
d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
|
|
}
|
|
|