VfrCompiler.exe

Name

VfrCompile.exe - Compile the framework VFR and UEFI VFR file to UEFI IFR opcode table and binary.

Synopsis

VfrCompile [-o <OutputDir>] [-b] [-l] [-n] [-c] <VfrFile>
VfrCompile.exe -h

Description

VfrCompile parses the preprocessed UEFI and Framework VFR file to generate UEFI IFR opcode table, Binary Data and IFR listing file. This tool was based on the ANTLR*(Another Tool for Language Recognition) parser to implement VFR syntax parser. The generated UEFI IFR opcode table is stored in autogen VfrFileNameBin.c. The global data variable, named VfrFileNameBin, contains the IFR opcode table. The generated file will be placed into the output directory specified by -o option. If output directory is not specified, the generate file will be placed in current directory. The driver source code always uses this global data to register HII form packages and shows this page. The generated UEFI IFR opcode binary file is VfrFileName.hpk, which can also be registered into HII Form package. The generated IFR listing file is VfrFileName.lst, which lists the IFR opcode for each VFR statement for debug purpose.

This is not a standalone. It is used together with the compiler preprocessor, and EDKII trim too. The VFR file is first preprocessed by the c Compiler and the output file is then trimmed to remove the unused definitions before being compiled by the VfrCompile tool to generate the UEFI IFR opcode. So the C style preprocessor directives are supported in VFR file, such as #define, #ifdef.

Options

-h, --help prints this help
--version prints version info
-l create an output IFR listing file
-o DIR, --output-directory DIR
deposit all output files to directory OutputDir
default is current directory
-b, --create-ifr-package
create an IFR HII pack file
-n, --no-pre-processing
do not preprocessing input file
-c, --compatible-framework
compatible framework vfr file
-s, --string-db
input uni string package file
-g, --guid
override class guid input
format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-w --warning-as-error
treat warning as an error

Status codes returned

Return Code

Description

0

The action was completed as requested.

-------------

----------------------------------------

Nonzero

The action failed.

Example

  1. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c).

    VfrCompile -n Vfr_Uefi.iii
  2. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c) and UEFI IFR Binary File (Vfr_Uefi.hpk)

    VfrCompile -n -b Vfr_Uefi.iii
  3. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c) and UEFI IFR Binary File (Vfr_Uefi.hpk) and IFR listing file (Vfr_Uefi.lst)

    VfrCompile -n -b -l Vfr_Uefi.iii
  4. Parse the preprocessed Framework VFR file (Vfr_Framework.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Framework.c).

    VfrCompile -n -c Vfr_Framework.iii
  5. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c), also base on the string token number to get efi varstore name from the string binary file (Vfr_Uefi.hpk).

    VfrCompile -n -s Vfr_Uefi.hpk Vfr_Uefi.iii
  6. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c), also override class guid with the input one.

    VfrCompile -n -g C153B68D-EBFC-488E-B110-662867745B87 Vfr_Uefi.iii

Bugs

No known issues.

Report bugs to [email protected]

Files

None

See also

None

License

Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at:

http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.