Date   

Re: 回复: Non-reproducible binaries generated by GenFw

Ross Burton
 

On Thu, 11 Mar 2021 at 17:30, Laszlo Ersek <lersek@redhat.com> wrote:
Ross -- can you please confirm? Does Liming's suggestion work for you?
If I manually call GenFw with -z then it does in fact work. Proof via
diffoscope:

https://try.diffoscope.org/takcczugyxzr.html

I'm failing at making this actually stick in the makefiles though...

Ross


Re: Non-reproducible binaries generated by GenFw

Ross Burton
 

On Thu, 11 Mar 2021 at 04:44, gaoliming <gaoliming@byosoft.com.cn> wrote:

Ross:
I verify -z option. It can remove DEBUG entry and make sure the generated image be reproduced.

PlatformPkg.dsc:

[BuildOptions]
RELEASE_*_*_GENFW_FLAGS = -z
I tried adding that to ShellPkg.dsc but I can't seem to make the value
actually get into the build. Is there anything else I need to do
apart from:

+++ b/ShellPkg/ShellPkg.dsc
@@ -154,3 +154,4 @@
[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
+ RELEASE_*_*_GENFW_FLAGS = -z

Thanks,
Ross


Non-reproducible binaries generated by GenFw

Ross Burton
 

Hi,

As per https://bugzilla.tianocore.org/show_bug.cgi?id=3256, GenFw
writes non-reproducible binaries by embedding a build path. In fact in
a build of ovmf with embedded shell, this one path is the sole source
of non-determinism.

WriteDebug64() is always called in GenFw on output and that embeds
into the NB10 entry the input filename. As build paths change this is
a source of non-determinism. There already exists a --zero option to
wipe out debug paths but this is in release builds so I'm not sure
what the best solution is. I can see several options:

1) Release builds should not call WriteDebug64() at all
2) --zero should wipe the NB10 entry, and release builds should pass that
3) GenFw should support path remapping (like gcc's -ffile-prefix-map)
to turn build paths into something consistent.

Any suggestions?

Cheers,
Ross


Re: 回复: Non-reproducible binaries generated by GenFw

Laszlo Ersek
 

Hi Liming,

On 03/11/21 05:44, gaoliming wrote:
Ross:
I verify -z option. It can remove DEBUG entry and make sure the generated image be reproduced.
I tried the "--zero" option myself (as seen in the BZ), but it didn't
work. What I did was the following: in the original run of the "build"
utility, I redirected the standard output and the standard error to a
log file. Then, I located the "GenFw" invocation that produced the
"Shell.efi" binary from the "Shell.dll" file. I also checked that the
"Shell.dll" file did not contain the full pathname, embedded -- so it
was GenFw that embedded the full file path indeed.

Then, I re-run the GenFw utility myself, interactively, and added the
"--zero" flag to the command line. The output did not change,
"Shell.efi" still contained the full pathname embedded. I also couldn't
find a spot in the GenFw source code where "--zero" would have prevented
a call to WriteDebug64(), or otherwise eliminated the NB10 entry.

... So at this point I'm not sure if I simply messed up my testing. :(

Ross -- can you please confirm? Does Liming's suggestion work for you?

Thanks,
Laszlo


PlatformPkg.dsc:

[BuildOptions]
RELEASE_*_*_GENFW_FLAGS = -z

Thanks
Liming
-----邮件原件-----
发件人: Ross Burton <ross@burtonini.com>
发送时间: 2021年3月11日 3:36
收件人: discuss@edk2.groups.io
抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
yuwei.chen@intel.com
主题: Non-reproducible binaries generated by GenFw

Hi,

As per https://bugzilla.tianocore.org/show_bug.cgi?id=3256, GenFw
writes non-reproducible binaries by embedding a build path. In fact in
a build of ovmf with embedded shell, this one path is the sole source
of non-determinism.

WriteDebug64() is always called in GenFw on output and that embeds
into the NB10 entry the input filename. As build paths change this is
a source of non-determinism. There already exists a --zero option to
wipe out debug paths but this is in release builds so I'm not sure
what the best solution is. I can see several options:

1) Release builds should not call WriteDebug64() at all
2) --zero should wipe the NB10 entry, and release builds should pass that
3) GenFw should support path remapping (like gcc's -ffile-prefix-map)
to turn build paths into something consistent.

Any suggestions?

Cheers,
Ross






回复: Non-reproducible binaries generated by GenFw

gaoliming
 

Ross:
I verify -z option. It can remove DEBUG entry and make sure the generated image be reproduced.

PlatformPkg.dsc:

[BuildOptions]
RELEASE_*_*_GENFW_FLAGS = -z

Thanks
Liming

-----邮件原件-----
发件人: Ross Burton <ross@burtonini.com>
发送时间: 2021年3月11日 3:36
收件人: discuss@edk2.groups.io
抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
yuwei.chen@intel.com
主题: Non-reproducible binaries generated by GenFw

Hi,

As per https://bugzilla.tianocore.org/show_bug.cgi?id=3256, GenFw
writes non-reproducible binaries by embedding a build path. In fact in
a build of ovmf with embedded shell, this one path is the sole source
of non-determinism.

WriteDebug64() is always called in GenFw on output and that embeds
into the NB10 entry the input filename. As build paths change this is
a source of non-determinism. There already exists a --zero option to
wipe out debug paths but this is in release builds so I'm not sure
what the best solution is. I can see several options:

1) Release builds should not call WriteDebug64() at all
2) --zero should wipe the NB10 entry, and release builds should pass that
3) GenFw should support path remapping (like gcc's -ffile-prefix-map)
to turn build paths into something consistent.

Any suggestions?

Cheers,
Ross


Google Summer of Code (GSoC) 2021!

Nate DeSimone
 

Hi Everyone,

I am pleased to announce that TianoCore has been accepted to participate in GSoC 2021! If you are a student and are interested in participating this year, feel free to introduce yourself on the mailing list and discuss potential project proposals. You can find a list of suggested projects on our wiki at: https://github.com/tianocore/tianocore.github.io/wiki/Tasks

Thanks!
Nate


CXL 2.0 Type 3 Support

Chris Browy
 

Hi,

We’ve working with patch series on top of the QEMU CXL 2.0 Type 3 adding Data Object Exchange (DOE) for CDAT and Compliance Mode. This is required to support CXL 2.0 device enumeration and setup of SRAT/HMAT tables for OS handoff.

https://lore.kernel.org/qemu-devel/1615322029-13038-1-git-send-email-cbrowy@avery-design.com/T/#ma47459bfbcd29cf28f11ee9389e5a2ac966a64e1

Based on QEMU version:

https://gitlab.com/bwidawsk/qemu/-/tree/cxl-2.0v4

Do you have a roadmap for edk2 support for CXL 2.0? This is the last piece of the puzzle!

Best Regards,
Chris Browy




--
Chris Browy


Re: Google Summer of Code Interested Student

Laszlo Ersek
 

adding Nate

On 03/10/21 03:10, cadenkline9@gmail.com wrote:
Hello, My name is Caden Kline. I am a freshmen Computer Science major in the US. I intend to specialize in Systems or Security or both. The main two tasks I am hoping to apply for are "Terminal driver improvements" and "Writing Unit Tests". However, I am primarily interested in any system level work and willing to work on anything. I am concerned about the difficulty in completing these tasks so I'm going to list my experience.

My relevant experience for C programming language is a one semester introduction to C and Unix class I am currently taking. Outside of formal experience, I have primarily interacted with C and assembly with capture the flag/wargame binary exploitation challenges, and unfinished projects such as a chip8 emulator. My primary programming experience is Java and Python thanks to my high school and college classes. I have participated in several past google code-ins. My github profile is https://github.com/Pokemod97 .

Is there anything I can do to improve my chances to be selected or any other feedback? Thank you for taking the time to read this message.





CXL 2.0 Type 3 Support

Chris Browy
 

Hi,

We’ve released our patch series on top of the QEMU CXL 2.0 Type 3 adding Data Object Exchange (DOE) for CDAT and Compliance Mode. This is required to support CXL 2.0 device enumeration and setup of SRAT/HMAT tables for OS handoff.

https://lore.kernel.org/qemu-devel/1615322029-13038-1-git-send-email-cbrowy@avery-design.com/T/#ma47459bfbcd29cf28f11ee9389e5a2ac966a64e1

Based on QEMU version:

https://gitlab.com/bwidawsk/qemu/-/tree/cxl-2.0v4

Do you have a roadmap for edk2 support for CXL 2.0? This is the last piece of the puzzle!

Best Regards,
Chris Browy




--
Chris Browy


Google Summer of Code Interested Student

Caden Kline
 

Hello, My name is Caden Kline. I am a freshmen Computer Science major in the US. I intend to specialize in Systems or Security or both. The main two tasks I am hoping to apply for are "Terminal driver improvements" and "Writing Unit Tests". However, I am primarily interested in any system level work and willing to work on anything. I am concerned about the difficulty in completing these tasks so I'm going to list my experience.

My relevant experience for C programming language is a one semester introduction to C and Unix class I am currently taking. Outside of formal experience, I have primarily interacted with C and assembly with capture the flag/wargame binary exploitation challenges, and unfinished projects such as a chip8 emulator. My primary programming experience is Java and Python thanks to my high school and college classes. I have participated in several past google code-ins. My github profile is https://github.com/Pokemod97 .

Is there anything I can do to improve my chances to be selected or any other feedback? Thank you for taking the time to read this message.


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

Mohammad Younas Khan Pathan
 

Hi Bret,
I have installed using vs_buildtools.exe cmd in shared link (
https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#visual-studio-2019-preferred
)

Still I am facing the same build error:
ERROR - We were not able to find on the keys requested from vcvarsall.
ERROR - We didn't find: ['WINDOWSSDKVERSION', 'WINDOWSSDKDIR',
'UNIVERSALCRTSDKDIR', 'EXTENSIONSDKDIR', 'WINDOWSLIBPATH',
'WINDOWSSDKVERBINPATH', 'VCTOOLSINSTALLDIR', 'PATH', 'WINDOWSSDKBINPATH']

