summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Zmuda <wojciech.zmuda@huawei.com>2021-02-04 14:09:50 +0100
committerNaveen Saini <naveen.kumar.saini@intel.com>2021-02-05 16:14:27 +0800
commit2fc3697f9971e1d98b83f3535b0247762fedb95f (patch)
tree22ae4ac7df8dd867c5e437536c03de6e4f05e856
parentfe509167cbd6c33aae1302bf408876d6d6b331f2 (diff)
downloadmeta-zephyr-2fc3697f9971e1d98b83f3535b0247762fedb95f.tar.gz
meta-zephyr-2fc3697f9971e1d98b83f3535b0247762fedb95f.tar.bz2
meta-zephyr-2fc3697f9971e1d98b83f3535b0247762fedb95f.zip
zephyr-peripheral-esp: fix compilation
Bluetooth peripheral ESP sample application does not compile because of: - broken source directory path passing to cmake, - broken paths in do_deploy, - unnecessary call for do_install, - missing tinycrypt. The first issue caused the following error: <...>/gcc/arm-yocto-eabi/9.3.0/ld: <...>/recipe-sysroot/usr/lib/libc.a(lib_a-exit.o): in function `exit': /usr/src/debug/newlib/3.2.0-r0/newlib-3.2.0/newlib/libc/stdlib/exit.c:64: undefined reference to `_exit' collect2: error: ld returned 1 exit status Fix the issue by providing Zephyr source directory to cmake via OECMAKE_SOURCEPATH variable. On the do_configure step cmake now gets the full path to the sample source code instead of Zephyr root directory. The second and third issue caused errors because of missing files. Don't execute do_install and use the same paths in deploy as the other sample apps do. Inspecting meta-zephyr commits history shows that similar approach was used in bb files of other sample application when updating them to work with Zephyr 2.0. For the missing Tinycrypt, append its location to cmake. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
-rw-r--r--recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb11
1 files changed, 4 insertions, 7 deletions
diff --git a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
index 2ffe5ae..192c76d 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
+++ b/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
@@ -5,15 +5,12 @@ inherit deploy
ZEPHYR_SAMPLE_NAME="samples/bluetooth/peripheral_esp"
ZEPHYR_SRC_DIR = "${S}/${ZEPHYR_SAMPLE_NAME}"
ZEPHYR_BASE = "${S}"
-
-do_compile () {
- cd ${ZEPHYR_SRC_DIR}
- oe_runmake ${ZEPHYR_MAKE_ARGS}
-}
+OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
+EXTRA_OECMAKE_append = "\;${S}/modules/crypto/tinycrypt"
do_deploy () {
- install -D ${ZEPHYR_SAMPLE_NAME}/outdir/${BOARD}/zephyr.elf ${DEPLOYDIR}/${PN}.elf
- install -D ${ZEPHYR_SAMPLE_NAME}/outdir/${BOARD}/zephyr.bin ${DEPLOYDIR}/${PN}.bin
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
}
addtask deploy after do_compile
+do_install[noexec] = "1"