[meta-zephyr][PATCH 2/2] zephyr-kernel: install .efi image if available
Naveen Saini
EFI images are being generated for x86 platforms.
Signed-off-by: Naveen Saini <naveen.kumar.saini@...>
---
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 +
recipes-kernel/zephyr-kernel/zephyr-sample.inc | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 46f19e2..7d44b97 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -13,6 +13,7 @@ ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin"
+ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi"
EXTRA_OECMAKE = "\
-DZEPHYR_BASE=${S} \
diff --git a/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
index 7b49611..77fa5ad 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-sample.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
@@ -9,9 +9,15 @@ 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
+
+ if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ]
+ then
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${DEPLOYDIR}/${PN}.efi
+ fi
}
addtask deploy after do_compile
--
2.17.1
Signed-off-by: Naveen Saini <naveen.kumar.saini@...>
---
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 +
recipes-kernel/zephyr-kernel/zephyr-sample.inc | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index 46f19e2..7d44b97 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -13,6 +13,7 @@ ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin"
+ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi"
EXTRA_OECMAKE = "\
-DZEPHYR_BASE=${S} \
diff --git a/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
index 7b49611..77fa5ad 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-sample.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-sample.inc
@@ -9,9 +9,15 @@ 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
+
+ if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ]
+ then
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${DEPLOYDIR}/${PN}.efi
+ fi
}
addtask deploy after do_compile
--
2.17.1