diff options
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 251bc9abfd..2b42e123ed 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -19,6 +19,7 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
19 | # IMAGE_FEATURES may contain any available package group | 19 | # IMAGE_FEATURES may contain any available package group |
20 | IMAGE_FEATURES ?= "" | 20 | IMAGE_FEATURES ?= "" |
21 | IMAGE_FEATURES[type] = "list" | 21 | IMAGE_FEATURES[type] = "list" |
22 | IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs" | ||
22 | 23 | ||
23 | # rootfs bootstrap install | 24 | # rootfs bootstrap install |
24 | ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" | 25 | ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" |
@@ -62,6 +63,19 @@ IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' | |||
62 | SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" | 63 | SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" |
63 | SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' | 64 | SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' |
64 | 65 | ||
66 | def check_image_features(d): | ||
67 | valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split() | ||
68 | valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys() | ||
69 | for var in d: | ||
70 | if var.startswith("PACKAGE_GROUP_"): | ||
71 | valid_features.append(var[14:]) | ||
72 | valid_features.sort() | ||
73 | |||
74 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) | ||
75 | for feature in features: | ||
76 | if feature not in valid_features: | ||
77 | bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) | ||
78 | |||
65 | IMAGE_INSTALL ?= "" | 79 | IMAGE_INSTALL ?= "" |
66 | IMAGE_INSTALL[type] = "list" | 80 | IMAGE_INSTALL[type] = "list" |
67 | export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" | 81 | export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" |
@@ -129,6 +143,8 @@ python () { | |||
129 | vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False) | 143 | vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False) |
130 | ml_vendor_list += " " + vendor | 144 | ml_vendor_list += " " + vendor |
131 | d.setVar('MULTILIB_VENDORS', ml_vendor_list) | 145 | d.setVar('MULTILIB_VENDORS', ml_vendor_list) |
146 | |||
147 | check_image_features(d) | ||
132 | } | 148 | } |
133 | 149 | ||
134 | # | 150 | # |