diff options
author | Li Wang <li.wang@windriver.com> | 2021-03-12 17:52:50 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-28 22:31:47 +0100 |
commit | 5b67ea6dc5338d0716d58e6d3481356cc19696d9 (patch) | |
tree | 649650f2e4738374e5e4d35bb6c7c97f212d1f3c | |
parent | d1ca70156603d502c21217373544d5aee173903f (diff) | |
download | poky-5b67ea6dc5338d0716d58e6d3481356cc19696d9.tar.gz |
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: 9d166adde55ce8f0ba60c37c0679a99c947b2779)
Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8dbae2dd5ac3de629957ca699f823f5438e80163)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@ | |||
1 | |||
2 | python __anonymous () { | ||
3 | if d.getVar('PREFERRED_PROVIDER_virtual/kernel') == 'linux-dummy': | ||
4 | # copy part codes from kernel.bbclass | ||
5 | kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel" | ||
6 | |||
7 | # set an empty package of kernel-devicetree | ||
8 | d.appendVar('PACKAGES', ' %s-devicetree' % kname) | ||
9 | d.setVar('ALLOW_EMPTY_%s-devicetree' % kname, '1') | ||
10 | |||
11 | # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES | ||
12 | type = d.getVar('KERNEL_IMAGETYPE') or "" | ||
13 | alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or "" | ||
14 | types = d.getVar('KERNEL_IMAGETYPES') or "" | ||
15 | if type not in types.split(): | ||
16 | types = (type + ' ' + types).strip() | ||
17 | if alttype not in types.split(): | ||
18 | types = (alttype + ' ' + types).strip() | ||
19 | |||
20 | # set empty packages of kernel-image-* | ||
21 | for type in types.split(): | ||
22 | typelower = type.lower() | ||
23 | d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower)) | ||
24 | d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1') | ||
25 | } | ||
26 | |||
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" | |||
9 | 9 | ||
10 | PROVIDES += "virtual/kernel" | 10 | PROVIDES += "virtual/kernel" |
11 | 11 | ||
12 | inherit deploy | 12 | inherit deploy linux-dummy |
13 | 13 | ||
14 | PACKAGES_DYNAMIC += "^kernel-module-.*" | 14 | PACKAGES_DYNAMIC += "^kernel-module-.*" |
15 | PACKAGES_DYNAMIC += "^kernel-image-.*" | 15 | PACKAGES_DYNAMIC += "^kernel-image-.*" |