<?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>12153</bug_id>
          
          <creation_ts>2017-10-02 20:20:52 +0000</creation_ts>
          <short_desc>in an esdk, devtool fails to build ovmf</short_desc>
          <delta_ts>2025-02-14 16:48:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard> </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77279</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-10-02 20:20:52 +0000</bug_when>
    <thetext>off of master, in an esdk built for core-image-base genericx86-64 and wic, suppose we want to boot the genericx86-64 image in qemu.

In order to do this, you need to run qemu with ovmf since the default genericx86-64 uses grub-efi.

Unfortuneately,
esdk$&gt;devtool modify ovmf
esdk$&gt;devtool build ovmf 
the build fails with:
edksetup.sh: line 88: tmp/work/core2-64-poky-linux/ovmf/git-r0/devtooltmp-08kyux9h/workdir/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/BuildEnv: No such file or directory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77359</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-10-04 20:45:04 +0000</bug_when>
    <thetext>This is built with adding wic to IMAGE_FSTYPES and enabling booting in qmeu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78209</commentid>
    <comment_count>2</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-11-15 03:51:49 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This is built with adding wic to IMAGE_FSTYPES and enabling booting in qmeu.

I&apos;m trying to reproduce the issue here. Do you mean, by adding wic to IMAGE_FSTYPES in local.conf, we can boot genericx86-64 image in qemu?

MACHINE = &quot;genericx86-64&quot;
IMAGE_FSTYPES += &quot;wic&quot;

I&apos;ve tried the above configurations but runqemu failed. Is there any configurations that is missing?
----- snip -----
$ runqemu tmp/deploy/images/genericx86-64/core-image-base-genericx86-64.wic
runqemu - INFO - Running MACHINE=genericx86-64 bitbake -e...
runqemu - INFO - Overriding conf file setting of STAGING_DIR_NATIVE to /media/rebeccas/yocto/12153/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native from Bitbake environment
runqemu - INFO - Continuing with the following parameters:

MACHINE: [genericx86-64]
FSTYPE: [wic]
ROOTFS: [/media/rebeccas/yocto/12153/tmp/deploy/images/genericx86-64/core-image-base-genericx86-64.wic]
CONFFILE: [/media/rebeccas/yocto/12153/tmp/deploy/images/genericx86-64/core-image-base-genericx86-64.qemuboot.conf]

runqemu - INFO - Setting up tap interface under sudo
runqemu - INFO - Running bitbake qemu-helper-native -e...
runqemu - ERROR - Native sysroot directory /media/rebeccas/yocto/12153/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin doesn&apos;t exist
Cleanup

----- snip -----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78878</commentid>
    <comment_count>3</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-03 07:05:05 +0000</bug_when>
    <thetext>It seems like the sysroot for ovmf-native is not being build when we build ovmf in eSDK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78990</commentid>
    <comment_count>4</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-10 08:23:55 +0000</bug_when>
    <thetext>I have drilled down to the point where devtool unable to find edksetup.sh due to the wrongly configured variable BBAKE_EDK_TOOLS_PATH in &lt;ovmf-source&gt;/OvmfPkg/build.sh and it came from a environment variable, STAGING_BINDIR_NATIVE.

Within a native build environment, EDK_TOOLS_PATH was set by do_patch post task functions, &quot;fix_basetools_location&quot;. And its STAGING_BINDIR_NATIVE is pointed to RSS by looking at the output from “bitbake -e”.

However, in eSDK environment, patching was done by oe.patch module in within devtool. And it appears that the STAGING_BINDIR_NATIVE is wrongly set, hence causing BBAKE_EDK_TOOLS_PATH having the wrong BBAKE_EDK_TOOLS_PATH path and hence causing ovmf unable to be compiled within eSDK.

Problematic STAGING_BINDIR_NATIVE:
/poky_sdk/tmp/work/i586-poky-linux/ovmf/git-r0/devtooltmp-sui06mnf/workdir/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools

A correct STAGING_BINDIR_NATIVE:
/poky_sdk/tmp/work/i586-poky-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools

I&apos;m now looking at devtool standard.py &lt;def _extract_source()&gt; where devtooltmp-* was created and how does it impact the STAGING_BINDIR_NATIVE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80076</commentid>
    <comment_count>5</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-04-03 19:06:04 +0000</bug_when>
    <thetext>In fix_basetools_location_class-target():

- sed -i -e &apos;s#BBAKE_EDK_TOOLS_PATH#${STAGING_BINDIR_NATIVE}/${EDK_TOOLS_DIR}#&apos; ${S}/OvmfPkg/build.sh
+ sed -i -e &apos;s#BBAKE_EDK_TOOLS_PATH#$STAGING_BINDIR_NATIVE/${EDK_TOOLS_DIR}#&apos; ${S}/OvmfPkg/build.sh

This will fix the issue in eSDK but crashing normal build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96852</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:30 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101013</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-14 16:46:36 +0000</bug_when>
    <thetext>bulk change to add Saul&apos;s non-WR address.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101068</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-14 16:48:23 +0000</bug_when>
    <thetext>Bulk change: Remove Saul&apos;s old WR address.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>