From 4b382a05dde38704ed1448e658c54d3baf7aeb19 Mon Sep 17 00:00:00 2001
From: Li Wang
Date: Fri, 12 Mar 2021 17:52:50 +0800
Subject: linux-dummy: add empty dependent packages
some kernel includes kernel-image-image and kernel-devicetree packages.
these patckages are defined in kernel.bbclass
but, when use linux-dummy, these packages are not defined.
so, define them as empty packages for avoiding compile error:
ERROR: Nothing RPROVIDES 'kernel-devicetree'
(From OE-Core rev: 8dbae2dd5ac3de629957ca699f823f5438e80163)
Signed-off-by: Li Wang
Signed-off-by: Richard Purdie
---
meta/classes/linux-dummy.bbclass | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 meta/classes/linux-dummy.bbclass
(limited to 'meta/classes/linux-dummy.bbclass')
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')
+}
+
--
cgit v1.2.3-54-g00ecf