Date   

Make HII browser engine render faster and change font Size in HII

Kiet Pham
 

Hello All,



I'm currently develop BIOS Setup Utilities. The monitor resolution is too
big 1920 x 1080 so when I try to set BIOS setup full screen, it took short
but noticeable render time to render the BIOS Setup. Also, I cannot find any
way to modify font size, most are just changing character "container" size
without changing character size.



So I'd like to ask how to make HII Browser Engine render faster and
technique to adjust font size.



Thanks in advance,

Kiet


Is the QemuVideoDXE GOP gone after S3

Joel
 

I was wondering if anyone knew if the Graphical Output Protocol that creates the framebuffer for the guests is no longer instantiated after OVMF comes back from S3 resume. If I uninstall my guest PV driver for display, I no longer get screen updates after the guest has gone to sleep. It will fall back to the GOP framebuffer correctly before S3. Is there a large amount of work that needs to be done to get this type of thing working? I'm unsure if we just need to add the tables to the LockBox for the GOP during EndOfDxe events or something. Any help would be great.

-Joel


Writing to QemuVideoDxe Framebuffer after sleep

Joel
 

I have been working with the Xen platform, and while I have gotten sleep working, I have run into a bug that I need help understanding. We use our own PV drivers for display, and if we disable the driver or uninstall before the guest has gone to sleep, the video will switch over to the GOP QemuVideo (using the Bochs protocol) without issue. However if a sleep has been done and an uninstall performed, I am seeing the last image before the framebuffer switched to the PV buffer (so Windows boot screen), and the framebuffer isn't updated beyond that. From what it appears, it would seem that after the guest has gone to sleep, the framebuffer setup by QemuVideo is destroyed and not set back up on return. From what I have read the GOP gets setup and is just never torn down after the end of DXE. Does anyone have any idea what it would take to get the GOP running after sleep, or does anyone know that it is most definitely running and therefore my problem exists elsewhere?

This is my first post to the group, so any help would be fantastic!

-Joel


EDK2 Shell does not work on headless machine

tom.ty89@...
 

Hi,

I'm trying to use the EDK2 shell on my old machine to side-load an NVMe DXE driver (with a startup.nsh) for grub to be able to boot / chainload OSes on an NVMe drive. The plan works, except that it works only if the machine has a monitor attached. If it is booted headless, the shell appears to just stall and fail to run the script at all (even if it is changed to just run grub that is configured to boot system on non-NVMe drive).

Any pointer to what might be blocking it? Or is it defected by design that it cannot be used without a monitor?


Re: a question about X509 flag

wenyi,xie
 

On 2021/9/27 17:21, Marvin Häuser wrote:
Hey Wenyi,

Sorry, I cannot help with the time one, but "partial chain" is how virtually any other crypto-solution works out-of-the-box. Basically there is a disagreement about what defines a root certificate, and while some think it is the OpenSSL default of requiring a self-signed certificate for root, many people including myself strongly disagree and do not believe it follows from the RFCs. I'm not aware of any bad security implications of either model. So, this merely allows any certificate in the chain (the top one may be self-signed *if* it even is a certificate, it may just as well be a trusted public key for all we know) to be eligible to be added to the trust store and root a trust chain.
Thank you for your explanation in detail, it helps a lot. X509_V_FLAG_PARTIAL_CHAIN is clear to me now.

Wenyi

Further reading: https://github.com/openssl/openssl/issues/7871

Cc CryptoPkg maintainers and edk2-devel for further feedback

Best regards,
Marvin

On 27/09/2021 10:53, wenyi,xie via groups.io wrote:
Hello,

I have a question about flag set in X509_STORE. Does anyone know why need to set flags X509_V_FLAG_PARTIAL_CHAIN and X509_V_FLAG_NO_CHECK_TIME to X509Store in TlsNew() (CryptoPkg\Library\TlsLib\TlsInit.c)

Thanks
Wenyi




.


a question about X509 flag

wenyi,xie
 

Hello,

