diff options
-rw-r--r-- | meta/classes/linux-dummy.bbclass | 26 | ||||
-rw-r--r-- | meta/recipes-kernel/linux/linux-dummy.bb | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/meta/classes/linux-dummy.bbclass b/meta/classes/linux-dummy.bbclass new file mode 100644 index 0000000000..cd8791557d --- /dev/null +++ b/meta/classes/linux-dummy.bbclass @@ -0,0 +1,26 @@ + +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') +} + diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb index 95dc85ff2f..c56f8990de 100644 --- a/meta/recipes-kernel/linux/linux-dummy.bb +++ b/meta/recipes-kernel/linux/linux-dummy.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" PROVIDES += "virtual/kernel" -inherit deploy +inherit deploy linux-dummy PACKAGES_DYNAMIC += "^kernel-module-.*" PACKAGES_DYNAMIC += "^kernel-image-.*" |