Name
MkPkg.exe
Synopsis
MkPkg.exe -m <module_file> -p <package_file> [-o distribution_file]
[-x xml-file-header] [-t tools-directory] [-f misc-files] 
[-q | -v] [-h]
Description
MkPkg creates a distribution package file. It packages the specified native packages and native modules, generates an XML formatted description file for these packages and modules and zips them together to a compressed file.
Options
[-o --output-file]
      Specify the distribution file to be created. The default file name is “DistributionPackage.zip” 
[-m, --module]
      The inf file of module to be distributed standalone.
[-p, --package]
      The dec file of package to be distributed.
[-f --misc-files]
      Specify any misc files.
[-x --xml-file-header]
      Specify the xml file which includes header information for creating the distribution file.
[-t --tools-directory]
      Specify the directory name of tools.
[-v, --verbose]
Turn on verbose output with informational messages printed. 
[-q, --quiet]
	Disable all messages except FATAL ERRORS.
[-h, --help]
	Print copyright, version and usage of this program and exit.
Example
1. Before execute the program, please enter the workspace directory and execute “edksetup” to initialize the workspace, in next examples, the workspace is C:\MyWork
2. C:\MyWork\MkPkg -p MdeModulePkg\MdeModulePkg.dec
	Generate a “DistributionPackage.zip” file to zip all contents of [MdeModulePkg] package 
3. C:\MyWork\MkPkg -p MdePkg\MdePkg.dec -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf
	Generate a “DistributionPackage.zip” file to zip all contents of [MdePkg] package and a standalone module [HelloWorld]
4. C:\MyWork\MkPkg -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf -o Hello.far
	Generate a “Hello.far” file to zip all contents of a standalone module [HelloWorld]
5. C:\MyWork\MkPkg -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf -t BaseTools
	Generate a “DistributionPackage.zip” file to zip all contents of a standalone module [HelloWorld] with all files under directory [BaseTools]
6. C:\MyWork\MkPkg -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf -f Conf\build_rule.txt
	Generate a “DistributionPackage.zip” file to zip all contents of a standalone module [HelloWorld] with a misc file [Conf\build_rule.txt]
7. C:\MyWork\MkPkg -p MdeModulePkg\MdeModulePkg.dec -p MdePkg\MdePkg.dec -x A.xml
	Generate a “DistributionPackage.zip” file to zip all contents of [MdeModulePkg] package and [MdePkg] package, the header information of this distribution package is read from [A.xml] (Refer to section [Sample of XML header file] for more information of the XML file header)
Bugs
Not found yet.
Files 
None.
See also
 InstallPkg.exe, RmPkg.exe
License
Copyright (c)  2008-2009 Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available 
under the terms and conditions of the BSD License which accompanies this 
distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sample of XML header file
<DistributionPackage xmlns="http://www.uefi.org/2008/2.1" xmlns:xsi="http:/www.w3.org/2001/XMLSchema-instance">
  <DistributionHeader  ReadOnly="true" RePackage="false">
	  <Name BaseName="Template">DistributionPackageTest</Name>
	  <GUID Version="1.6"> DF0DDA2E-EA83-480b-B2CE-FC0BB2F894C2 </GUID> 
	  <Vendor> Nosuch Corporation </Vendor>
	  <Date>2008-03-24T09:30:00</Date> 
	  <Copyright>Copyright (c)  2008, Nosuch Corporation. All rights reserved.</Copyright> 
	  <License>
	    This program and the accompanying materials are licensed and made available under     
	    the terms and conditions of the BSD License which accompanies this distribution.  
	    The full text of the license may be found at: 
	    http://opensource.org/licenses/bsd-license.php
	    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT 
	    WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
	  </License>
	  <Abstract> Version 1.2 of the NoSuchChipset Distribution Package. </Abstract>
	  <Description> 
	    Initial release of the NoSuchChipset, Version 1.0 providing the base data types 
	    and libraries for NoSuch UEFI Driver. This includes special libraries for 
	    reporting status codes of the driver. 
	  </Description> 
	  <XmlSpecification> 1.0 </XmlSpecification>
	</DistributionHeader>
</DistributionPackage>