]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / UserManuals / GenFw_Utility_Man_Page.rtf
1 {\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
2 {\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}
3 {\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
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
5 \pard\nowidctlpar\sb200\cf2\b0\fs18 GenFw.exe \endash build a UEFI image or other image.\par
6 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par
7 \pard\nowidctlpar\sb200\cf2\fs18 GenFw.exe [options] Filename [Filename]\'85\b0\f1\par
8 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par
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
10 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Options\par
11 \pard\nowidctlpar\sb200\cf2\fs18 Filename1 [FilenameN]\par
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
13 \pard\nowidctlpar\sb200\b -o FileName, --outputfile FileName\par
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
15 \pard\nowidctlpar\sb200\b -e EFI_FILETYPE, --efiImage EFI_FILETYPE\par
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
17 \pard\nowidctlpar\sb200\b\f0 -c, --acpi\par
18 \pard\nowidctlpar\fi360\sb200\b0 Create Acpi table.\par
19 \pard\nowidctlpar\sb200\b -t, --terse\par
20 \pard\nowidctlpar\fi360\sb200\b0 Create Te Image.\par
21 \pard\nowidctlpar\sb200\b -u, --dump\par
22 \pard\nowidctlpar\fi360\sb200\b0 Dump TeImage Header.\par
23 \pard\nowidctlpar\sb200\b -z, --zero\par
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
25 \pard\nowidctlpar\sb200\b\f0 -b, --exe2bin\par
26 \pard\nowidctlpar\fi360\sb200\b0 Convert the input EXE to the output BIN file.\par
27 \pard\nowidctlpar\sb200\b -l, --stripped\par
28 \pard\nowidctlpar\fi360\sb200\b0 Strip off the relocation information data from PE or TE image.\f1\par
29 \pard\nowidctlpar\sb200\b\f0 -s timedate, --stamp timedate\par
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
31 \pard\nowidctlpar\sb200\b\f0 -m, --mcifile\par
32 \pard\nowidctlpar\fi360\sb200\b0 Convert input microcode txt definition file to microcode bin file.\par
33 \pard\nowidctlpar\sb200\b -j, --join\par
34 \pard\nowidctlpar\fi360\sb200\b0 Merge multiple microcode bin files to one file.\par
35 \pard\nowidctlpar\sb200\b -a NUM, --align NUM\par
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
37 \pard\nowidctlpar\sb200\b -p NUM, --pad NUM\par
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
39 \pard\nowidctlpar\sb200\b --keepexceptiontable\par
40 \pard\nowidctlpar\fi360\sb200\b0 Don\rquote t clear exception table.\par
41 \pard\nowidctlpar\sb200\b --keepzeropending\par
42 \pard\nowidctlpar\fi360\sb200\b0 Don\rquote t strip zero pending of .reloc.\par
43 \pard\nowidctlpar\sb200\b -r, --replace\par
44 \pard\nowidctlpar\fi360\sb200\b0 Overwrite the input file with the output content.\par
45 \pard\nowidctlpar\sb200\b -g HiiPackageListGuid, --hiiguid HiiPackageListGuid\par
46 \pard\nowidctlpar\fi360\sb200\b0 Guid is used to specify hii package list guid.\f1\par
47 \f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\par
48 \pard\nowidctlpar\sb200\b --hiipackage \f1\par
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
50 \pard\nowidctlpar\sb200\b --hiibinpackage \f1\par
51 \pard\nowidctlpar\fi360\sb200\b0\f0 Combine all input binary hii packages into a single package list as the binary resource section.\par
52 \pard\nowidctlpar\sb200\b -v, --verbose\par
53 \pard\nowidctlpar\fi360\sb200\b0 Turn on verbose output with informational messages.\par
54 \pard\nowidctlpar\sb200\b -d, --debug level\par
55 \b0\f1\tab\f0 Enable debug message with specified level.\par
56 \b --version\par
57 \pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par
58 \pard\nowidctlpar\sb200\b -h, --help\par
59 \pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par
60 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par
61 \pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate Efi image with the input PE image, module type and the output file name.\par
62 \b GenFw \endash e PEI_CORE PeiMain.dll \endash o PeiMain.efi\par
63 \b0 2. Generate Te image with the input PE image and the output file name.\par
64 \b GenFw \endash t PeiMain.dll \endash o PeiMain.te\par
65 \b0 3. Generate acpi table image with the input PE image and the output file name.\par
66 \b GenFw \endash c Facs.dll \endash o Facs.acpi\par
67 \b0 4. Dump TeImage Header with the input Te Image and the output file name.\par
68 \b GenFw \endash u PeiMain.te \endash o PeiMain.teheader\par
69 \b0 5. Modify PeImage by zero its debug data.\par
70 \b GenFw \endash z PeiMain.dll \endash o Peimain.zero\par
71 \b0 6. Modify PeImage by set new timestamp and override the input image without the output file name.\par
72 \b GenFw \endash s \ldblquote 2007-8-16 16:06:32\rdblquote PeiMain.dll \endash r\par
73 \b0 7. Extract bin image from PeImage.\par
74 \b GenFw \endash b PeiMain.dll \endash o PeiMain.bin\par
75 \b0 8. Generate the microcode binary file from the micro code txt file.\par
76 \b GenFw \endash m Mci.txt \endash o Mci.bin\par
77 \b0 9. Merge the multiple mci binary files to one file.\par
78 \b GenFw \endash j Mci.bin1 Mci.bin2 Mci.bin3 \endash a 32 \endash p 0xFF \endash o Mci.bin\par
79 \b0 10. Generate the text resource file (RC format) based on all input binary HII packages and their package list guid.\par
80 \b GenFw \endash o SampleHii.rc \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiipackage SampleStr.hpk SampleVfr.hpk\f1\par
81 \b0\f0 11. Generate the binary resource section based on all input binary HII packages and their package list guid.\f1\par
82 \b\f0 GenFw \endash o SampleHii.bin \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiibinpackage SampleStr.hpk SampleVfr.hpk\f1\par
83 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Bugs\par
84 \pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par
85 Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par
86 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par
87 \pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
88 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par
89 \pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
90 \pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par
91 \pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par
92 This program and the accompanying materials are licensed and made available \par
93 under the terms and conditions of the BSD License which accompanies this \par
94 distribution. The full text of the license may be found at\par
95 http://opensource.org/licenses/bsd-license.php\par
96 \par
97 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par
98 \pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par
99 \cf0\f1\par
100 }
101