I have a question about flag set in X509_STORE. Does anyone know why need to set flags X509_V_FLAG_PARTIAL_CHAIN and X509_V_FLAG_NO_CHECK_TIME to X509Store in TlsNew() (CryptoPkg\Library\TlsLib\TlsInit.c)

Thanks
Wenyi


Re: History of Driver/Features in edk2-platforms

Nate DeSimone
 

Hi Jeff,



The general idea behind putting the drivers and feature code into edk2-platforms came from the concept of advanced feature packages from the MinPlatform specification<https://tianocore-docs.github.io/edk2-MinimumPlatformSpecification/draft/8_stage_6_advanced_feature_selection/#8-stage-6-advanced-feature-selection>.



[cid:image001.jpg@01D7ABE6.E0405820]



So edk2-platforms/Features provides the catalog of available features. Use of these features is convenient due to AdvancedFeaturePkg providing easy to use FixedAtBuild PCDs for turning individual features on and off: https://github.com/tianocore/edk2-platforms/blob/master/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc



Another benefit to this layout is having AdvancedFeaturePkg and MinPlatformPkg co-located enables greater simplicity in our build scripts.



With regard to the idea of pairing down the packages in your formal release repo, that is certainly one method of focusing the codebase on your platform. However, we have found that doing that can make cherry-picks from upstream to downstream (or vice versa) to be more difficult than desirable. At Intel we use git’s sparse checkout feature in lieu of wholesale deletion of packages from the repository.



The usage of several git repositories in a typical modern EDK II project has made fetching code somewhat tedious in general. To make this easier we created the EdkRepo tool, which automates many of these common workflows. In addition to automating cloning and fetching across multiple repositories, EdkRepo manages the git sparse checkout list, automates deployment of client side git hooks and commit templates, and several other useful features.



If you would like to give it a try, the newest release is available here: https://github.com/tianocore/edk2-edkrepo/releases/tag/edkrepo-v2.1.2

To install EdkRepo, the following software is needed:


* Git 2.13.x or later (Git 2.27.0<https://github.com/git-for-windows/git/releases/download/v2.27.0.windows.1/Git-2.27.0-64-bit.exe> recommended)
* Python 3.5 or later (Python 3.8.10<https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe> recommended)

After you have EdkRepo, run the following command:


edkrepo clone <path-to-some-folder> Intel-MinPlatform

After that is done, change to the directory edk2-platforms/Platform/Intel and run the following command:

build_bios.py -p WilsonCityRvp -t VS2015x85 -d
Or
build_bios.py -p WilsonCityRvp -t VS2015x86 -r

-d is for debug, -r is for release. You can also use -t VS2017/VS2019 if you prefer. On Linux, use -t GCC5.

I hope that helps. Thank you again for reaching out, let us know if you have any questions!

With Best Regards,
Nate

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Jeff Brasen via groups.io
Sent: Thursday, September 16, 2021 9:37 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] History of Driver/Features in edk2-platforms



Was curious if there was a reason why the top level drivers and features code was added into edk2-platforms instead of edk2 or a new repo. These modules seem different than the rest of the code in edk2-platforms as they are not really platform or silicon related code but general features. We are looking at how to both release support for our platforms into tianocore as well as a separate fork that will be used for our actual formal release and it may be preferable to not have all of the other platform/silicon code that is not relevant to our project.



Thanks,

Jeff


History of Driver/Features in edk2-platforms

Jeff Brasen
 

Was curious if there was a reason why the top level drivers and features code was added into edk2-platforms instead of edk2 or a new repo. These modules seem different than the rest of the code in edk2-platforms as they are not really platform or silicon related code but general features. We are looking at how to both release support for our platforms into tianocore as well as a separate fork that will be used for our actual formal release and it may be preferable to not have all of the other platform/silicon code that is not relevant to our project.

Thanks,
Jeff


MicroPythonPkg: How to import/compile uefi module?

Buhrow, Simon
 

Hi,

following the instructions on https://github.com/tianocore/edk2-staging/tree/MicroPythonTestFramework/MicroPythonPkg , I can successfully run micropython.efi (using VS2015x86 instead of VS2017).