Then I tried to manually set these env vars as follows, but still I am
getting the same build errors.

set WINDOWSSDKVERSION=10.0.17763.0
set WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10\
set EXTENSIONSDKDIR=C:\Program Files (x86)\Microsoft SDKs\Windows
Kits\10\ExtensionSDKs\
set WINDOWSLIBPATH=References\CommonConfiguration\Neutral\
set WINDOWSSDKVERBINPATH=C:\Program Files (x86)\Windows
Kits\10\bin\10.0.17763.0\x64\
set VCTOOLSINSTALLDIR=C:\BuildTools\VC\Tools\MSVC\14.28.29910\
set WINDOWSSDKBINPATH=C:\Program Files (x86)\Windows
Kits\10\bin\10.0.17763.0\x64\
set UCRTVERSION=10.0.17763.0
set PATH=%Path%

The build errors are due to paths in environment vars are not set
appropriately.
Is there any other way to set these variables? or can you share your
reference variables, so that I can set and check?

Thank you,
Younas.

On Mon, 8 Mar 2021 at 21:48, Bret Barkelew <Bret.Barkelew@microsoft.com>
wrote:

Updated (below)…



- Bret



*From: *Bret Barkelew via groups.io
<bret.barkelew=microsoft.com@groups.io>
*Sent: *Monday, March 8, 2021 8:09 AM
*To: *Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>
*Cc: *discuss@edk2.groups.io; Sean Brogan <spbrogan@outlook.com>; Feng,
Bob C <bob.c.feng@intel.com>; alexgdi@outlook.com
*Subject: *Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2
build error



