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>
This commit is contained in:
Nagesh Shamnur
2021-06-11 10:52:03 +02:00
committed by Naveen Saini
parent fce191d5c7
commit 098501ca0e
2 changed files with 5 additions and 0 deletions

View File

@@ -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} \

View File

@@ -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