Re: building-edkii-eufi-firmware-for-arm-platforms fail on windows 10.

Sami Mujawar

Hi Linus,


It looks like Python2.7 is not working with the EDK2 build system on Windows (at least for Arm builds). Can you try using Python 3.7 instead?

I am using Python 3.7.3 and the build is working. Please let me know if switching to Python 3.7 does not work.




Sami Mujawar

From: <> on behalf of "Linus Liu via" <Linus_Liu@...>
Reply to: "" <>, "Linus_Liu@..." <Linus_Liu@...>
Date: Wednesday, 1 September 2021 at 08:50
To: "" <>
Subject: [edk2-devel] building-edkii-eufi-firmware-for-arm-platforms fail on windows 10.


Dear Sir

I’ve followed the attachment try to build UEFI on ARM platform.

But when I ran the below command.

build -a AARCH64 -t GCC5 -p Platform\ARM\VExpressPkg\ArmVExpress-FVP-AArch64.dsc -b DEBUG


It shows


Build fail.


I’ve tried.


build -a AARCH64 -t GCC5 -p Platform\ARM\VExpressPkg\ArmVExpress-FVP-AArch64.dsc -b DEBUG  clean


It shows

Build environment: Windows-10-10.0.18362

Build start time: 12:00:00, Sep.01 2021


WORKSPACE        = d:\code\arm

PACKAGES_PATH    = d:\code\arm\edk2;d:\code\arm\edk2-platforms

EDK_TOOLS_PATH   = d:\code\arm\edk2\basetools

EDK_TOOLS_BIN    = d:\code\arm\edk2\basetools\bin\win32

CONF_PATH        = d:\code\arm\edk2\conf

PYTHON_COMMAND   = C:\Python27\python.exe



Architecture(s)  = AARCH64


Processing meta-data .Build target     = DEBUG

Toolchain        = GCC5


Active Platform          = d:\code\arm\edk2-platforms\Platform\ARM\VExpressPkg\ArmVExpress-FVP-AArch64.dsc

. done!

: error C0DE: Unknown fatal error when processing [d:\code\arm\edk2\MdeModulePkg\Universal\DisplayEngineDxe\DisplayEngineDxe.inf]


(Please send email to for help, attaching following call stack trace!)


(Python 2.7.18 on win32) Traceback (most recent call last):

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\build\", line 2698, in Main


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\build\", line 2491, in Launch


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\build\", line 1824, in _BuildPlatform

    self._BuildPa(self.Target, Pa, FfsCommand=CmdListDict,PcdMaList=PcdMaList)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\build\", line 1293, in _BuildPa


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\Common\", line 18, in CallMeHere

    Value = self._function(obj, *args,**kwargs)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 173, in CreateCodeFile


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 1829, in CreateCodeFile

    for File in self.AutoGenFileList:

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\Common\", line 28, in __get__

    Value = obj.__dict__[self._function.__name__] = self._function(obj)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 983, in AutoGenFileList

    GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, AutoGenUniIdf, UniStringBinBuffer, StringIdf, AutoGenUniIdf, IdfGenBinBuffer)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 2047, in CreateCode

    CreateUnicodeStringCode(Info, AutoGenC, StringH, UniGenCFlag, UniGenBinBuffer)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 1706, in CreateUnicodeStringCode

    Header, Code = GetStringFiles(Info.UnicodeFileList, SrcList, IncList, Info.IncludePathList, ['.uni', '.inf'], Info.Name, CompatibleMode, ShellMode, UniGenCFlag, UniGenBinBuffer, FilterInfo)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 557, in GetStringFiles

    Uni = UniFileClassObject(sorted(UniFilList, key=lambda x: x.File), IsCompatibleMode, IncludePathList)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 230, in __init__


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 542, in LoadUniFiles


  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 472, in LoadUniFile

    self.GetLangDef(File, Line)

  File "D:\Code\Arm\edk2\BaseTools\Source\Python\AutoGen\", line 236, in GetLangDef

    Lang = shlex.split(Line.split(u"//")[0])

  File "C:\Python27\lib\", line 275, in split

    lex = shlex(s, posix=posix)

  File "C:\Python27\lib\", line 25, in __init__

    instream = StringIO(instream)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 20: ordinal not in range(128)



- Failed -

Build end time: 12:00:02, Sep.01 2021

Build total time: 00:00:03


Could you kindly help on it?




Join to automatically receive all group messages.