]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / UserManuals / GenFv_Utility_Man_Page.rtf
CommitLineData
40d841f6
LG
1{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}\r
2{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
3{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
4{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par\r
5\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv.exe \endash build one PI firmware volume image or one UEFI capsule image.\par\r
6\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par\r
7\pard\nowidctlpar\sb200\cf2\fs18 GenFv.exe [options]\b0\f1\par\r
8\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par\r
9\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv is used to \cf0 generate a PI firmware volume image or a UEFI capsule image from the PI firmware files or the binary files, which conforms to the firmware volume image format defined in PI specification or uefi capsule image format defined in UEFI specification.\cf2\f1\par\r
10\f0 This utility is responsible for aggregating Firmware File System (FFS2) files into a single FV image with FFS2 file system guid. The input files must be compliant with the PI 1.0 specification. The utility will create a FV header, append all of the FFS input files, and optionally add the FFS pad file for those FFS files that require the specific file alignment. When adding PEI files or dxe drivers, it will relocate them to the fixed flash address or the prefered loaded memory address if necessary. Also, one symbol map file that contains the symbol information (Function and Variable) for each driver in the FV will be produced. This utility is also responsible for aggregating the binary files into a single UEFI capsule image with the UEFI capsule header. \par\r
11GenFv takes as input the path/filename of the Fv.inf or Cap.inf file, the output file name, the starting physical address of the FV, the boot driver base address and the runtime driver base address of the address.inf file to create the final Fv or Capsule image. This utility is usually called by GenFds tool, which parses platform.fdf file to create the interanl Fv.inf or Cap.inf. Generally, user doesn't need to care about these internal file format.\par\r
12\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0 \cf1\b\fs28 Options\par\r
13\pard\nowidctlpar\sb200\cf2\fs18 -o FileName, --outputfile FileName\par\r
14\pard\nowidctlpar\li360\sb200\b0 The PI firmware volume image or Uefi Capsule image is created. This option is required.\par\r
15\pard\nowidctlpar\sb200\b -i FileName, --inputfile FileName\b0\f1\par\r
16\pard\nowidctlpar\li360\sb200\f0 File is the input FV.inf or Cap.inf to specify how to construct FvImage or CapImage. Fv.inf and Cap.inf will be introduced in the following examples. File may be one capsule image when its header is dumped. This option is required.\par\r
17\pard\nowidctlpar\sb200\b -b BlockSize, --blocksize BlockSize\b0\f1\par\r
18\tab\f0 BlockSize is one HEX or DEC format value required by FV image.\par\r
19\b -n NumberBlock, --numberblock NumberBlock\par\r
20\b0 NumberBlock is one HEX or DEC format value. NumberBlock is one optional parameter.\par\r
21\b -f FfsFile, --ffsfile FfsFile\b0\f1\par\r
22\tab\f0 FfsFile is placed into FV image. Multiple files can be input one by one.\par\r
23\b -s FileTakeSize, --filetakesize FileTakenSize\b0\f1\par\r
24\tab\f0 Specify the size of the required space that the input file is placed in FV image. It should be specified together with the input file.\par\r
25\b -r Address, --baseaddr Address\b0\f1\par\r
26\tab\f0 Address is the rebase start address for drivers that run in Flash. It supports DEC or HEX digital format.\par\r
27\b -a AddressFile, --addrfile AddressFile\par\r
28\tab\b0 AddressFile is one file used to log boot driver base address and runtime driver base address. And this tool will update these two addresses after it \tab relocates all boot drivers and runtime drivers in this fv image to the preferred loaded memory address.\par\r
29\b -m logfile, --map logfile\b0\f1\par\r
30\tab\f0 Logfile is the output Fv map file. If this option is not given, the FvName.map will be the default fv map file name.\b\f1\par\r
31\f0 -g Guid, --guid Guid\b0\f1\par\r
32\f0 Guid is one specific capsule guid value or fv file system guid value.\par\r
33Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\par\r
34\b --FvNameGuid Guid\f1\par\r
35\b0\f0 Guid is used to specify Fv Name. \f1\par\r
36\f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\f1\par\r
37\b\f0 --capflag CapFlag\b0\f1\par\r
38\tab\f0 Specify capsule reset flag (PersistAcrossReset, PopulateSystemTable or InitiateReset or none).\par\r
39\b --capheadsize HeadSize\b0\f1\par\r
40\tab\f0 Specify head size for capsule image in the format of HEX or DEC.\par\r
41\b -c, --capsule\b0\f1\par\r
42\tab\f0 Create Uefi capsule image.\par\r
43\b -p, --dump\b0\f1\par\r
44\tab\f0 Dump a capsule image header.\par\r
45\b -v, --verbose\par\r
46\b0\f1\tab\f0 Turn on verbose output with informational messages.\par\r
47\b -q, --quiet \f1\par\r
48\f0 \b0 Disable all messages except key message and fatal error.\b\f1\par\r
49\f0 -d, --debug level\par\r
50\b0\f1\tab\f0 Enable debug message with specified level.\par\r
51\b --version\par\r
52\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par\r
53\pard\nowidctlpar\sb200\b -h, --help\par\r
54\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par\r
55\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par\r
56\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate BFV that contains PEI drivers in Flash with the input FV.inf, base address, and the output file name.\par\r
57\b GenFv -i FvRecovery.inf -o FvRecovery.fv -r 0xFFFD0000\par\r
58\b0 FvRecovery.inf\par\r
59[options]\par\r
60EFI_BLOCK_SIZE = 0x10000 #required option\par\r
61EFI_NUM_BLOCKS = 0x3\par\r
62EFI_BASE_ADDRESS = 0xFFFD0000 #optional, if command line -r is not specified, this option will be used.\par\r
63[attributes]\par\r
64EFI_ERASE_POLARITY = 1\par\r
65EFI_WRITE_ENABLED_CAP = TRUE\par\r
66EFI_READ_ENABLED_CAP = TRUE\par\r
67EFI_READ_LOCK_STATUS = TRUE\par\r
68EFI_WRITE_STATUS = TRUE\par\r
69EFI_READ_DISABLED_CAP = TRUE\par\r
70EFI_WRITE_LOCK_STATUS = TRUE\par\r
71EFI_LOCK_CAP = TRUE\par\r
72EFI_LOCK_STATUS = TRUE\par\r
73EFI_ERASE_POLARITY = 1\par\r
74EFI_MEMORY_MAPPED = TRUE\par\r
75EFI_READ_LOCK_CAP = TRUE\par\r
76EFI_WRITE_DISABLED_CAP = TRUE\par\r
77EFI_READ_STATUS = TRUE\par\r
78EFI_WRITE_LOCK_CAP = TRUE\par\r
79EFI_STICKY_WRITE = TRUE\par\r
80EFI_FVB2_ALIGNMENT_16 = TRUE\par\r
81[files]\par\r
82EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\52C05B14-0B98-496c-BC3B-04B50211D680PeiMain\\52C05B14-0B98-496c-BC3B-04B50211D680.ffs\par\r
83EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50PcdPeim\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs\par\r
84......\b\f1\par\r
85\b0\f0 2. Generate FvMain that contains Dxe drivers loaded in the preferred loaded memory address with the input FV.inf, address file, the output file name, its firmware file system guid (FFS2) and its guid name.\f1\par\r
86\b\f0 GenFv -i FvMain.inf -o FvMain.fv -a Addr.inf \endash g 8c8ce578-8a3d-4f1c-9935-896185c32dd3 \endash FvNameGuid 6D99E806-3D38-42c2-A095-5F4300BFD7DC\f1\par\r
87\b0\f0 Addr.inf\b\f1\par\r
88\b0\f0 [options]\par\r
89EFI_BOOT_DRIVER_BASE_ADDRESS = 0x1f300000\par\r
90EFI_RUNTIME_DRIVER_BASE_ADDRESS = 0x1f600000\b\f1\par\r
91\b0\f0 3. Generate the capsule image with the input cap.inf, and the output file name.\par\r
92\b GenFv -i BiosUpdate.inf -o BiosUpdate.cap\par\r
93\b0 BiosUpdate.inf\b\f1\par\r
94\b0\f0 [options]\par\r
95EFI_CAPSULE_GUID = 25A5CD7D-A5EB-4d74-9C28-D6EF04E03B16 (Required)\par\r
96EFI_CAPSULE_HEADER_SIZE = 0x20 (Optional)\par\r
97EFI_CAPSULE_FLAGS = PopulateSystemTable (Optional)\par\r
98[attributes]\par\r
99[files]\par\r
100EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\EDBEDF47-6EA3-4512-83C1-70F4769D4BDE-Capsule_A.fvi\par\r
1014. Dump capsule image header information for the input capsule image.\par\r
102\b GenFv -p -i BiosUpdate.cap -o Cap.info\b0\f1\par\r
103\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Bugs\par\r
104\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
105Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
106\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
107\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
108\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
109\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
110\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
111\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
112This program and the accompanying materials are licensed and made available \par\r
113under the terms and conditions of the BSD License which accompanies this \par\r
114distribution. The full text of the license may be found at\par\r
115http://opensource.org/licenses/bsd-license.php\par\r
116\par\r
117THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
118\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
119}\r
120\0