Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 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) |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | d.setVar('ALLOW_EMPTY:%s-devicetree' % kname, '1') |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 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)) |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1') |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 25 | } |
| 26 | |