aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2019-12-02 19:08:48 +0800
committerNaveen Saini <naveen.kumar.saini@intel.com>2019-12-09 13:08:38 +0800
commitc9feff379936bc291c1aece6b924d77534c92782 (patch)
treeb53c3c9b2096064af53c05b35eb32cea1523e40f
parent4d518195da60e66a262488a0520b43ab9ac571a9 (diff)
downloadmeta-zephyr-c9feff379936bc291c1aece6b924d77534c92782.tar.gz
meta-zephyr-c9feff379936bc291c1aece6b924d77534c92782.tar.bz2
meta-zephyr-c9feff379936bc291c1aece6b924d77534c92782.zip
zephyr-helloworld: code clean up
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
-rw-r--r--recipes-kernel/zephyr-kernel/zephyr-helloworld.bb9
-rw-r--r--recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc10
2 files changed, 9 insertions, 10 deletions
diff --git a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
index 7c0823c..84db068 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
@@ -1,18 +1,13 @@
require zephyr-kernel.inc
require zephyr-kernel-common.inc
-inherit cmake pkgconfig deploy
+inherit deploy
ZEPHYR_SRC_DIR = "${S}/samples/hello_world"
ZEPHYR_BASE = "${S}"
OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
-DEPENDS += "gperf-native"
-
-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"
-export ZEPHYR_BASE="${S}"
-
do_deploy () {
- install -D ${B}/zephyr/zephyr.elf ${DEPLOYDIR}/${PN}.elf
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
}
addtask deploy after do_compile
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 4fab740..d7147d5 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -1,6 +1,6 @@
# Common settings for all Zephyr recipes
-ZEPHYR_INHERIT_CLASSES += "zephyr"
+ZEPHYR_INHERIT_CLASSES += "zephyr cmake"
inherit ${ZEPHYR_INHERIT_CLASSES}
# There shouldn't be a manifest for zephyr kernels since there is no root
@@ -11,11 +11,15 @@ ZEPHYR_GCC_VARIANT="yocto"
ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
-ZEPHYR_MAKE_ARGS = " BOARD=${BOARD} ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} ZEPHYR_GCC_VARIANT=${ZEPHYR_GCC_VARIANT} ZEPHYR_BASE=${ZEPHYR_BASE} ZEPHYR_SYSROOT=${ZEPHYR_SYSROOT}"
+
+
+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"
+export ZEPHYR_BASE="${S}"
+
# We always need a toolchain to cross-compile.
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK}"
+DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK} gperf-native"
CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
DEPENDS_append_qemuall = " qemu-native qemu-helper-native"