Bug 10793 - Modify runqemu to run ELF images
Summary: Modify runqemu to run ELF images
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 4.99
Assignee: Alejandro
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-12-12 21:35 UTC by Juro Bystricky
Modified: 2022-05-09 12:56 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2016-12-12 21:35:49 UTC
When building Zephyr images, the resulting image is in ELF file format.
It would be nice to be able to run the image in qemu via a command such as:

runqemu zephyr.elf [command line arguments]

Presently we must use full paths, for example qemux86:

    $ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 \
           -kernel ./tmp/deploy/images/qemux86/zephyr.elf \
           -nographic -machine type=pc-0.14 -display none -clock dynticks \
           -no-acpi -balloon none

or qemuarm:

    $ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm  \
           -kernel ./tmp/deploy/images/qemuarm/zephyr.elf \
           -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none
Comment 1 Robert Yang 2017-07-13 08:45:58 UTC
Sorry, I need more time to investigate how qemu boot elf.
Comment 2 Pavel Zhukov 2022-05-09 11:46:49 UTC
Looks like this has been fixed already:

# runqemu qemu-x86
runqemu - INFO - Running MACHINE=qemu-x86 bitbake -e ...
runqemu - INFO - Continuing with the following parameters:
KERNEL: [/mnt/builds/oniroproject/build-oniro-zephyr/tmp-newlib/deploy/images/qemu-x86/zephyr-philosophers.elf]
MACHINE: [qemu-x86]
FSTYPE: [elf]
ROOTFS: [/mnt/builds/oniroproject/build-oniro-zephyr/tmp-newlib/deploy/images/qemu-x86/zephyr-philosophers-image-qemu-x86.elf]
CONFFILE: [/mnt/builds/oniroproject/build-oniro-zephyr/tmp-newlib/deploy/images/qemu-x86/zephyr-philosophers-image-qemu-x86.qemuboot.conf]

runqemu - INFO - Running /mnt/builds/oniroproject/build-oniro-zephyr/tmp-newlib/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qe                                                                                                                                                                                                rial null -device virtio-vga  -display sdl,show-cursor=on  -kernel /mnt/builds/oniroproject/build-oniro-zephyr/tmp-newlib/deploy/images/qemu-x86/zephyr-phil
Comment 3 Pavel Zhukov 2022-05-09 12:56:27 UTC
This has been fixed see c#2