mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-12 18:49:30 +02:00
zephyr-helloworld: code clean up
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user