Name
EfiRom.exe - build an Option ROM image
Synopsis
EfiRom.exe [options] Filename [Filename]…
Description
EfiRom is used to build an Option ROM image from UEFI PE32 file(s) and/or legacy option ROM images that conform to PCI 2.3 or PCI 3.0 specifications for Option ROM layout. The EfiRom utility performs some rudimentary checking on the input Portable Executable (PE) PE32 files to verify they are indeed PE32 images. These checks include:
Verification that the DOS stub magic value is 0x5A4D
Verification that the PE signature is “PE\0\0”
If either of these checks fails then the utility will abort without creating the output ROM image file.
This utility performs some rudimentary checking of the input binary files to verify they are indeed valid option ROM images. These checks include:
Verification that the signature of the option ROM header is 0xAA55
Verification that the offset to the PCI data structure is within the range of the file size.
Verification that the signature of the PCI data structure is “PCIR”.
Options
Filename1 [FilenameN]
Input PE/PE32+/COFF or legacy option ROM image file(s).
-o, --output RomFilename
The ROM filename being created. If not specified, use the first input filename as name and *.rom as the output filename extension.
-e, --efi
Input PE/PE32+/COFF file(s)
-b, --binary
Input legacy option ROM image files.
-ec, --compress
Compress input PE/PE32+/COFF file.
-n, --no-last-bit
Do not set the LAST bit on the last file.
-l ClassCode, --class-code=ClassCode
Use ClassCode in the PCI data structure header in the input file.
-r Rev, --Revision=Rev
Use Rev in the PCI data structure header in the input file.
-p, --pci23
Default layout meets PCI 3.0 specifications, specifying this flag will for a PCI 2.3 layout.
-d, --dump
Dump the header of input option ROM image
-i, --device-id
Device ID  
-f, --vendor-id
Vendor ID
--version
Print version and copyright of this program then exit.
-v, --verbose
Turn on verbose output with informational messages printed. This is a count value, so specifying –vv can be used to increase the verbosity level.
-q, --quiet
Disable all messages except FATAL ERRORS.
-d, --debug [#]
Enable debug messages, at level #.
-h, --help
Print the copyright, version and usage of this program then exit.
Examples
Generate the Option ROM with two efi binary files and one legacy binary file. The output filename is not specified in command line, so the output filename will be “File1.rom”. The output filename is the same as the first input filename with the extension “.rom”
EfiRom –e File1.efi File2.efi –b Legacy.bin
Generate the Option ROM with two efi binary files and one legacy binary file with the output filename specified on the command line.
EfiRom –o file.rom –e File1.efi File2.efi –b Legacy.bin
Generate the Option ROM with two efi binary files and one legacy binary file. The output filename is not specified in command line, so the output filename will be “File1.rom”. The output filename is the same as the first input filename with the extension “.rom”. Vendor ID and Device ID are both specified in command line and the efi binary files will be compressed using the Tiano Compression algorithm.
EfiRom –i 0xABCD –f 0x1234 –ec File1.efi File2.efi –b Legacy.bin
Generate the Option ROM with two efi binary files and one legacy binary file with the output filename is specified in command line. Vendor ID and Device ID are both specified in command line and the efi binary files will be compressed using the Tiano Compression algorithm.
EfiRom –o file.rom –i 0xABCD –f 0x1234 –ec File1.efi File2.efi –b Legacy.bin
Bugs
No known bugs.
Report bugs to edk2-buildtools-devel@lists.sourceforge.net
Files
None
See also
None
License
Copyright (c) 1999-2009 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.