The BIF file specifies each component of the boot image, in order of boot, and allows optional attributes to be applied to each image component. In some cases, an image component can be mapped to more than one partition if the image component is not contiguous in memory. For example, if an ELF file has multiple loadable sections which are non-contiguous, then each section can be a separate partition. BIF file syntax takes the following form:
new_bif:
{
id = 0x5
id_code = 0x04ca8093
extended_id_code = 0x01
image
{
name = pmc_subsys, id = 0x1c000001
partition
{
id = 0x11, type = bootloader,
file = /path/to/plm.elf
}
partition
{
type = pmcdata, load = 0xf2000000,
file = /path/to/pmc_cdo.bin
}
}
}
Note: The above format is for
Versal®
devices only.
<image_name>:
{
// common attributes
[attribute1] <argument1>
// partition attributes
[attribute2, attribute3=<argument>] <elf>
[attribute2, attribute3=<argument>, attibute4=<argument] <bit>
[attribute3] <elf>
<bin>
}
- The <image_name> and the {...} grouping brackets the files that are to be made into partitions in the ROM image.
- One or more data files are listed in the {...} brackets.
- Each partition data files can have an optional set of attributes
preceding the data file name with the syntax
[attribute, attribute=<argument>]
. - Attributes apply some quality to the data file.
- Multiple attributes can be listed separated with a ',' as a separator. The order of multiple attributes is not important. Some attributes are one keyword, some are keyword equates.
- You can also add a filepath to the file name if the file is not in the current directory. How you list the files is free form; either all on one line (separated by any white space, and at least one space), or on separate lines.
- White space is ignored, and can be added for readability.
- You can use C-style block comments of
/*...*/
, or C++ line comments of//
.
The following example is of a BIF with additional white space and new lines for improved readability:
<bootimage_name>:
{
/* common attributes */
[attribute1] <argument1>
/* bootloader */
[attribute2,
attribute3,
attribute4=<argument>
] <elf>
/* pl bitstream */
[
attribute2,
attribute3,
attribute4=<argument>,
attibute=<argument>
] <bit>
/* another elf partition */
[
attribute3
] <elf>
/* bin partition */
<bin>
}
Bootgen Supported Files
The following table lists the Bootgen supported files.
Device Supported | Extension | Description | Notes |
---|---|---|---|
Supported by all devices | .bin | Binary | Raw binary file. |
.dtb | Binary | Raw binary file. | |
image.gz | Binary | Raw binary file. | |
.elf | Executable Linked File (ELF) | Symbols and headers removed. | |
.int | Register initialization file | ||
.nky | AES key | ||
.pub/.pem | RSA key | ||
.sig | Signature files | Signature files generated by bootgen or HSM. | |
Versal | .rcdo | CFI Files | For Versal devices only. |
.cdo/.npi/ .rnpi | CDO files | Configuration Data Object files. For Versal devices only. | |
.bin/.pdi | Boot image | Boot image generated using Bootgen. | |
Zynq-7000/Zynq UltraScale+ MPSoC/FPGA | .bit/.rbt | Bitstream | Strips the BIT file header. |