Integrate Multiple Payloads
You can integrate more than one payload files using SBL build tool:
python BuildLoader.py build <PLATFORM> -p <PAYLOAD_FILE>:<PAYLOAD_ID>:<COMPRESSION_ALGORITHM>;... Multi-payload build option format: <PAYLOAD_FILE>:<PAYLOAD_ID>:<COMPRESSION_ALGORITHM>;... <PAYLOAD_FILE> : external payload file name. Required to be placed in ``PayloadPkg/PayloadBins`` directory <PAYLOAD_ID> : 4-byte ASCII name for this payload <COMPRESSION_ALGORITHM> : compression algorithm for this payload ('Lz4', 'Lzma' or 'Dummy'). 'Dummy' indicates no compression. This parameter is optional, and default is 'Dummy' if not specified.
If only one payload is specified, this payload will be built into normal payload compoment (PYLD) in the SBL flash map.
If more then one payloads are specified, the first payload will be built into PLD and the remaining will be built into extended payload container (EPLD) in the SBL flash map.
EPAYLOAD is built as an SBL Container (Refer Container Tool) and then put into the EPLD region.
The following procedure shows you how to integrate
UefiPld.fd into SBL image. Adding other custom payloads is similar.
PayloadPkg/PayloadBinsdirectory (create the directory if it is missing)
PayloadIdin SBL configuration file (
PayloadIdtells SBL which payload to load instead of default
OsLoader. For QEMU, open
Platform/QemuBoardPkg/CfgData/CfgDataExt_Brd1.dltand append the following configuration:GEN_CFG_DATA.PayloadId | 'UEFI'
You may also use Configuration Editor to make file changes. See Configuration Tools for more details.
UefiPld.fdinto SBL image:
python BuildLoader.py build qemu -p "OsLoader.efi:LLDR:Lz4;UefiPld.fd:UEFI:Lzma"
UefiPld.fdimage is located in the
EPLDregion according to SBL flash map.
PayloadIdis 4 bytes and should match the value used in the configuration. In this example,
UEFIon the command line.
PayloadId 0 is reserved for OsLoader payload.
The payload footprint should be considered as whether it can be fit into the limited flash space. Smaller, single-purpose payload allows flexibility and easier to debug.