[meta-zephyr,2/2] zephyr-kernel: install .efi image if available

Submitted by Naveen Saini on July 7, 2021, 9:20 a.m. | Patch ID: 179925

Details

Message ID 20210707092014.12537-2-naveen.kumar.saini@intel.com
State New
Headers show

Commit Message

Naveen Saini July 7, 2021, 9:20 a.m.
EFI images are being generated for x86 platforms.

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 +
 recipes-kernel/zephyr-kernel/zephyr-sample.inc        | 6 ++++++
 2 files changed, 7 insertions(+)

Patch hide | download patch | download mbox

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