summaryrefslogtreecommitdiff
path: root/BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf
blob: fd02266da98648d8f02bdce4dd01bd6fc6073e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}
{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
{\*\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
\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv.exe \endash  build one PI firmware volume image or one UEFI capsule image.\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par
\pard\nowidctlpar\sb200\cf2\fs18 GenFv.exe [options]\b0\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par
\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
\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
GenFv 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
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0  \cf1\b\fs28 Options\par
\pard\nowidctlpar\sb200\cf2\fs18 -o FileName, --outputfile FileName\par
\pard\nowidctlpar\li360\sb200\b0 The PI firmware volume image or Uefi Capsule image is created. This option is required.\par
\pard\nowidctlpar\sb200\b -i FileName, --inputfile FileName\b0\f1\par
\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
\pard\nowidctlpar\sb200\b -b BlockSize, --blocksize BlockSize\b0\f1\par
\tab\f0 BlockSize is one HEX or DEC format value required by FV image.\par
\b -n NumberBlock, --numberblock NumberBlock\par
\b0     NumberBlock is one HEX or DEC format value. NumberBlock is one optional parameter.\par
\b -f FfsFile, --ffsfile FfsFile\b0\f1\par
\tab\f0 FfsFile is placed into FV image. Multiple files can be input one by one.\par
\b -s FileTakeSize, --filetakesize FileTakenSize\b0\f1\par
\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
\b -r Address, --baseaddr Address\b0\f1\par
\tab\f0 Address is the rebase start address for drivers that run in Flash. It supports DEC or HEX digital format.\par
\b -a AddressFile, --addrfile AddressFile\par
\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
\b -m logfile, --map logfile\b0\f1\par
\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
\f0 -g Guid, --guid Guid\b0\f1\par
\f0     Guid is one specific capsule guid value or fv file system guid value.\par
Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\par
\b --FvNameGuid Guid\f1\par
\b0\f0     Guid is used to specify Fv Name. \f1\par
\f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\f1\par
\b\f0 --capflag CapFlag\b0\f1\par
\tab\f0 Specify capsule reset flag (PersistAcrossReset, PopulateSystemTable or InitiateReset or none).\par
\b --capheadsize HeadSize\b0\f1\par
\tab\f0 Specify head size for capsule image in the format of HEX or DEC.\par
\b -c, --capsule\b0\f1\par
\tab\f0 Create Uefi capsule image.\par
\b -p, --dump\b0\f1\par
\tab\f0 Dump a capsule image header.\par
\b -v, --verbose\par
\b0\f1\tab\f0 Turn on verbose output with informational messages.\par
\b -q, --quiet           \f1\par
\f0     \b0 Disable all messages except key message and fatal error.\b\f1\par
\f0 -d, --debug level\par
\b0\f1\tab\f0 Enable debug message with specified level.\par
\b --version\par
\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par
\pard\nowidctlpar\sb200\b -h, --help\par
\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par
\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
\b GenFv -i FvRecovery.inf -o FvRecovery.fv -r 0xFFFD0000\par
\b0 FvRecovery.inf\par
[options]\par
EFI_BLOCK_SIZE = 0x10000           #required option\par
EFI_NUM_BLOCKS   =  0x3\par
EFI_BASE_ADDRESS = 0xFFFD0000 #optional, if command line -r is not specified, this option will be used.\par
[attributes]\par
EFI_ERASE_POLARITY   =  1\par
EFI_WRITE_ENABLED_CAP = TRUE\par
EFI_READ_ENABLED_CAP = TRUE\par
EFI_READ_LOCK_STATUS = TRUE\par
EFI_WRITE_STATUS = TRUE\par
EFI_READ_DISABLED_CAP = TRUE\par
EFI_WRITE_LOCK_STATUS = TRUE\par
EFI_LOCK_CAP = TRUE\par
EFI_LOCK_STATUS = TRUE\par
EFI_ERASE_POLARITY = 1\par
EFI_MEMORY_MAPPED = TRUE\par
EFI_READ_LOCK_CAP = TRUE\par
EFI_WRITE_DISABLED_CAP = TRUE\par
EFI_READ_STATUS = TRUE\par
EFI_WRITE_LOCK_CAP = TRUE\par
EFI_STICKY_WRITE = TRUE\par
EFI_FVB2_ALIGNMENT_16 = TRUE\par
[files]\par
EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\52C05B14-0B98-496c-BC3B-04B50211D680PeiMain\\52C05B14-0B98-496c-BC3B-04B50211D680.ffs\par
EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50PcdPeim\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs\par
......\b\f1\par
\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
\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
\b0\f0 Addr.inf\b\f1\par
\b0\f0 [options]\par
EFI_BOOT_DRIVER_BASE_ADDRESS = 0x1f300000\par
EFI_RUNTIME_DRIVER_BASE_ADDRESS = 0x1f600000\b\f1\par
\b0\f0 3. Generate the capsule image with the input cap.inf, and the output file name.\par
\b GenFv -i BiosUpdate.inf -o BiosUpdate.cap\par
\b0 BiosUpdate.inf\b\f1\par
\b0\f0 [options]\par
EFI_CAPSULE_GUID           = 25A5CD7D-A5EB-4d74-9C28-D6EF04E03B16 (Required)\par
EFI_CAPSULE_HEADER_SIZE  = 0x20                                                                (Optional)\par
EFI_CAPSULE_FLAGS              = PopulateSystemTable                                      (Optional)\par
[attributes]\par
[files]\par
EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\EDBEDF47-6EA3-4512-83C1-70F4769D4BDE-Capsule_A.fvi\par
4. Dump capsule image header information for the input capsule image.\par
\b GenFv -p -i BiosUpdate.cap -o Cap.info\b0\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Bugs\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par
Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par
\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par
This program and the accompanying materials are licensed and made available \par
under the terms and conditions of the BSD License which accompanies this \par
distribution.  The full text of the license may be found at\par
http://opensource.org/licenses/bsd-license.php\par
\par
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par
\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par
}