<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/Python, branch edk2_master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=edk2_master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=edk2_master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-01-06T04:44:08+00:00</updated>
<entry>
<title>BaseTools/build: Add defines for Windows build environments</title>
<updated>2026-01-06T04:44:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-26T18:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a0002ddc5342c7bb34fb3a0bb87c1235c8d8821d'/>
<id>urn:sha1:a0002ddc5342c7bb34fb3a0bb87c1235c8d8821d</id>
<content type='text'>
The stuart tools automatically add -D WIN_HOST_BUILD to
edk2 build command line if a Windows build environment
is detected. This behavior is added to build.py so that
builds of the EmulatorPkg using build.py are not required
to add the option -D WIN_HOST_BUILD when building in a
Windows environment. This aligns Linux and Windows builds
of the EmulatorPkg removing the need to specify extra
defines.

In order to build the EmulatorPkg for Windows Mingw
environments, EmulatorPkg DSC/FDF files require a way
to detect if Windows Mingw environment is present.
The Windows Mingw environment can be detected if
CLANG_BIN is set and mingw32-make.exe is detected
in the CLANG_BIN directory.

If a Windows Mingw environment is detected, add
-D WIN_MINGW32_BUILD to the edk2 build command line.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: GNUMakefiles must use CMD.EXE in Windows</title>
<updated>2025-12-24T02:03:38+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-16T20:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=79fdd2b82af96963cd38d157494df1668f16a281'/>
<id>urn:sha1:79fdd2b82af96963cd38d157494df1668f16a281</id>
<content type='text'>
Use $(OS) in all GNUMakefiles to detect if the GNUMakefile
is being used in a Windows OS. If a Windows OS is detected,
then override SHELL to use cmd.exe. This prevents make
utility from using sh.exe if sh.exe happens to be in PATH.

If sh.exe is used, then backslash (\) characters in file
paths are removed and builds break for files not found.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Cap AutoGen thread count to avoid file descriptor exhaustion</title>
<updated>2025-12-03T14:11:32+00:00</updated>
<author>
<name>Ayden Meng</name>
<email>mengxiangdong@loongson.cn</email>
</author>
<published>2025-11-27T12:57:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a058a2856dec7d3e837ca5034fe892c83bc8077e'/>
<id>urn:sha1:a058a2856dec7d3e837ca5034fe892c83bc8077e</id>
<content type='text'>
When the number of build threads multiplied by per-thread file
descriptor usage exceeds the system's open file descriptor limit,
some threads may fail to acquire necessary resources (e.g., pipes
or semaphores), leading to deadlocks or hangs during parallel builds.

To prevent this situation, calculate the safety upper limit of
concurrency by dividing the system's maximum file descriptor limit by
3 (An empirical value derived from balancing performance overhead
against the theoretical number of file descriptors consumed per thread).
The actual thread count is then clamped to this safe value.

Other usages of ThreadNum()—such as during actual compilation or log
queue creation—do not significantly contribute to file descriptor
consumption. Therefore, adjusting ThreadNum() globally would be
unwarranted, as it could unnecessarily restrict parallelism in stages
that are not FD-bound.

This ensures stable parallel builds even under constrained resource
limits.

Signed-off-by: Ayden Meng &lt;mengxiangdong@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Handle file descriptor exhaustion during parallel build</title>
<updated>2025-12-03T14:11:32+00:00</updated>
<author>
<name>Ayden Meng</name>
<email>mengxiangdong@loongson.cn</email>
</author>
<published>2025-11-27T11:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7aaf742d2dc3f188b0307544cc767e6879df9c9e'/>
<id>urn:sha1:7aaf742d2dc3f188b0307544cc767e6879df9c9e</id>
<content type='text'>
Previously, when file descriptors were exhausted in high-concurrency
builds (e.g., 512 threads with 1024 FD limit), the build would hang or
fail silently without clear indication of the root cause.

This change catches relevant OSError instances and terminates the build,
ensuring failures due to resource limits are explicit.

Signed-off-by: Ayden Meng &lt;mengxiangdong@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: AutoGen: Optimize tuple creation using tuple() for PcdDbBuffer</title>
<updated>2025-12-02T02:21:22+00:00</updated>
<author>
<name>Jeremy Compostella</name>
<email>jeremy.compostella@intel.com</email>
</author>
<published>2025-11-26T18:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3af7eccf472d2308201fccc805db7e06acabd47c'/>
<id>urn:sha1:3af7eccf472d2308201fccc805db7e06acabd47c</id>
<content type='text'>
Replace manual loop-based tuple construction with the built-in tuple()
function when converting PcdDbBuffer to a tuple. This change
significantly improves performance—approximately three times
faster—resulting in substantial build time savings in large
environments.

Previously, the code iterated over each byte in PcdDbBuffer, unpacking
and appending it to a tuple. The new approach leverages
tuple(PcdDbBuffer) to achieve the same result more efficiently. The
generated tuple remains identical to the original implementation.

TEST=The generated tuple is the same than with to original code