However importing the uefi module as given in the example on the above link fails:

```
FS0:\EFI\Python\> micropython.efi
MicroPython v1.9.4 on 2018-07-30; uefi version
Use Ctrl-D to exit, Ctrl-E for paste mode
import Lib.Uefi.uefi as uefi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'Lib.Uefi'
```

MicroPythonDxe.efi is in the same folder as micropython.efi.

How do I do to compile the uefi module (and other modules) into MicroPythonDxe.efi? (i.e. what changes do I have to make as the default way did not work?)


Regards,

Simon

PS: I posted this question some weeks ago on Stackoverflow:
https://stackoverflow.com/questions/68573311/how-to-import-compile-uefi-module-using-micropython



SIEB & MEYER AG
Simon Buhrow
Entwicklung CNC
Auf dem Schmaarkamp 21
21339 Lüneburg
Germany
Tel.: +49-4131-203-1258
Fax.: +49-4131-203-2000
E-mail: simon.buhrow@sieb-meyer.de
https://www.sieb-meyer.de

Vorstand: Markus Meyer, Torsten Blankenburg
Aufsichtsratsvorsitzender: Michael Semrau
Amtsgericht Lüneburg: HRB 1805
Umsatzsteuer-ID-Nr.: DE 116085664


PCI-Express version 1.1 doesn't support link training error

giovane.anhaia@...
 

Hi,
I'm working with PCI-Express diagnostics on UEFI using edk2. On PCI-Express Base Specification 1.0a there's a bit defined as "Link Training Error" on "Link Status Register (Offset 12h)".
Specs from 1.1 up define the same bit as "Undefined".
Does somebody know if there's an alternative way to check a link training error in these newer PCI-Express specs?


Re: UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 


Re: UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 

On Fri, Aug 20, 2021 at 04:52 PM, Andrew Fish wrote:


If you move gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress back to being a
compile time constant (location in the DSC file matters) that might get you
past your ASSERT as a work around?
Yes, it works. Moved from PcdsDynamicDefault to PcdsFixedAtBuild and added hardcoded values.
I think Ray Ni <ray.ni@intel.com> must be contacted to provide a fix...
The build is done using:
build -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5 -D BOOTLOADER=COREBOOT
(IA32 is also required for coreboot)

Perhaps the issue is related to the IA32 target? Calling PcdSet64S() is allowed?
./UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c:
if (GuidHob != NULL) {
AcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
Status = PcdSet64S (PcdPciExpressBaseAddress, AcpiBoardInfo->PcieBaseAddress);
ASSERT_EFI_ERROR (Status);
Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
ASSERT_EFI_ERROR (Status);
}

Thanks,
Sumo


Re: UefiPayloadPkg: assert error in PeiPcdLib

Andrew Fish
 

On Aug 20, 2021, at 2:18 PM, King Sumo <kingsumos@gmail.com> wrote:

Hi,

If I revert the patch I can see the log output from PayloadEntry(), e.g.:
GET_BOOTLOADER_PARAMETER() = 0x17F766000

But with the patch nothing else is shown in the log besides:
ASSERT_EFI_ERROR (Status = Not Found)
ASSERT [PeiCore]
/work/edk2/edk2-orig/MdePkg/Library/PeiPcdLib/PeiPcdLib.c(43): !EFI_ERROR

So looks like it's crashing before the PayloadEntry() call. In fact, according to PeiPcdLib.c:43 it fails to locate gPcdPpiGuid:
Status = PeiServicesLocatePpi (&gPcdPpiGuid, 0, NULL, (VOID **)&PcdPpi);
Maybe it's failling inside ./UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm... pretty odd.

Any advices?
There is “build magic”(TM) around PCDs. There are different flavors of PCDs. PCDs can be build constants or looked up from a central database. The ASSERT is from the code trying to look something up. What flavor a PCD has is controlled by the platform build, so DSC file.

In yoru hash…
For: UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc

- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE)

+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0

It looks like a PCD may have moved from a fixed at build (compile type constant) to something that needs to get looked up in the PCD database.

