]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / UserManuals / GenFw_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 GenFw.exe \endash build a UEFI image or other 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 GenFw.exe [options] Filename [Filename]\'85\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 Genfw is mainly used to process PE32 image to get the expected image data or image file. PE32 is a general-purpose image format that contains, among other information, data identifying the target environment for execution of the image. This utility can modify the standard PE32 image to create UEFI image with EFI subsystem type, PI Terse Executable image with the compact TE image header, zero its dubug data or reset its time stamp. It can also extract PE32 image data to create bin file, extract PE32 image data section to create Acpi table image, or dump PI TE image header information. It can also parse the text MicroCode definition file to create the MicroCode binary image, merge (concatenate) several MicroCode binary images into a single file by pad value and alignment requirement. This tool also supports the override the input file with the output contents.\par\r
10\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Options\par\r
11\pard\nowidctlpar\sb200\cf2\fs18 Filename1 [FilenameN]\par\r
12\pard\nowidctlpar\li360\sb200\b0 Input PE/PE32+ image, or TE image, or MicroCode Txt file, or MicroCode bin file, or hii binary pakcages.\par\r
13\pard\nowidctlpar\sb200\b -o FileName, --outputfile FileName\par\r
14\pard\nowidctlpar\li360\sb200\b0 The EFI image, TeImage, AcpiImage, MicroBin, hii package lists file or other modified PE image will be created.\par\r
15\pard\nowidctlpar\sb200\b -e EFI_FILETYPE, --efiImage EFI_FILETYPE\par\r
16\pard\nowidctlpar\li360\sb200\b0 Create Efi Image. EFI_FILETYPE is one of BASE, SEC, PEI_CORE, PEIM, DXE_CORE, SMM_CORE, DXE_DRIVER, UEFI_APPLICATION, DXE_SAL_DRIVER, UEFI_DRIVER, DXE_RUNTIME_DRIVER, DXE_SMM_DRIVER, SECURITY_CORE, COMBINED_PEIM_DRIVER, PIC_PEIM, RELOCATABLE_PEIM, BS_DRIVER, RT_DRIVER, APPLICATION, SAL_RT_DRIVER to support all module types.\f1\par\r
17\pard\nowidctlpar\sb200\b\f0 -c, --acpi\par\r
18\pard\nowidctlpar\fi360\sb200\b0 Create Acpi table.\par\r
19\pard\nowidctlpar\sb200\b -t, --terse\par\r
20\pard\nowidctlpar\fi360\sb200\b0 Create Te Image.\par\r
21\pard\nowidctlpar\sb200\b -u, --dump\par\r
22\pard\nowidctlpar\fi360\sb200\b0 Dump TeImage Header.\par\r
23\pard\nowidctlpar\sb200\b -z, --zero\par\r
24\pard\nowidctlpar\fi360\sb200\b0 Zero the Debug Data Fields in the PE input image file. It also zeros the time stamp fields.\f1\par\r
25\pard\nowidctlpar\sb200\b\f0 -b, --exe2bin\par\r
26\pard\nowidctlpar\fi360\sb200\b0 Convert the input EXE to the output BIN file.\par\r
27\pard\nowidctlpar\sb200\b -l, --stripped\par\r
28\pard\nowidctlpar\fi360\sb200\b0 Strip off the relocation information data from PE or TE image.\f1\par\r
29\pard\nowidctlpar\sb200\b\f0 -s timedate, --stamp timedate\par\r
30\pard\nowidctlpar\li360\sb200\b0 timedate format is \ldblquote yyyy-mm-dd 00:00:00\rdblquote . If timedata is set to \ldblquote NOW\rdblquote , current system time is used. The support date scope is 1970-1-1 8:0:0 ~ 2038-1-19 3:14:07.\f1\par\r
31\pard\nowidctlpar\sb200\b\f0 -m, --mcifile\par\r
32\pard\nowidctlpar\fi360\sb200\b0 Convert input microcode txt definition file to microcode bin file.\par\r
33\pard\nowidctlpar\sb200\b -j, --join\par\r
34\pard\nowidctlpar\fi360\sb200\b0 Merge multiple microcode bin files to one file.\par\r
35\pard\nowidctlpar\sb200\b -a NUM, --align NUM\par\r
36\pard\nowidctlpar\li360\sb200\b0 NUM is one HEX or DEC format alignment value, which is used to combine multiple microcode bin files.\par\r
37\pard\nowidctlpar\sb200\b -p NUM, --pad NUM\par\r
38\pard\nowidctlpar\li360\sb200\b0 NUM is one HEX or DEC format padding value, which is used to combine multiple microcode bin files.\par\r
39\pard\nowidctlpar\sb200\b --keepexceptiontable\par\r
40\pard\nowidctlpar\fi360\sb200\b0 Don\rquote t clear exception table.\par\r
41\pard\nowidctlpar\sb200\b --keepzeropending\par\r
42\pard\nowidctlpar\fi360\sb200\b0 Don\rquote t strip zero pending of .reloc.\par\r
43\pard\nowidctlpar\sb200\b -r, --replace\par\r
44\pard\nowidctlpar\fi360\sb200\b0 Overwrite the input file with the output content.\par\r
45\pard\nowidctlpar\sb200\b -g HiiPackageListGuid, --hiiguid HiiPackageListGuid\par\r
46\pard\nowidctlpar\fi360\sb200\b0 Guid is used to specify hii package list guid.\f1\par\r
47\f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\par\r
48\pard\nowidctlpar\sb200\b --hiipackage \f1\par\r
49\pard\nowidctlpar\fi360\sb200\b0\f0 Combine all input binary hii packages into a single package list as the text resource data file (RC file format).\par\r
50\pard\nowidctlpar\sb200\b --hiibinpackage \f1\par\r
51\pard\nowidctlpar\fi360\sb200\b0\f0 Combine all input binary hii packages into a single package list as the binary resource section.\par\r
52\pard\nowidctlpar\sb200\b -v, --verbose\par\r
53\pard\nowidctlpar\fi360\sb200\b0 Turn on verbose output with informational messages.\par\r
54\pard\nowidctlpar\sb200\b -d, --debug level\par\r
55\b0\f1\tab\f0 Enable debug message with specified level.\par\r
56\b --version\par\r
57\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par\r
58\pard\nowidctlpar\sb200\b -h, --help\par\r
59\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par\r
60\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par\r
61\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate Efi image with the input PE image, module type and the output file name.\par\r
62\b GenFw \endash e PEI_CORE PeiMain.dll \endash o PeiMain.efi\par\r
63\b0 2. Generate Te image with the input PE image and the output file name.\par\r
64\b GenFw \endash t PeiMain.dll \endash o PeiMain.te\par\r
65\b0 3. Generate acpi table image with the input PE image and the output file name.\par\r
66\b GenFw \endash c Facs.dll \endash o Facs.acpi\par\r
67\b0 4. Dump TeImage Header with the input Te Image and the output file name.\par\r
68\b GenFw \endash u PeiMain.te \endash o PeiMain.teheader\par\r
69\b0 5. Modify PeImage by zero its debug data.\par\r
70\b GenFw \endash z PeiMain.dll \endash o Peimain.zero\par\r
71\b0 6. Modify PeImage by set new timestamp and override the input image without the output file name.\par\r
72\b GenFw \endash s \ldblquote 2007-8-16 16:06:32\rdblquote PeiMain.dll \endash r\par\r
73\b0 7. Extract bin image from PeImage.\par\r
74\b GenFw \endash b PeiMain.dll \endash o PeiMain.bin\par\r
75\b0 8. Generate the microcode binary file from the micro code txt file.\par\r
76\b GenFw \endash m Mci.txt \endash o Mci.bin\par\r
77\b0 9. Merge the multiple mci binary files to one file.\par\r
78\b GenFw \endash j Mci.bin1 Mci.bin2 Mci.bin3 \endash a 32 \endash p 0xFF \endash o Mci.bin\par\r
79\b0 10. Generate the text resource file (RC format) based on all input binary HII packages and their package list guid.\par\r
80\b GenFw \endash o SampleHii.rc \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiipackage SampleStr.hpk SampleVfr.hpk\f1\par\r
81\b0\f0 11. Generate the binary resource section based on all input binary HII packages and their package list guid.\f1\par\r
82\b\f0 GenFw \endash o SampleHii.bin \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiibinpackage SampleStr.hpk SampleVfr.hpk\f1\par\r
83\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Bugs\par\r
84\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
85Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
86\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
87\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
88\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
89\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
90\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
91\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
92This program and the accompanying materials are licensed and made available \par\r
93under the terms and conditions of the BSD License which accompanies this \par\r
94distribution. The full text of the license may be found at\par\r
95http://opensource.org/licenses/bsd-license.php\par\r
96\par\r
97THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
98\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
99\cf0\f1\par\r
100}\r
101\0