Younas,

Can you try making sure that you have all the following subcomponents of
VS Buildtools installed:
Microsoft.VisualStudio.Component.VC.CoreBuildTools
Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows10SDK.17763

While this isn’t official EDK2 documentation, this is our (MSCoreUEFI)
recommended way to install buildtools:
Tools and Prerequisite - Project Mu (microsoft.github.io)<
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0
- Bret

From: Mohammad Younas Khan Pathan<mailto:pmdyounaskhan786@gmail.com
<pmdyounaskhan786@gmail.com>>
Sent: Sunday, March 7, 2021 11:30 PM
To: Bret Barkelew<mailto:Bret.Barkelew@microsoft.com
<Bret.Barkelew@microsoft.com>>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Sean Brogan<
mailto:spbrogan@outlook.com <spbrogan@outlook.com>>; Feng, Bob C<
mailto:bob.c.feng@intel.com <bob.c.feng@intel.com>>; alexgdi@outlook.com<
mailto:alexgdi@outlook.com <alexgdi@outlook.com>>
Subject: Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build
error

Bret,
I selected default install from VS buildtools from below link:

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0>
Please find the log:
C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build>vcvarsall.bat AMD64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build>

Thank you,
Younas.

On Fri, 5 Mar 2021 at 22:52, Bret Barkelew <Bret.Barkelew@microsoft.com
<mailto:Bret.Barkelew@microsoft.com>> wrote:
Can you send the output of:
“C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat AMD64”