That PPI is usually produced by this PIEM:
MdeModulePkg/Universal/PCD/Pei/Pei.inf

Your ASSERT() is basically the above PEIM is missing.

If you move gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress back to being a compile time constant (location in the DSC file matters) that might get you past your ASSERT as a work around?

Thanks,

Andrew Fish

Thanks,
Sumo





Re: UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 

Hi,

If I revert the patch I can see the log output from PayloadEntry(), e.g.:
GET_BOOTLOADER_PARAMETER() = 0x17F766000

But with the patch nothing else is shown in the log besides:
ASSERT_EFI_ERROR (Status = Not Found)
ASSERT [PeiCore]
/work/edk2/edk2-orig/MdePkg/Library/PeiPcdLib/PeiPcdLib.c(43): !EFI_ERROR

So looks like it's crashing before the PayloadEntry() call. In fact, according to PeiPcdLib.c:43 it fails to locate gPcdPpiGuid:
Status = PeiServicesLocatePpi (&gPcdPpiGuid, 0, NULL, (VOID **)&PcdPpi);
Maybe it's failling inside ./UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm... pretty odd.

Any advices?

Thanks,
Sumo


UefiPayloadPkg: assert error in PeiPcdLib

King Sumo
 

Hi,

Using coreboot 4.14 + UefiPayloadPkg the following error is shown:

ASSERT_EFI_ERROR (Status = Not Found)
ASSERT [PeiCore]
/work/edk2/edk2-orig/MdePkg/Library/PeiPcdLib/PeiPcdLib.c(43): !EFI_ERROR
(Status)


By doing a git bisect I found the following commit (doing a git revert
fixes the issue):
3900a63e3a UefiPayloadPkg/Pci: Use the PCIE Base Addr stored in
AcpiBoardInfo HOB

Basically this change gets the PCIe base address from the AcpiBoardInfo HOB.
I'm not sure if this AcpiBoardInfo HOB is really available for coreboot,
but the crash looks funny. It probably occurs while
setting PcdPciExpressBaseAddress or PcdPciExpressBaseSize (not sure, more
debug needed) but they are both defined...

Anyone run into the same problem?

Thanks,
Sumo


Re: Build failures Windows10, VS2019

Sean
 

Just to add yet another way and more info about how the CI does all this for every commit (I hate batch files and the junk in "edksetup")

If you follow this:
https://github.com/tianocore/edk2/tree/master/.pytool

You can build CI which will build and test packages like MdeModulePkg.dsc and others.

But there is one missing step between step 4 and Step 5.
You need to build the edk2 basetools. My preferred method is:

python BaseTools/Edk2ToolsBuild.py -t VS2019

If you want to build a platform like OVMF or EmulatorPkg they also have ReadMe.md files with pretty good details that include this required step.

https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/ReadMe.md

Hope that helps.

Thanks
Sean

