audk/BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf

82 lines
12 KiB
Plaintext
Raw Normal View History

{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Helvetica;}}
{\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 GenSec.exe \endash build one PI section file.\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par
\pard\nowidctlpar\sb200\cf2\fs18 GenSec.exe [options] [Filename]\'85\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 GenSec is used to generate valid EFI_SECTION type files, which conforms to the firmware file section defined in PI specification, from PE32/PE32+/COFF image files or other binary files. This utility will produce a file that is the section header concatenated with the contents of the input file. It does not validate that the contents of the input file match the section added.\par
PI SECTION Types referred to the Volume 3 of the PI 1.0 specification.\par
\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0\cf0\f2 Mnemonic\cell PI Section Type\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 COMPRESS\cell EFI_SECTION_COMPRESSION\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 GUID\cell EFI_SECTION_GUID_DEFINED\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PE32\cell EFI_SECTION_PE32\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PIC\cell EFI_SECTION_PIC\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 TE\cell EFI_SECTION_TE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 DXE_DEPEX\cell EFI_SECTION_DXE_DEPEX\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 VERSION\cell EFI_SECTION_VERSION\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 UI\cell EFI_SECTION_USER_INTERFACE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 COMPAT16\cell EFI_SECTION_COMPATIBILITY16\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 FVIMAGE\cell EFI_SECTION_FIRMWARE_VOLUME_IMAGE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 SUBGUID\cell EFI_SECTION_FREEFORM_SUBTYPE_GUID\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 RAW\cell EFI_SECTION_RAW\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PEI_DEPEX\cell EFI_SECTION_PEI_DEPEX\cell\row\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Options\par
\pard\nowidctlpar\sb200\cf2\fs18 Filename1 [FilenameN]\par
\pard\nowidctlpar\li360\sb200\b0 Input PE/PE32+ image, or TE image, or other binary files.\par
\pard\nowidctlpar\sb200\b -o FileName, --outputfile FileName\par
\pard\nowidctlpar\li360\sb200\b0 The PI section file is created. This option is required.\par
\pard\nowidctlpar\sb200\b -s SectionType, --sectiontype SectionType\par
\pard\nowidctlpar\li360\sb200\b0 SectionType defined in PI spec is one type of EFI_SECTION_COMPRESSION, EFI_SECTION_GUID_DEFINED, EFI_SECTION_PE32, EFI_SECTION_PIC, EFI_SECTION_TE, EFI_SECTION_DXE_DEPEX, EFI_SECTION_COMPATIBILITY16, EFI_SECTION_USER_INTERFACE, EFI_SECTION_VERSION, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, EFI_SECTION_RAW, EFI_SECTION_FREEFORM_SUBTYPE_GUID, EFI_SECTION_PEI_DEPEX. If sectiontype is not given, EFI_SECTION_ALL is default type to contain the input all sections to one section file.\par
\pard\nowidctlpar\sb200\b -c [Type], --compress [Type]\par
\pard\nowidctlpar\li360\sb200\b0 Compress method type can be PI_NONE or PI_STD. If Type is not given, PI_STD is default type.\par
\pard\nowidctlpar\sb200\b -g GuidValue, --vendor GuidValue\par
\pard\nowidctlpar\li360\sb200\b0 GuidValue is one specific vendor guid value for guided section. Its format is 00000000-0000-0000-0000-000000000000. If it is not given, the default CRC32 guided is used.\par
\pard\nowidctlpar\sb200\b -l GuidHeaderLength, --HeaderLength GuidHeaderLength\par
\pard\nowidctlpar\li360\sb200\b0 Specify the size of header of GUID-ed data.\par
\pard\nowidctlpar\sb200\b -r GuidAttr, --attributes GuidAttr\par
\pard\nowidctlpar\li360\sb200\b0 GuidAttr is guided section attributes, which may be PROCESSING_REQUIRED or AUTH_STATUS_VALID. If it is not given, PROCESSING_REQUIRED is the default attribute.\par
\pard\nowidctlpar\sb200\b -n String, --name String\par
\pard\nowidctlpar\li360\sb200\b0 String is a NULL terminated string used in Ui section.\par
\pard\nowidctlpar\sb200\b -j Number, --buildnumber Number\par
\pard\nowidctlpar\li360\sb200\b0 Number is an integer value between 0000 and 9999 used in Ver section.\par
\pard\nowidctlpar\sb200\b -v, --verbose\par
\pard\nowidctlpar\fi360\sb200\b0 Turn on verbose output with informational messages.\par
\pard\nowidctlpar\sb200\b -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 PE32 section file with the input PE image, PE32 section type and the output file name.\par
\b GenSec -s EFI_SECTION_PE32 PeiMain.efi -o PeiMain.pe32 \par
\b0 2. Generate compression section file with the input section files, compression method and the output file name.\par
\b GenSec -s EFI_SECTION_COMPRESSION \endash c PI_STD PeiMain.pe32 PeiMain.ui PeiMain.ver -o PeiMain.com\par
\b0 3. Generate the default CRC32 guided section file with the input section files, and the output file name.\par
\b GenSec \endash s EFI_SECTION_GUID_DEFINED PeiMain.pe32 PeiMain.ui PeiMain.ver \endash o PeiMain.guided\par
\b0 4. Generate the vendor specific guided section file with the input vendor raw files, the vendor guid, and the output file name.\par
\b GenSec \endash s EFI_SECTION_GUID_DEFINED \endash g A31280AD-481E-41B6-95E8-127F-4C984779 \endash r PROCESSING_REQUIRED \endash r AUTH_STATUS_VALID PeiMain.raw \endash o PeiMain.guided\par
\b0 5. Generate UI section with the input string and the output file name.\par
\b Gensec -s EFI_SECTION_USER_INTERFACE \endash n \ldblquote PeiMain\rdblquote \endash o PeiMain.ui\par
\b0 6. Generate VER section with the input build number and the output file name.\par
\b GenSec -s EFI_SECTION_VERSION \endash j 20 \endash o PeiMain.ver\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\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
}