When you installed VS2019, did you select any additional packages or just
a default install?

- Bret

From: Mohammad Younas Khan Pathan via groups.io<
mailto:pmdyounaskhan786=gmail.com@groups.io
<pmdyounaskhan786=gmail.com@groups.io>>
Sent: Thursday, March 4, 2021 10:16 PM
To: Sean Brogan<mailto:spbrogan@outlook.com <spbrogan@outlook.com>>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Feng, Bob C<
mailto:bob.c.feng@intel.com <bob.c.feng@intel.com>>; alexgdi@outlook.com<
mailto:alexgdi@outlook.com <alexgdi@outlook.com>>
Subject: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com<mailto:
spbrogan@outlook.com>> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=deUr%2BQCYJ4srUuHZJGbovx8tion%2FqUrBk75UtYGNyBw%3D&amp;reserved=0
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=deUr%2BQCYJ4srUuHZJGbovx8tion%2FqUrBk75UtYGNyBw%3D&amp;reserved=0>



https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0>


Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from
vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com<mailto:
bob.c.feng@intel.com>> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools
to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <
discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com<mailto:alexgdi@outlook.com
<alexgdi@outlook.com>>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before
running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com<mailto:
alexgdi@outlook.com>> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0>

eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...





















UDK2018 + ApolloLake E3900 can't compile UEFI

Anton.Kunakov@...
 

Good afternoon.
I'm trying to compile UEFI with UDK2018 for the ApolloLake E3900 platform, but it doesn't work.
I made some changes to the source code, the compilation process has progressed further, but now I'm at a dead end, I can't fix these errors.

Linux Latitude 4.15.0-136-generic #140~16.04.1-Ubuntu SMP Wed Feb 3 18:51:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 201609
Can anyone help me?


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

Bret Barkelew
 

Updated (below)…

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft.com@groups.io>
Sent: Monday, March 8, 2021 8:09 AM
To: Mohammad Younas Khan Pathan<mailto:pmdyounaskhan786@gmail.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Sean Brogan<mailto:spbrogan@outlook.com>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Younas,

Can you try making sure that you have all the following subcomponents of VS Buildtools installed:
Microsoft.VisualStudio.Component.VC.CoreBuildTools
Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows10SDK.17763

While this isn’t official EDK2 documentation, this is our (MSCoreUEFI) recommended way to install buildtools:
Tools and Prerequisite - Project Mu (microsoft.github.io)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0>

- Bret

