12.3 Using Custom Build Tools

This section introduces how to use the custom tools in EDKII build system.

The custom tools can be classified to two types. One is used to create the EFI guided section data, which must have its matched GUID value, such as the custom compression tool introduced in the last section. Another is only used to process files, which may not require its GUID, such as ASL compiler. This section focuses on the later one.

First, the custom tool path and name needs to be added into tools_def.txt file. For ASL compiler, it can be added like:

*_*_*_ASL_PATH = DEF(ASL_PATH)\iasl.exe

Then, "$(TOOLNAME)" is specified in build_rule.txt file to call this tool. For ASL compiler, it can be used to process ASL source file. The rule to process ASL file is added in build_rule.txt like:

[Build.Acpi-Source-Language-File]
  <InputFile>
    ?.asl, ?.Asl, ?.ASL
  <OutputFile>
    $(OUTPUT_DIR)(+)${s_base}.aml
  <Command.MSFT, Command.INTEL>
    "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
    "$(ASL)" -p ${dst} ${d_path}(+)${s_base}.i