Hello, Shoot, I already have that - any other ideas? Here is my prep.bat that I run from c:\edk in the command prompt before building anything:
set WORKSPACE=%CD% set PACKAGES_PATH=%WORKSPACE%\edk2-libc;%WORKSPACE%\edk2 set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools cd %WORKSPACE%\edk2 set NASM_PREFIX=C:\pcpgmr\asm\nasm\win32\216\ set PYTHON_HOME=C:\Users\me\AppData\Local\Programs\Python\Python39 edksetup.bat On Tue, Jan 13, 2026 at 2:23 AM Dan Holmes-Mitra <[email protected]> wrote: > > Modern edk2 uses an environment variable PACKAGES_PATH to specify a ';' > delimited list of directories to search for packages (in priority order). > This is how e.g. edk2, edk2-platforms, edk2-non-osi would be collated as > 'candidate locations' to pick up things referenced in the edk2 build files. > Perhaps if it is unset, the tools are unhappy. > > Try setting it to your workspace location and retrying the build, e.g. > ``` > set PACKAGES_PATH=%cd% > :: or > set PACKAGES_PATH=C:\edk\edk2 > ``` > I wouldn't have expected it to be mandatory or fail if undefined, but from > the Python traceback it looks to be the case. > Hope that helps! > Dan > > On Tue, Jan 13, 2026 at 2:11 AM David F. via groups.io > <[email protected]> wrote: >> >> Hello, >> >> I've been using the EDK2 for a long time as was still using VS2008 tool set. >> >> I decided to start fresh to move to vs2022 - I cloned fresh new >> directories (and found out I had to also get submodules). Ran the >> "edksetup.bat Rebuild VS2022". I found that toolsetup.bat has a bug - >> I'll put the patch at the bottom below. >> >> So now it came time to build one of my UEFI applications. I renamed >> the C:\edk\Build directory to get a fresh build. I start it: "call >> build -a X64 -y release_report.txt -p acme\superapp.dsc -b RELEASE" >> but when it starts the build I get: >> >> Traceback (most recent call last): >> File "C:\edk\edk2\BaseTools\Source\Python\build\build.py", line >> 2588, in <module> >> LogQMaxSize = ThreadNum() * 10 >> File "C:\edk\edk2\BaseTools\Source\Python\build\build.py", line >> 2567, in ThreadNum >> ThreadNumber = >> TargetObj.Target.TargetTxtDictionary[TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER] >> File "C:\edk\edk2\BaseTools\Source\Python\Common\TargetTxtClassObject.py", >> line 163, in Target >> self._GetTarget() >> File "C:\edk\edk2\BaseTools\Source\Python\Common\TargetTxtClassObject.py", >> line 182, in _GetTarget >> ConfDirectoryPath = mws.join(os.environ["WORKSPACE"], 'Conf') >> File "C:\edk\edk2\BaseTools\Source\Python\Common\MultipleWorkspace.py", >> line 70, in join >> for Pkg in cls.PACKAGES_PATH: >> TypeError: 'NoneType' object is not iterable >> >> Could someone point out what I need to do to fix it? >> >> Here's that patch I mentioned above: >> >> >> --- C:/toolsetup-f25d437f.001.bat Tue Jan 13 02:02:15 2026 >> +++ C:/edk/edk2/BaseTools/toolsetup.bat Mon Jan 12 22:13:07 2026 >> @@ -15,6 +15,8 @@ >> set PYTHON_VER_MAJOR=3 >> set PYTHON_VER_MINOR=6 >> >> +setlocal EnableDelayedExpansion >> + >> @REM ############################################################## >> @REM # You should not have to modify anything below this line >> @REM # >> @@ -251,7 +253,7 @@ >> ) >> if not defined FORCE_REBUILD ( >> if not defined REBUILD ( >> - if not exist "%EDK_TOOLS_BIN%" ( >> + if not exist "!EDK_TOOLS_BIN!" ( >> echo. >> echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!! >> echo Please check the directory %EDK_TOOLS_BIN% >> >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121750): https://edk2.groups.io/g/devel/message/121750 Mute This Topic: https://groups.io/mt/117240892/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
