<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10793</bug_id>
          
          <creation_ts>2016-12-12 21:35:49 +0000</creation_ts>
          <short_desc>Modify runqemu to run ELF images</short_desc>
          <delta_ts>2022-05-09 12:56:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard> </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Alejandro">alejandro</assigned_to>
          <cc>pavel</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69057</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-12-12 21:35:49 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74994</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2017-07-13 08:45:58 +0000</bug_when>
    <thetext>Sorry, I need more time to investigate how qemu boot elf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93245</commentid>
    <comment_count>2</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-05-09 11:46:49 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93246</commentid>
    <comment_count>3</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-05-09 12:56:27 +0000</bug_when>
    <thetext>This has been fixed see c#2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>