From 6d3c04875055d59862c068ab27230596cb3ba5f6 Mon Sep 17 00:00:00 2001 From: Juro Bystricky Date: Wed, 28 Dec 2016 12:18:51 -0800 Subject: [PATCH] zephyr-getchar_git: sample program Sample program for out-of-tree Zephyr images development. Signed-off-by: Juro Bystricky --- .../zephyr-getchar/zephyr-getchar_git.bb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb diff --git a/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb b/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb new file mode 100644 index 0000000..e616e75 --- /dev/null +++ b/recipes-zephyr/zephyr-getchar/zephyr-getchar_git.bb @@ -0,0 +1,37 @@ + +LICENSE="Apache-2.0" +LIC_FILES_CHKSUM = "file://src/zephyr_getchar.c;beginline=1;endline=15;md5=d78a817213b11b6bcd9fe41669a2fd4a" +inherit deploy + +SRCREV="b8d511be4d2b9e05c6adb413a33d6ea510aa0c6a" +SRC_URI = "git://github.com/pfalcon/zephyr_console_helpers.git;protocol=https" +S = "${WORKDIR}/git/zephyr_getchar" + +INHIBIT_DEFAULT_DEPS = "1" + +DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc zephyr-kernel-src" + +python () { + d.delVar('CFLAGS') + d.delVar('CXXFLAGS') + d.delVar('LDFLAGS') +} + +do_configure[noexec] = "1" + +CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}" + +do_compile () { + cd ${S} + export ZEPHYR_GCC_VARIANT="yocto" + export CROSS_COMPILE=${CROSS_COMPILE} + export ZEPHYR_BASE=${STAGING_DIR_TARGET}/usr/src/zephyr + make -j V=1 BOARD=${BOARD} +} + +do_deploy () { + install -D ${S}/outdir/${BOARD}/zephyr.elf ${DEPLOYDIR}/${PN}.elf + export DEPLOY_DIR_IMAGE=${DEPLOYDIR}/${PN}.elf +} + +addtask deploy after do_compile