Brad Bishop | 0e27f20 | 2017-07-22 14:49:25 -0400 | [diff] [blame] | 1 | # Base image class extension, inlined into every image. |
| 2 | |
| 3 | def build_uboot(d): |
| 4 | fstypes = d.getVar('IMAGE_FSTYPES', True).split() |
| 5 | if any([x.endswith('u-boot') for x in fstypes]): |
| 6 | return 'image_types_uboot' |
| 7 | return '' |
| 8 | |
| 9 | |
| 10 | # Inherit u-boot classes if legacy uboot images are in use. |
| 11 | IMAGE_TYPE_uboot = '${@build_uboot(d)}' |
| 12 | inherit ${IMAGE_TYPE_uboot} |
| 13 | |
| 14 | # Inherit the overlay class if overlay is in use. |
| 15 | IMAGE_TYPE_overlay = '${@bb.utils.contains("IMAGE_FSTYPES", "overlay", "image-overlay", "", d)}' |
| 16 | inherit ${IMAGE_TYPE_overlay} |