From: Mohammad Younas Khan Pathan<mailto:pmdyounaskhan786@gmail.com>
Sent: Sunday, March 7, 2021 11:30 PM
To: Bret Barkelew<mailto:Bret.Barkelew@microsoft.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Sean Brogan<mailto:spbrogan@outlook.com>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Bret,
I selected default install from VS buildtools from below link:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cPCr9rYcre5fxpAM6YTcWuKQPiPuoY9eMArye5B0q20%3D&amp;reserved=0>>

Please find the log:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>vcvarsall.bat AMD64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>

Thank you,
Younas.

On Fri, 5 Mar 2021 at 22:52, Bret Barkelew <Bret.Barkelew@microsoft.com<mailto:Bret.Barkelew@microsoft.com>> wrote:
Can you send the output of:
“C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat AMD64”

When you installed VS2019, did you select any additional packages or just a default install?

- Bret

From: Mohammad Younas Khan Pathan via groups.io<mailto:pmdyounaskhan786=gmail.com@groups.io>
Sent: Thursday, March 4, 2021 10:16 PM
To: Sean Brogan<mailto:spbrogan@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com<mailto:spbrogan@outlook.com>> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=deUr%2BQCYJ4srUuHZJGbovx8tion%2FqUrBk75UtYGNyBw%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743119026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1E2BLWjvErQpq6nRbI8BbSuqbrjjmZ9tJX3btyrxmg%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=deUr%2BQCYJ4srUuHZJGbovx8tion%2FqUrBk75UtYGNyBw%3D&amp;reserved=0>>


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6%2BOIGR0lcVz0z%2F1ykiHOwZuSEGPylHf2kex8PECZcsk%3D&amp;reserved=0>>

Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com<mailto:alexgdi@outlook.com>> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0%3chttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cd3e80d6eabc04679f11108d8e24c52a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508165743128985%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FeHjU8zhs%2B7xV0uHb4mwHGasM89rkHicgiNqojwll9s%3D&amp;reserved=0>>
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...












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

Bret Barkelew
 

Younas,

Can you try making sure that you have all the following subcomponents of VS Buildtools installed:
Microsoft.VisualStudio.Component.VC.CoreBuildTools
Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows10SDK.17763

While this isn’t official EDK2 documentation, this is our recommended way to install buildtools:
Tools and Prerequisite - Project Mu (microsoft.github.io)<https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#visual-studio-2019-preferred>

- Bret

From: Mohammad Younas Khan Pathan<mailto:pmdyounaskhan786@gmail.com>
Sent: Sunday, March 7, 2021 11:30 PM
To: Bret Barkelew<mailto:Bret.Barkelew@microsoft.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Sean Brogan<mailto:spbrogan@outlook.com>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Bret,
I selected default install from VS buildtools from below link:
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F%23build-tools-for-visual-studio-2019&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C44d65b6928df4ecdc4d308d8e203da31%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637507854387169408%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=lTKObXxxWGeVx9O1MMzNyJQCXR9h%2B46wZsF5EX%2FbUQQ%3D&reserved=0>

Please find the log:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>vcvarsall.bat AMD64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>

Thank you,
Younas.

On Fri, 5 Mar 2021 at 22:52, Bret Barkelew <Bret.Barkelew@microsoft.com<mailto:Bret.Barkelew@microsoft.com>> wrote:
Can you send the output of:
“C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat AMD64”

When you installed VS2019, did you select any additional packages or just a default install?

- Bret

