summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image.bbclass16
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
20IMAGE_FEATURES ?= "" 20IMAGE_FEATURES ?= ""
21IMAGE_FEATURES[type] = "list" 21IMAGE_FEATURES[type] = "list"
22IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs"
22 23
23# rootfs bootstrap install 24# rootfs bootstrap install
24ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" 25ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
@@ -62,6 +63,19 @@ IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}'
62SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" 63SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs"
63SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' 64SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
64 65
66def 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
65IMAGE_INSTALL ?= "" 79IMAGE_INSTALL ?= ""
66IMAGE_INSTALL[type] = "list" 80IMAGE_INSTALL[type] = "list"
67export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" 81export 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#