diff mbox series

[meta-zephyr,scarthgap,6/9] zephyr-qemuboot: Use image artifact file in qemuimage

Message ID 20250808175829.3830489-7-sandeep.gundlupet-raju@amd.com
State New
Headers show
Series Update for scarthgap release | expand

Commit Message

Gundlupet Raju, Sandeep Aug. 8, 2025, 5:58 p.m. UTC
Use image artifacts output file in qemuimage link.

Before:
zephyr-helloworld-image-{MACHINE}.elf -> zephyr-helloworld.elf

After:
zephyr-helloworld-image-{MACHINE}.elf -> zephyr-helloworld-{MACHINE}-{DATETIME}.elf

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 meta-zephyr-core/classes/zephyr-qemuboot.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-zephyr-core/classes/zephyr-qemuboot.bbclass b/meta-zephyr-core/classes/zephyr-qemuboot.bbclass
index b45e6f6..ab0a281 100644
--- a/meta-zephyr-core/classes/zephyr-qemuboot.bbclass
+++ b/meta-zephyr-core/classes/zephyr-qemuboot.bbclass
@@ -1,6 +1,8 @@ 
 inherit qemuboot
 
-KERNEL_IMAGETYPE = "${PN}.elf"
+ZEPHYR_IMAGE_BASE_NAME ?= "${PN}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
+
+KERNEL_IMAGETYPE = "${ZEPHYR_IMAGE_BASE_NAME}.elf"
 QB_DEFAULT_FSTYPE = "elf"
 QB_NETWORK_DEVICE = "none"
 QB_NET = "none"
@@ -27,7 +29,7 @@  python bootconf_clean() {
 python do_bootconf_write() {
     bb.build.exec_func("do_write_qemuboot_conf", d)
 
-    qemuimage = "%s/%s.elf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('PN', True))
+    qemuimage = "%s/%s.elf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('ZEPHYR_IMAGE_BASE_NAME', True))
     qemuimage_link = d.getVar('QEMU_IMAGE_LINK', True)
     if os.path.lexists(qemuimage_link):
         os.remove(qemuimage_link)