From: Mohammad Younas Khan Pathan via groups.io<mailto:pmdyounaskhan786=gmail.com@groups.io>
Sent: Thursday, March 4, 2021 10:16 PM
To: Sean Brogan<mailto:spbrogan@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com<mailto:spbrogan@outlook.com>> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144729739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TGrnnLgOQZoIeO7kXPnRJITX8uflN%2F4Od0QeoeWIq3E%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C44d65b6928df4ecdc4d308d8e203da31%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637507854387179367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=KRtITsu1NdK7t2w%2FobfFZnGCXao%2B9WQULjHOJUi7l00%3D&reserved=0>


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z1WmqPt%2BN6%2FSwSvMk8FSZ5EACsLTPajszeWdBalMYxo%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C44d65b6928df4ecdc4d308d8e203da31%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637507854387179367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=hdjFWpkj2J%2BI8w3bxD0LNcK0fiAR2goRs3gZf%2BOI6cs%3D&reserved=0>

Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com<mailto:alexgdi@outlook.com>> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6oOO64Q7A9exaKEgXDWZHRueu1gUKD%2BdQ%2FUyfWOoYgI%3D&amp;reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C44d65b6928df4ecdc4d308d8e203da31%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637507854387189322%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=kmLQcRw08M3iasC0dDv6%2BmHzES9wp5YsAXya4S1%2BAjE%3D&reserved=0>
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...












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

Mohammad Younas Khan Pathan
 

Bret,
I selected default install from VS buildtools from below link:
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019

Please find the log:
C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build>vcvarsall.bat AMD64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build>

Thank you,
Younas.

On Fri, 5 Mar 2021 at 22:52, Bret Barkelew <Bret.Barkelew@microsoft.com>
wrote:

Can you send the output of:
“C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat AMD64”



When you installed VS2019, did you select any additional packages or just
a default install?



- Bret