On 8/13/2021 10:44 AM, dss.v1.0@gmail.com wrote:
Friends,
Does anyone have a link to a single and consistent description of a build of edk2 starting from scratch on a new Windows 10 machine using the python BaseTools etc? The several recipes I have tried have all ultimately failed me.
Currently this is my breaking point:
```
(.venv)>edk2_build
Build environment: Windows-10-10.0.19042-SP0
Build start time: 13:29:22, Aug.13 2021
WORKSPACE = c:\users\dss\dev\mc\edk2
EDK_TOOLS_PATH = c:\users\dss\dev\mc\edk2\basetools
EDK_TOOLS_BIN = c:\users\dss\dev\mc\edk2\basetools\bin\win32
CONF_PATH = c:\users\dss\dev\mc\edk2\conf
PYTHON_COMMAND = py -3
Processing meta-data
Architecture(s) = X64
Build target = DEBUG
.Toolchain = VS2019
Active Platform = c:\users\dss\dev\mc\edk2\MdeModulePkg\MdeModulePkg.dsc
................
.
(many inf's built here)
.
.
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.exe" /showIncludes /nologo /E /TC /DVFRCOMPILE /FIPlatformVarCleanupLibStrDefs.h /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib /Ic:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG /Ic:\users\dss\dev\mc\edk2\MdePkg /Ic:\users\dss\dev\mc\edk2\MdePkg\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Test\UnitTest\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Include\X64 /Ic:\users\dss\dev\mc\edk2\MdeModulePkg /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Include /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\brotli\c\include c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatVarCleanup.vfr > c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol\DxePrintLibPrint2Protocol.inf [X64]
PlatVarCleanup.vfr
"VfrCompile" -l -n --string-db c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatformVarCleanupLibStrDefs.hpk --output-directory c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\. c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PeiReportStatusCodeLib\PeiReportStatusCodeLib.inf [X64]
'VfrCompile' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '"VfrCompile' : return code '0x1'
Stop.
```
I have made a number of passes at it from various wiki's, README.rst's with no luck. Many months ago I chanced upon an install sequence that gave me a development workspace which would build .EFI apps, HelloWorld and such with some precompiled win32 basetools binaries. But that is now not reproducible.
Using the somewhat inconsistent instructions from the wiki, windows_build, https://pypi.org/project/edk2-basetools/ (which humorously explains edk2-basetools is not on pyPI, yes I see it was just added). I also looked at the CI implementation, but it is so containerized I could not glean my path through it. Mathew Carlsons repo and comments in discussions have moved me much closer to success than I was. But as seen above that was still not enough for me.
Anyhow, any help is appreciated.
thanks,
Dan


回复: [edk2-discuss] Build failures Windows10, VS2019

gaoliming
 

Have you full build log? You can check whether VfrCompile is compiled from
BaseTools source code or not.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 Matthew
Carlson via groups.io
发送时间: 2021年8月18日 20:59
收件人: discuss@edk2.groups.io; dss.v1.0@gmail.com
主题: Re: [edk2-discuss] Build failures Windows10, VS2019

Hello Dan,

VfrCompile is a c based barstools and should be compiled (I think edk2
setup
does this). Do you see that? I think it will be under
Basetools/Source/C/bin

https://github.com/tianocore/edk2/blob/master/BaseTools/Bin/CYGWIN_NT
-5.1-i686/VfrCompile



On Aug 13, 2021, at 12:44 PM, dss.v1.0@gmail.com wrote:

Friends,

Does anyone have a link to a single and consistent description of a
build of
edk2 starting from scratch on a new Windows 10 machine using the python
BaseTools etc? The several recipes I have tried have all ultimately failed
me.

Currently this is my breaking point:

```
(.venv)>edk2_build
Build environment: Windows-10-10.0.19042-SP0
Build start time: 13:29:22, Aug.13 2021

WORKSPACE = c:\users\dss\dev\mc\edk2
EDK_TOOLS_PATH = c:\users\dss\dev\mc\edk2\basetools
EDK_TOOLS_BIN = c:\users\dss\dev\mc\edk2\basetools\bin\win32
CONF_PATH = c:\users\dss\dev\mc\edk2\conf
PYTHON_COMMAND = py -3


Processing meta-data
Architecture(s) = X64
Build target = DEBUG
.Toolchain = VS2019

Active Platform =
c:\users\dss\dev\mc\edk2\MdeModulePkg\MdeModulePkg.dsc
................
.
(many inf's built here)
.
.
Building ...
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\Pl
atformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.e
xe" /showIncludes /nologo /E /TC /DVFRCOMPILE
/FIPlatformVarCleanupLibStrDefs.h
/Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib
/Ic:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeM
odulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG
/Ic:\users\dss\dev\mc\edk2\MdePkg
/Ic:\users\dss\dev\mc\edk2\MdePkg\Include
/Ic:\users\dss\dev\mc\edk2\MdePkg\Test\UnitTest\Include
/Ic:\users\dss\dev\mc\edk2\MdePkg\Include\X64
/Ic:\users\dss\dev\mc\edk2\MdeModulePkg
/Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Include
/Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\BrotliCustomDecompre
ssLib\brotli\c\include
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\Pl
atVarCleanup.vfr >
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatV
arCleanup.i
Building ...
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol
\DxePrintLibPrint2Protocol.inf [X64]
PlatVarCleanup.vfr
"VfrCompile" -l -n --string-db
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\Platf
ormVarCleanupLibStrDefs.hpk --output-directory
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\.
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatV
arCleanup.i
Building ...
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PeiReportStatusCodeLib\
PeiReportStatusCodeLib.inf [X64]
'VfrCompile' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '"VfrCompile' : return code '0x1'
Stop.
```

