[meta-zephyr][PATCH] zephyr-kernel-common.inc: use ZEPHYR_MODULES var


Naveen Saini
 

Use ZEPHYR_MODULES variable to pass list of absolute source paths of
additional external modules.

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
.../zephyr-kernel/zephyr-kernel-common.inc | 13 +++++++++----
.../zephyr-kernel/zephyr-peripheral-esp.bb | 2 +-
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 1357c8f..5313030 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -15,10 +15,15 @@ ZEPHYR_MAKE_OUTPUT = "zephyr.elf"


EXTRA_OECMAKE = " -DZEPHYR_BASE=${S} -DZEPHYR_GCC_VARIANT=yocto -DBOARD=${BOARD} -DARCH=${ARCH} -DCROSS_COMPILE=${CROSS_COMPILE} -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} -DZEPHYR_TOOLCHAIN_VARIANT=yocto"
-EXTRA_OECMAKE_append_arm = " -DZEPHYR_MODULES=${S}/modules/cmsis"
-EXTRA_OECMAKE_append_nordic = "\;${S}/modules/hal/nordic"
-EXTRA_OECMAKE_append_stm32 = "\;${S}/modules/hal/stm32"
-EXTRA_OECMAKE_append_openamp = "\;${S}/modules/lib/open-amp\;${S}/modules/hal/libmetal"
+
+ZEPHYR_MODULES = ""
+ZEPHYR_MODULES_append_arm = "\;${S}/modules/cmsis"
+ZEPHYR_MODULES_append_nordic = "\;${S}/modules/hal/nordic"
+ZEPHYR_MODULES_append_stm32 = "\;${S}/modules/hal/stm32"
+ZEPHYR_MODULES_append_openamp = "\;${S}/modules/lib/open-amp\;${S}/modules/hal/libmetal"
+
+EXTRA_OECMAKE_append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
+
export ZEPHYR_BASE="${S}"


diff --git a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
index 192c76d..24f030a 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
@@ -6,7 +6,7 @@ ZEPHYR_SAMPLE_NAME="samples/bluetooth/peripheral_esp"
ZEPHYR_SRC_DIR = "${S}/${ZEPHYR_SAMPLE_NAME}"
ZEPHYR_BASE = "${S}"
OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
-EXTRA_OECMAKE_append = "\;${S}/modules/crypto/tinycrypt"
+ZEPHYR_MODULES_append = "\;${S}/modules/crypto/tinycrypt"

do_deploy () {
install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
--
2.17.1