*From: *Mohammad Younas Khan Pathan via groups.io
<pmdyounaskhan786=gmail.com@groups.io>
*Sent: *Thursday, March 4, 2021 10:16 PM
*To: *Sean Brogan <spbrogan@outlook.com>
*Cc: *discuss@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>;
alexgdi@outlook.com
*Subject: *[EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build
error



Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144729739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TGrnnLgOQZoIeO7kXPnRJITX8uflN%2F4Od0QeoeWIq3E%3D&amp;reserved=0


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z1WmqPt%2BN6%2FSwSvMk8FSZ5EACsLTPajszeWdBalMYxo%3D&amp;reserved=0

Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from
vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools
to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before
running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6oOO64Q7A9exaKEgXDWZHRueu1gUKD%2BdQ%2FUyfWOoYgI%3D&amp;reserved=0
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...
















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

Bret Barkelew
 

Can you send the output of:
“C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat AMD64”

When you installed VS2019, did you select any additional packages or just a default install?

- Bret

From: Mohammad Younas Khan Pathan via groups.io<mailto:pmdyounaskhan786=gmail.com@groups.io>
Sent: Thursday, March 4, 2021 10:16 PM
To: Sean Brogan<mailto:spbrogan@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; Feng, Bob C<mailto:bob.c.feng@intel.com>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23visual-studio-2019-preferred&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144729739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TGrnnLgOQZoIeO7kXPnRJITX8uflN%2F4Od0QeoeWIq3E%3D&amp;reserved=0


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2FCodeDevelopment%2Fprerequisites%2F%23optional-windows-driver-kit&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z1WmqPt%2BN6%2FSwSvMk8FSZ5EACsLTPajszeWdBalMYxo%3D&amp;reserved=0

Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7C39d8905bb90f44f5d4e808d8df9e43b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505218144739695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6oOO64Q7A9exaKEgXDWZHRueu1gUKD%2BdQ%2FUyfWOoYgI%3D&amp;reserved=0
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...












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

Mohammad Younas Khan Pathan
 

Hi Bret/others,
I have installed WinSDK & VS2019 in my system.
Please find the attached build log for building EmulatorPkg.
And help me out on this.

Thank you,
Younas.

On Fri, 5 Mar 2021 at 09:49, Sean Brogan <spbrogan@outlook.com> wrote:

EmulatorPkg on Windows is a Windows application and thus you need all
the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:


https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#visual-studio-2019-preferred


https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#optional-windows-driver-kit

Thanks
Sean


On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall:
['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to
EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py",
line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env
before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...












Re: Reg, Building EDKII source.

Mohammad Younas Khan Pathan
 

Liming,
I have reinstalled WinSDK and it shows the header file.
but still I am getting other errors.
May I know what environment vars need to be created post WinSDK
installation? I have set INCLUDE, LIB, LIBPATH vars

Also attached the build log for BaseTools (using edksetup.bat rebuild).

Thank you,
Younas.

On Fri, 5 Mar 2021 at 06:35, gaoliming <gaoliming@byosoft.com.cn> wrote:

Seemly, your WinSDK is not correct.

Windows.h is in my C:\Program Files (x86)\Windows
Kits\10\Include\10.0.17763.0\um directory.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月4日 18:58
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
After creating a new INCLUDE env variable, it resolved the build error.
But
faced other errors and created a LIB env variable for WinSDK libs.
I am getting another error for *windows.h* header file which is not there
in the WinSDK include folder. Can you help me with this?

######################
# Build executables
######################
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry
F:\younas\edk2_latest\BaseTools\Source\C\GenFfs

Microsoft (R) Program Maintenance Utility Version 14.28.29910.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -c /nologo /Zi /c /O2 /MT /W4 /WX /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -I . -I
F:\younas\edk2_latest\BaseTools\Source\C\Include -I
F:\younas\edk2_latest\BaseTools\Source\C\Include\Ia32 -I
F:\younas\edk2_latest\BaseTools\Source\C\Common GenFfs.c -FoGenFfs.obj
GenFfs.c
*GenFfs.c(10): fatal error C1083: Cannot open include file: 'windows.h':
No
such file or directory*
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.ex
e"' :
return code '0x2'
Stop.

Thank you,
Younas.

On Wed, 3 Mar 2021 at 19:58, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this
env
value.



Thanks

Liming

*发件人:* Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>
*发送时间:* 2021年3月3日 22:25
*收件人:* gaoliming <gaoliming@byosoft.com.cn>
*抄送:* discuss@edk2.groups.io
*主题:* Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from
MS
VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?


Thank you,

Younas.



On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn>
wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083:
Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.














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

Sean
 

EmulatorPkg on Windows is a Windows application and thus you need all the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:

https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#visual-studio-2019-preferred

https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#optional-windows-driver-kit

Thanks
Sean

On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:
stuart_update -c .pytool/CISettings.py
I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:
*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall: ['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*
Do we need to do any setup for these variables?
Thank you,
Younas.
On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...









回复: [edk2-discuss] Reg, Building EDKII source.

gaoliming
 

Seemly, your WinSDK is not correct.

Windows.h is in my C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um directory.

Thanks
Liming

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月4日 18:58
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
After creating a new INCLUDE env variable, it resolved the build error. But
faced other errors and created a LIB env variable for WinSDK libs.
I am getting another error for *windows.h* header file which is not there
in the WinSDK include folder. Can you help me with this?

######################
# Build executables
######################
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry
F:\younas\edk2_latest\BaseTools\Source\C\GenFfs

Microsoft (R) Program Maintenance Utility Version 14.28.29910.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -c /nologo /Zi /c /O2 /MT /W4 /WX /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -I . -I
F:\younas\edk2_latest\BaseTools\Source\C\Include -I
F:\younas\edk2_latest\BaseTools\Source\C\Include\Ia32 -I
F:\younas\edk2_latest\BaseTools\Source\C\Common GenFfs.c -FoGenFfs.obj
GenFfs.c
*GenFfs.c(10): fatal error C1083: Cannot open include file: 'windows.h': No
such file or directory*
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.ex
e"' :
return code '0x2'
Stop.

Thank you,
Younas.

On Wed, 3 Mar 2021 at 19:58, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this env
value.



Thanks

Liming

*发件人:* Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>
*发送时间:* 2021年3月3日 22:25
*收件人:* gaoliming <gaoliming@byosoft.com.cn>
*抄送:* discuss@edk2.groups.io
*主题:* Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from MS
VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?


Thank you,

Younas.



On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn>
wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083:
Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.






261 - 280 of 859