I have made a number of passes at it from various wiki's, README.rst's
with
no luck. Many months ago I chanced upon an install sequence that gave me a
development workspace which would build .EFI apps, HelloWorld and such
with some precompiled win32 basetools binaries. But that is now not
reproducible.

Using the somewhat inconsistent instructions from the wiki,
windows_build,
https://pypi.org/project/edk2-basetools/ (which humorously explains
edk2-basetools is not on pyPI, yes I see it was just added). I also looked
at the
CI implementation, but it is so containerized I could not glean my path
through
it. Mathew Carlsons repo and comments in discussions have moved me much
closer to success than I was. But as seen above that was still not enough
for
me.

Anyhow, any help is appreciated.
thanks,
Dan








Re: Build failures Windows10, VS2019

Matthew Carlson
 

Hello Dan,

VfrCompile is a c based barstools and should be compiled (I think edk2 setup does this). Do you see that? I think it will be under Basetools/Source/C/bin

https://github.com/tianocore/edk2/blob/master/BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile

On Aug 13, 2021, at 12:44 PM, dss.v1.0@gmail.com wrote:

Friends,

Does anyone have a link to a single and consistent description of a build of edk2 starting from scratch on a new Windows 10 machine using the python BaseTools etc? The several recipes I have tried have all ultimately failed me.

Currently this is my breaking point:

```
(.venv)>edk2_build
Build environment: Windows-10-10.0.19042-SP0
Build start time: 13:29:22, Aug.13 2021

WORKSPACE = c:\users\dss\dev\mc\edk2
EDK_TOOLS_PATH = c:\users\dss\dev\mc\edk2\basetools
EDK_TOOLS_BIN = c:\users\dss\dev\mc\edk2\basetools\bin\win32
CONF_PATH = c:\users\dss\dev\mc\edk2\conf
PYTHON_COMMAND = py -3


Processing meta-data
Architecture(s) = X64
Build target = DEBUG
.Toolchain = VS2019

Active Platform = c:\users\dss\dev\mc\edk2\MdeModulePkg\MdeModulePkg.dsc
................
.
(many inf's built here)
.
.
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.exe" /showIncludes /nologo /E /TC /DVFRCOMPILE /FIPlatformVarCleanupLibStrDefs.h /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib /Ic:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG /Ic:\users\dss\dev\mc\edk2\MdePkg /Ic:\users\dss\dev\mc\edk2\MdePkg\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Test\UnitTest\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Include\X64 /Ic:\users\dss\dev\mc\edk2\MdeModulePkg /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Include /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\brotli\c\include c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatVarCleanup.vfr > c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol\DxePrintLibPrint2Protocol.inf [X64]
PlatVarCleanup.vfr
"VfrCompile" -l -n --string-db c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatformVarCleanupLibStrDefs.hpk --output-directory c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\. c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PeiReportStatusCodeLib\PeiReportStatusCodeLib.inf [X64]
'VfrCompile' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '"VfrCompile' : return code '0x1'
Stop.
```

I have made a number of passes at it from various wiki's, README.rst's with no luck. Many months ago I chanced upon an install sequence that gave me a development workspace which would build .EFI apps, HelloWorld and such with some precompiled win32 basetools binaries. But that is now not reproducible.

Using the somewhat inconsistent instructions from the wiki, windows_build, https://pypi.org/project/edk2-basetools/ (which humorously explains edk2-basetools is not on pyPI, yes I see it was just added). I also looked at the CI implementation, but it is so containerized I could not glean my path through it. Mathew Carlsons repo and comments in discussions have moved me much closer to success than I was. But as seen above that was still not enough for me.

