| Summary: | in an esdk, devtool fails to build ovmf | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] eSDK | Reporter: | brian avery <brian.avery> |
| Component: | eSDK | Assignee: | Unassigned <unassigned> |
| Status: | ACCEPTED --- | QA Contact: | Francisco Pedraza <francisco.j.pedraza.gonzalez> |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, randy.macleod, richard.purdie, sgw |
| Version: | 2.4 | ||
| Target Milestone: | 5.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
brian avery
2017-10-02 20:20:52 UTC
This is built with adding wic to IMAGE_FSTYPES and enabling booting in qmeu. (In reply to comment #1) > This is built with adding wic to IMAGE_FSTYPES and enabling booting in qmeu. I'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 = "genericx86-64" IMAGE_FSTYPES += "wic" I'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't exist Cleanup ----- snip ----- It seems like the sysroot for ovmf-native is not being build when we build ovmf in eSDK. 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 <ovmf-source>/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, "fix_basetools_location". 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'm now looking at devtool standard.py <def _extract_source()> where devtooltmp-* was created and how does it impact the STAGING_BINDIR_NATIVE. In fix_basetools_location_class-target():
- sed -i -e 's#BBAKE_EDK_TOOLS_PATH#${STAGING_BINDIR_NATIVE}/${EDK_TOOLS_DIR}#' ${S}/OvmfPkg/build.sh
+ sed -i -e 's#BBAKE_EDK_TOOLS_PATH#$STAGING_BINDIR_NATIVE/${EDK_TOOLS_DIR}#' ${S}/OvmfPkg/build.sh
This will fix the issue in eSDK but crashing normal build.
Bulk move from 4.99 or 0.00 to 5.99 bulk change to add Saul's non-WR address. Bulk change: Remove Saul's old WR address. |