aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNagesh Shamnur <nagesh.shamnur@huawei.com>2021-06-11 10:52:03 +0200
committerNaveen Saini <naveen.kumar.saini@intel.com>2021-06-15 14:14:34 +0800
commit098501ca0eb404bc9d89e45cf0f296be42bf4629 (patch)
tree24522c7b9b9cf0793e7579b6cf2f5f904b53f18a
parentfce191d5c796c4e94a47bdd64b5e2be54226ddc2 (diff)
downloadmeta-zephyr-098501ca0eb404bc9d89e45cf0f296be42bf4629.tar.gz
meta-zephyr-098501ca0eb404bc9d89e45cf0f296be42bf4629.tar.bz2
meta-zephyr-098501ca0eb404bc9d89e45cf0f296be42bf4629.zip
zephyr-kernel: install .bin image if available
Some boards (e.g. Arduino Nano 33 BLE) require image in bin format for flashing with `-c flash_usb`. Provide that image along with ELF image on do_deploy step. Signed-off-by: Nagesh Shamnur <nagesh.shamnur@huawei.com> Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
-rw-r--r--recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc1
-rw-r--r--recipes-kernel/zephyr-kernel/zephyr-sample.inc4
2 files changed, 5 insertions, 0 deletions
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 330fe59..46f19e2 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -12,6 +12,7 @@ ZEPHYR_GCC_VARIANT="yocto"
ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
+ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin"
EXTRA_OECMAKE = "\
-DZEPHYR_BASE=${S} \
diff --git a/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
index f7621d1..7b49611 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-sample.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
@@ -9,5 +9,9 @@ do_install[noexec] = "1"
do_deploy () {
install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
+ if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ]
+ then
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${DEPLOYDIR}/${PN}.bin
+ fi
}
addtask deploy after do_compile