Anyhow, any help is appreciated.
thanks,
Dan





Re: Build failures Windows10, VS2019

Andrew Fish
 

I’ve not built on Windows in a long time but ……

VfrCompile is a C tool from the BaseTools project. So it requires that you build the BaseTools, and have the BaseTools executables in your path.

From the root of your edk2 git tree you need to...

To build the C BaseTools you:
edksetup.bat Rebuild

To setup a terminal window for a build you need to:
edksetup.bat


If you are not modifying the build tools you only need to build the BaseTools if you update the source code for the BaseTools.
You need to run edksetup.bat once for your terminal window. It should setup the path for you, and you should be good.

Not sure what `edk2_build` does in your example.

Thanks,

Andrew Fish

On Aug 13, 2021, at 10:44 AM, dss.v1.0@gmail.com wrote:

Friends,

Does anyone have a link to a single and consistent description of a build of edk2 starting from scratch on a new Windows 10 machine using the python BaseTools etc? The several recipes I have tried have all ultimately failed me.

Currently this is my breaking point:

```
(.venv)>edk2_build
Build environment: Windows-10-10.0.19042-SP0
Build start time: 13:29:22, Aug.13 2021

WORKSPACE = c:\users\dss\dev\mc\edk2
EDK_TOOLS_PATH = c:\users\dss\dev\mc\edk2\basetools
EDK_TOOLS_BIN = c:\users\dss\dev\mc\edk2\basetools\bin\win32
CONF_PATH = c:\users\dss\dev\mc\edk2\conf
PYTHON_COMMAND = py -3


Processing meta-data
Architecture(s) = X64
Build target = DEBUG
.Toolchain = VS2019

Active Platform = c:\users\dss\dev\mc\edk2\MdeModulePkg\MdeModulePkg.dsc
................
.
(many inf's built here)
.
.
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.exe" /showIncludes /nologo /E /TC /DVFRCOMPILE /FIPlatformVarCleanupLibStrDefs.h /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib /Ic:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG /Ic:\users\dss\dev\mc\edk2\MdePkg /Ic:\users\dss\dev\mc\edk2\MdePkg\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Test\UnitTest\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Include\X64 /Ic:\users\dss\dev\mc\edk2\MdeModulePkg /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Include /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\brotli\c\include c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatVarCleanup.vfr > c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol\DxePrintLibPrint2Protocol.inf [X64]
PlatVarCleanup.vfr
"VfrCompile" -l -n --string-db c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatformVarCleanupLibStrDefs.hpk --output-directory c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\. c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PeiReportStatusCodeLib\PeiReportStatusCodeLib.inf [X64]
'VfrCompile' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '"VfrCompile' : return code '0x1'
Stop.
```

I have made a number of passes at it from various wiki's, README.rst's with no luck. Many months ago I chanced upon an install sequence that gave me a development workspace which would build .EFI apps, HelloWorld and such with some precompiled win32 basetools binaries. But that is now not reproducible.

Using the somewhat inconsistent instructions from the wiki, windows_build, https://pypi.org/project/edk2-basetools/ (which humorously explains edk2-basetools is not on pyPI, yes I see it was just added). I also looked at the CI implementation, but it is so containerized I could not glean my path through it. Mathew Carlsons repo and comments in discussions have moved me much closer to success than I was. But as seen above that was still not enough for me.

Anyhow, any help is appreciated.
thanks,
Dan





Re: 回复: [edk2-discuss] edk2 build error

dss.v1.0@...
 

Are these instructions appropriate for building edk2 in general. I have been failing to get a simple non-emulating development build working? Every set of instructions from the top level readme from github has resulted in failure, usually because of a problem with BaseTools. I have tried several variations based on instructions for python BaseTools, both from pyPI and Mathew Carlson’s personal repo. Is the stuart_build only available for the CI environment? Why are the instructions from the main repo so incorrect?

I am starting with a clean Windows 10 machine and VS2019. I have installed all the prerequisite applications.

Thanks muchly,
Dan Sabo

21 - 40 of 860