gpt4 book ai didi

c - EDK2(UEFI 开发环境)在执行测试构建后失败

转载 作者:行者123 更新时间:2023-12-03 08:39:32 27 4
gpt4 key购买 nike

我正在使用 EDK2 和 Visual Studio 2019。我按照说明在 Windows 系统上设置 EDKII 构建环境。在 Windows 命令行上发送以下命令“edksetup.bat Rebuild”后,我收到以下消息。

subprocess not exit successfully
Error while execute command 'nmake all' in direcotry C:\edk2\BaseTools\Source\C\BrotliCompress

...

LINK : fatal error LNK1181: Eingabedatei "brotli\c\tools\brotli.obj" kann nicht geffnet werden.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe"": Rckgabe-Code "0x49d"
Stop.
NMAKE : fatal error U1077: "if": Rückgabe-Code "0x1"
Stop.
NMAKE : fatal error U1077: "if": Rückgabe-Code "0x1"
Stop.

是因为 Visual Studio 2019 兼容性还是“BrotliCompress”有问题?我将标签更改为 TOOL_CHAIN_TAG = VS2019x86。但这没有用。为了兼容 VS2019,我还应该更改哪些内容?与 NMAKE 文件有什么关系吗?

我测试了旧版本的 EDK2,它可以工作。但问题是我使用的是VS2019,我想使用edk2-stable201911。旧版本(edk2-stable201908)最多只能支持VS2017。在tools_de.txt中,没有VS2019的“通用路径宏”。上述错误是使用edk2-stable201911的结果

最佳答案

您需要检查(并构建)各种子模块。

运行git submodule update --init在你的 edk2 目录中,你应该得到类似这样的输出:

Submodule 'BaseTools/Source/C/BrotliCompress/brotli' (https://github.com/google/brotli) registered for path 'BaseTools/Source/C/BrotliCompress/brotli'
Submodule 'CryptoPkg/Library/OpensslLib/openssl' (https://github.com/openssl/openssl) registered for path 'CryptoPkg/Library/OpensslLib/openssl'
Submodule 'MdeModulePkg/Library/BrotliCustomDecompressLib/brotli' (https://github.com/google/brotli) registered for path 'MdeModulePkg/Library/BrotliCustomDecompressLib/brotli'
Submodule 'MdeModulePkg/Universal/RegularExpressionDxe/oniguruma' (https://github.com/kkos/oniguruma) registered for path 'MdeModulePkg/Universal/RegularExpressionDxe/oniguruma'
Submodule 'RedfishPkg/Library/JsonLib/jansson' (https://github.com/akheron/jansson) registered for path 'RedfishPkg/Library/JsonLib/jansson'
Submodule 'UnitTestFrameworkPkg/Library/CmockaLib/cmocka' (https://git.cryptomilk.org/projects/cmocka.git) registered for path 'UnitTestFrameworkPkg/Library/CmockaLib/cmocka'
Cloning into '<path-to-edk2>/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3'...
Cloning into '<path-to-edk2>/BaseTools/Source/C/BrotliCompress/brotli'...
Cloning into '<path-to-edk2>/CryptoPkg/Library/OpensslLib/openssl'...
Cloning into '<path-to-edk2>/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli'...
Cloning into '<path-to-edk2>/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma'...
Cloning into '<path-to-edk2>/RedfishPkg/Library/JsonLib/jansson'...
Cloning into '<path-to-edk2>/UnitTestFrameworkPkg/Library/CmockaLib/cmocka'...
Submodule path 'ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Submodule path 'BaseTools/Source/C/BrotliCompress/brotli': checked out '666c3280cc11dc433c303d79a83d4ffbdd12cc8d'
Submodule path 'CryptoPkg/Library/OpensslLib/openssl': checked out 'e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72'
Submodule path 'MdeModulePkg/Library/BrotliCustomDecompressLib/brotli': checked out '666c3280cc11dc433c303d79a83d4ffbdd12cc8d'
Submodule path 'MdeModulePkg/Universal/RegularExpressionDxe/oniguruma': checked out 'abfc8ff81df4067f309032467785e06975678f0d'
Submodule path 'RedfishPkg/Library/JsonLib/jansson': checked out 'e9ebfa7e77a6bee77df44e096b100e7131044059'
Submodule path 'UnitTestFrameworkPkg/Library/CmockaLib/cmocka': checked out '1cc9cde3448cdd2e000886a26acf1caac2db7cf1'

您可能还需要先编译一些东西;我不知道如何在 Windows 上执行此操作,但是 make -C <path-to-edk2>/BaseTools/Source/C是 Linux 中的票。

完成这两项操作后,您应该能够成功构建 EDK2!

关于c - EDK2(UEFI 开发环境)在执行测试构建后失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63015457/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com