@@ -14,6 +14,11 @@ TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
KCONFIG_CONFIG_COMMAND ??= "menuconfig"
KCONFIG_CONFIG_ROOTDIR ??= "${B}"
ZEPHYR_BOARD ?= "${MACHINE}"
+ZEPHYR_SNIPPETS ?= ""
+
+def zephyr_snippet_args(d):
+ snippets = (d.getVar('ZEPHYR_SNIPPETS') or '').split()
+ return (' -DSNIPPET=' + '\\;'.join(snippets)) if snippets else ''
# qemuboot writes into IMGDEPLOYDIR, force to write to DEPLOY_DIR_IMAGE
IMGDEPLOYDIR = "${DEPLOY_DIR_IMAGE}"
@@ -27,6 +32,7 @@ python () {
}
EXTRA_OECMAKE:append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
+EXTRA_OECMAKE:append = "${@zephyr_snippet_args(d)}"
python do_menuconfig() {
import shutil
Introduce ZEPHYR_SNIPPETS, which accepts one or more snippet names separated by spaces and passes them to CMake through SNIPPET. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com> --- meta-zephyr-core/classes-recipe/zephyr.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)