GenFfs.exe

Name

GenFfs.exe - build one PI firmware file.

Synopsis

GenFfs.exe [-v] [-x] [-s] [-a <FileAlign>] -t <Type> -g <FileGuid>
-i <InputFile[ -n SectionAlign]> -o <OutputFile>
GenFfs.exe -h
GenFfs.exe --version

Description

GenFfs generates FFS files for inclusion in a firmware volume. FFS file is the file system file for the firmware storage defined in the Volume 3 of the PI 1.0 specification. This utility aggregates all of the file components into a single, correctly formed FFS file.

Options

If no options are specified, tool prints usage.

-o FileName, --outputfile FileName
File is FFS file to be created.
-t Type, --filetype Type
Type is one FV file type defined in PI spec, which is
EFI_FV_FILETYPE_RAW, EFI_FV_FILETYPE_FREEFORM,
EFI_FV_FILETYPE_SECURITY_CORE, EFI_FV_FILETYPE_PEIM,
EFI_FV_FILETYPE_PEI_CORE, EFI_FV_FILETYPE_DXE_CORE,
EFI_FV_FILETYPE_DRIVER, EFI_FV_FILETYPE_APPLICATION,
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,
EFI_FV_FILETYPE_SMM, EFI_FV_FILETYPE_SMM_CORE,
EFI_FV_FILETYPE_COMBINED_SMM_DXE,
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE.
-g FileGuid, --fileguid FileGuid
FileGuid is one module guid.
Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-x, --fixed Indicates that the file may not be moved
from its present location.
-s, --checksum Indicates to calculate file checksum.
-a FileAlign, --align FileAlign
FileAlign points to file alignment, which only support
the following align: 1,2,4,8,16,128,512,1K,4K,32K,64K
-i SectionFile, --sectionfile SectionFile
Section file will be contained in this FFS file.
-n SectionAlign, --sectionalign SectionAlign
SectionAlign points to section alignment, which support
the alignment scope 1~64K. It is specified together
with sectionfile to point its alignment in FFS file.
-v, --verbose Turn on verbose output with informational messages.
-q, --quiet Disable all messages except key message and fatal error
-d, --debug level Enable debug messages, at input debug level.
--version Show program's version number and exit.
-h, --help Show this help message and exit.

Status codes returned

Return Value

Description

STATUS_SUCCESS 0

The action was completed as requested.

STATUS_ERROR 2

The action failed.

Example

  1. Generate PeiCore FFS file with the input sections, fileguid, and the output file name.

    GenFfs -t EFI_FV_FILETYPE_PEI_CORE -g 52C05B14-0B98-496c-BC3B-04B50211D680 -i PeiMain.pe32 -i PeiMain.ui -i PeiMain.ver -o 52C05B14-0B98-496c-BC3B-04B50211D680-PeiMain.ffs
  2. Generate PeiCore FFS file with the fixed, checksum attributes, the input sections with 16 byte alignment, the fileguid, and the output file name.

    GenFfs -t EFI_FV_FILETYPE_PEI_CORE -g 52C05B14-0B98-496c-BC3B-04B50211D680 -x -s -i PeiMain.pe32 -n 16 -i PeiMain.ui -i PeiMain.ver -o 52C05B14-0B98-496c-BC3B-04B50211D680-PeiMain.ffs
  3. Generate RAW type FFS file with the input raw files, checksum attribute, fileguid, and the output file name. The RAW type FFS file doesn't care whether the input files are the formed section files or not.

    GenFfs -t EFI_FV_FILETYPE_RAW -g E8B33A4F-4C07-4e3f-A746-4A1E4036C5EC -s -i vendor.raw -o E8B33A4F-4C07-4e3f-A746-4A1E4036C5EC-vendor.raw
  4. Generate FV type FFS file with the input FV section file, checksum attribute, fileguid, and the output filename.

    GenFfs -t EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE -g 47C70572-CA18-455d-ABB9-B37FBA402AB2 -s -i fvmain.fvsec -o 47C70572-CA18-455d-ABB9-B37FBA402AB2-fvmain.ffs

Bugs

No known bugs.

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.