UDK2017 BaseTools Notes
This is the primary set of tools for processing EDK II content. It contains configuration templates and source files. The tools support a Makefile based EDK II build with no additional packages required--the compiler tool chain, an assembler and optional ACPI assembler are the only additional tools need to build the EDK II project.
Source code is divided into two types:
- Tools written in C (ANSI C) are primarily for tools that modify binary data structures.
- Tools based on Python (Python) are primarily for tools that parse or process text files.
- Add new command line option to support override PCD value
- Add mixed PCD support feature
- Add Windows batch files to run python tool from Source
- Support private package definition
- Add support to merge Prebuild and Postbuild into build Process
- Support generating image package from BMP/JPEG/PNG files
- Extend the RAW format to support multiple binary files
- Add two new sections(Conditional directives section, Unused PCDs section) for PCD in the build report
- Add a VPD report subsection of FLASH to the Report
- Add a alignment check based on value type for VOID* PCDs in VPD region
- Add support for INF statement in FD region
- Build Tools support multiple workspace
- Support PCD value to use expression in the DEC file
- Follow PI1.4a to fix artificial limitation of PCD SkuId range
- Enhance BaseTools supports FixedAtBuild usage in VFR file
- Cache the defined Guid tool to improve the performance
- Skip module AutoGen by comparing timestamp
- Update FMP Capsule support to follow FDF spec
- FMP capsule add the support to generate auth info
- Support FDF sections in any order
- Extend the Macro used in the FDF !include statement
- Improve shell wrappers for Python build commands
- Improve shell wrapper for C build commands
- VolInfo: generate HASH value for each PE image
- Generate hash value in build report for each output EFI image
- Support \x####\ in UNI files to specify non-ascii characters
- Update Tools and Scripts to support VS2015 env
- Add PatchCheck.py script
- Add the PKCS7 tool
- Copy Brotli algorithm 3rd party source code for tool
- Rsa2048Sha256Sign add new option to support Monotonic count
- LzmaCompress: Update LZMA to new 16.04 version
- Add '!include' support to tools_def.txt parser
- tools_def: enable Os optimization for GCC X64 builds
- introduce GCC5 toolchain to support GCC v5.x in LTO mode
- Introduce CLANG38 new toolchain for x86
- Introduce PREFIX env for VS tool path
- Add -march=i586 for IA32 GCC targets
- AARCH64: override XIP module linker alignment to 32 bytes
- Makefile: Enable O2 option to replace Od for VS tool chain
- PeCoffLoader: Fix handling of ARM MOVW/MOVT instruction relocs
- Fix the issue to support windows root directory
- Add extern protocol/PPI/GUID definition in AutoGen for Library
- Add new option to not zero PE/COFF optional header fields
- Add build error detection for Dynamic PCD name conflict
- Fix nmake failure due to command-line length limitation
- Fix a bug when apply patches to SEC use the FILE_GUID override
- Process the files by the priority in BUILDRULEORDER
- Fix the bug when no FD section in the FDF file
- Fix the bug for VOID* Patchable PCD declaration in Library
- Incremental build not work if VPD values in DSC changed by -D
- AARCH64: add support for relative data relocations
- Fix the bug for wrong alignment generate for RAW file
- Update to handle PE image with .code section only
- Fix a bug for PEI VPD Pcd collection
- Fix bad macro expansion during tools_def.txt parsing
- Fix a bug for FixedPcd value generation in AutoGen file
- Fix the bug when use FILE_GUID override the module in DSC
- GccBase.lds: don't copy RELA section to PE/COFF
- Fix the bug for OptionRom generation with different arch
- Fix the Windows GCC Build Failure with too long path
- Avoid possible NULL pointer dereference
- Fix parameter format mismatch in scanf functions
- Add checks for array access
- Add checks for user/file inputs
- Fix potential memory leak
- Fix file handles not being closed
- Fix the bug to support generate FFS by Align=Auto
- Fix the bug to parse the new map file format
- Fix the bug to parse the short varname in map file
- Fix bug for GUIDED tool path override by DSC [BuildOptions]
- Fix build failure for DynamicEx Pcd used in the Library
- Update OPENSSL_PATH to support space characters
- Correct VOID* PatchPcd Size in Library Autogen
- Fix the bug that FixedPcdGetPtr failure for CArray Pcd
- Fix the bug for CArray PCD override in command line
- Fix incremental build failure that override file be removed
- Fix incremental build bug on DynamicPcd Token Generation
- Fix the bug use same FMP_PAYLOAD in different capsule file
- Use multiple "!if" or "!endif" statements in external file will cause build break. An example that will break the build:
In one of DSC section, use the following !include statement such as: [Components] !include externalFile.txt !endif !endif and in externalFile.txt, the content is: !if True !if True TestPkg1/TestModule1/Test1.Inf
- If you do not specify build target information both in command line and Conf\target.txt file, build tool will exit build immediately.
- PCD used in FDF conditional directive statement without SET statement define this PCD in FDF file will cause build break. An example as following:
In DEC file: [PcdsFixedAtBuild] gEfiPcdname.Pcdtoken|0x0|UINT32|0x11112222 IN DSC file: [PcdsFixedAtBuild] gEfiPcdname.Pcdtoken|0x0 IN FDF file: [FD.NT32] !if gEfiPcdname.Pcdtoken == 0x00000000 XXXXXXXXXXX !endif Another Example is: [FD.Nt32] BaseAddress = 0x0|gEfiNt32PkgTokenSpaceGuid.PcdWinNtFdBaseAddress !if gEfiNt32PkgTokenSpaceGuid.PcdWinNtFdBaseAddress xxxxx !endif
- If building with tool chain DDK3790 and ARCH X64, and HII resource is generated by RC tool, build will break. But BaseTools project has added this support at revision 2656. The workaround is add WINDDK_BIN32 into %PATH%.
- The target path name cannot exceed 256 characters for nmake, long file path feature can only support pure binary build which does not generate Makefile.
- Macros referenced in DSC/FDF files now requires the enclosure of "$()" to avoid ambiguity.
- EFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION are no longer public macro definitions in autogen code.
- The feature of CLM support increases the chances of two platform builds failure under one workspace. We need to avoid the concurrent build of different platforms under one workspace.
- The execution order prediction feature of BRG requires the new internal python tool named EOT. It requires the installation of ANTRL v3.0.1 in Python home for Python runtime support. The tool parses all the source files involved in the platform build and it may even take hours to complete the parse and generate the report.
- The blank setting for CAPSULE_FLAGS in [Capsule] section of FDF file is not supported. If no CAPSULE_FLAGS is set, CAPSULE_FLAGS need not be specified in [Capsule] section.
- The Global Macro is not allowed in EDKII INF except some predefined cases; see details in INF spec 1.26 chapter 2.2.6.
- The expression after !if, !ifdef, !elseif cannot be empty.
- The section header in FDF cannot contain macros.
- The name and value definition in define section must follow DSC spec.
- The type of a PCD defined in a DSC file should match the possible types for this PCD in the DEC file.
- For MACRO usage scope, please refer to meta-data file spec for details. Following is some general information. INF - [Defines] section or any statements contain or [BuildOptions] section DEC - [Defines] section or any statements contain DSC - [Defines] section or any statements contain or [BuildOptions] or Conditional Directive statements FDF - Whole File
- VfrCompile tool adds data type check for Oneof and Numeric opcode. The valid data type for Oneof and Numeric question are UINT8, UINT16, UINT32 and UINT64.
- When the build tools are updated, the build configuration template in
$(WORKSPACE)\BaseTools\Conf*.template may also be updated, which needs to be merged with local $ (WORKSPACE)\Conf*.txt to avoid some build error. - To ensure the platform is clean rebuild without any previous build impact, the cached meta data information directory i.e.$(WORKSPACE)\Conf.cache can be removed.
- In case of build failure due to access error of $(WORKSPACE)\Conf.cache\build.db, the tip can be rebuilt again without any concurrent build process under the same workspace.
- When the different MACRO settings are used to enable the different drivers with same module GUID and driver name in two build times, the incremental build will not work well. The clean build is required for the second build.
- The EOT tool depends on ANTRL 3.0.1 runtime library and newer ANTRL release (e.g. 3.1.2) is not compatible with older release. So it is required to download ANTLR 3.0.1 from www.antlr.org and install python runtime library to the local python home.
- The notification function related features are not integrated to BRG output plain text report file. As the invocation of EOT (from BRG) generates Report.html under workspace directory. This HTML report file shows the details of the notification functions under each module if available.
- The Prebuild and Postbuild entry must be a tool that can be executed.