Signed-off-by: Jeremy Compostella &lt;jeremy.compostella@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Enhance FMMT rebase feature with FFS type check</title>
<updated>2025-11-23T23:30:49+00:00</updated>
<author>
<name>Yuwei Chen</name>
<email>yuwei.chen@intel.com</email>
</author>
<published>2025-10-09T08:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d8a171b895e3c79002fa7d991de8bf24cfa32851'/>
<id>urn:sha1:d8a171b895e3c79002fa7d991de8bf24cfa32851</id>
<content type='text'>
1.Add FFS file type check: Only allow rebase operation for
EFI_FV_FILETYPE_SECURITY_CORE, EFI_FV_FILETYPE_PEI_CORE,
EFI_FV_FILETYPE_DXE_CORE, EFI_FV_FILETYPE_PEIM, EFI_FV_FILETYPE_DRIVER,
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE
types, improving safety and compliance.
2.Automatically detect and complete the PE/COFF or TE image
relocation table (reloc section) to ensure integrity and compatibility
of the rebase operation.
3.After rebase, automatically update FFS checksum and FV header
information to ensure correct data structure.
4.Support recursive processing for nested FVs, ensuring all related FFS
files' PE/TE images are properly rebased and reloc tables are completed.
5.Use table-driven architecture for relocation types, making it easier to
extend to more platforms.
6.Improve error handling and logging for better robustness and
maintainability.

Please attention, only IA32 and X64 PE/COFF image are supported now.
For other Arch, will support it after testing.

Signed-off-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Enable FMMT Rebase function</title>
<updated>2025-11-23T23:30:49+00:00</updated>
<author>
<name>Yuwei Chen</name>
<email>yuwei.chen@intel.com</email>
</author>
<published>2025-08-26T06:57:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=797792681137b0971ec81e495807b470671ba518'/>
<id>urn:sha1:797792681137b0971ec81e495807b470671ba518</id>
<content type='text'>
This patch adds and improves the rebase functionality
for firmware images (PE/COFF/TE) in the FMMT tool.
Key features include:

1.Automatically rebases PE/COFF/TE images within FFS files
when the firmware volume (FV) layout is adjusted or FFS files
are moved, ensuring correct loading and execution at new addresses.
2.Implements recursive rebase logic for nested sections,
guaranteeing all relevant images are properly relocated.
3.Adds support for rebasing subsequent FFS files within the same FV,
enhancing compatibility and stability during firmware layout changes.
4.Core code changes are mainly in FvHandler.py, BiosTreeNode.py,
and BinaryFactoryProduct.py, covering rebase flag detection, address calculation,
and actual relocation operations.
5.This feature improves the flexibility of firmware space management
and enhances the automation and reliability of the FMMT tool.

Co-Auther: Ashraf Ali S &lt;ashraf.ali.s@intel.com&gt;
Signed-off-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: FMMT: Fix incorrect size calculation in ModifyTest()</title>
<updated>2025-11-22T11:53:36+00:00</updated>
<author>
<name>Evgenii Shatokhin</name>
<email>euspectre@gmail.com</email>
</author>
<published>2025-10-20T07:54:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e93ee87643a30df3bffede2f4cdadfc7be88f0bd'/>
<id>urn:sha1:e93ee87643a30df3bffede2f4cdadfc7be88f0bd</id>
<content type='text'>
There is another issue in FvHander.py similar to the one fixed by
a60334ad59eb ("BaseTools: Fix FMMT FvHandler Padding operation issue").

For a guided section (ParTree.Data.Type == 0x02), the length of
ParTree.Data.OriData is used to obtain the original size of the data even
after ParTree.Data.OriData has changed, which is incorrect.

This caused the following issue I observed. I built OVMF image for Aarch64
and then tried to add a couple FFS modules to it with 'FMMT -a [...]'. The
resulting image turned out to be invalid: the total size of the image was
less than the size of the firmware volume within it.

UEFITool failed to load such firmware image and complained:
"parseRawArea: one of objects inside overlaps the end of data".

This patch fixes the issue.

Signed-off-by: Evgenii Shatokhin &lt;euspectre@gmail.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: fix various typos</title>
<updated>2025-11-21T21:49:59+00:00</updated>
<author>
<name>Philipp Schuster</name>
<email>philipp.schuster@cyberus-technology.de</email>
</author>
<published>2025-11-04T07:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e0184abff13fccd9df69bb44fa9edbd4062cc99e'/>
<id>urn:sha1:e0184abff13fccd9df69bb44fa9edbd4062cc99e</id>
<content type='text'>
This commit is the first in a series of multiple commits to fix various
typos in the code, originating mostly from copy&amp;paste over the years.

Most of them only affect documentation and not code.

Signed-off-by: Philipp Schuster &lt;philipp.schuster@cyberus-technology.de&gt;
</content>
</entry>
<entry>
<title>BaseTools: Remove DXE_SAL_DRIVER</title>
<updated>2025-10-30T10:00:32+00:00</updated>
<author>
<name>Sathya Ravichandran</name>
<email>sathyar@ami.com</email>
</author>
<published>2025-09-23T11:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=98d1f8a6fd94c32834087a8ecfc1cce7827496e7'/>
<id>urn:sha1:98d1f8a6fd94c32834087a8ecfc1cce7827496e7</id>
<content type='text'>
The DXE_SAL_DRIVER module type was introduced to support
Itanium (IPF) platforms. Since support for Itanium processors has been
dropped, the instances of DXE_SAL_DRIVER have been removed.

Ref: [3cb0a311cb7e747d7be5c5076d0fff76ad256d2b]

Cc: Sachin Ganesh &lt;sachinganesh@ami.com&gt;
Signed-off-by: Sathya Ravichandran &lt;sathyar@ami.com&gt;
</content>
</entry>
</feed>
