The BOOT.BIN file is generated by the Bootgen utility. It reads in the BIF for boot partition information. PetaLinux can help to create the BIF file with command line options and call Bootgen to generate the BOOT.BIN` file. Alternatively, the Vitis IDE can create BIF files with GUI wizards and call Bootgen as well. This section introduces the PetaLinux method. The next section introduces the Vitis IDE method..
Run the petalinux-package –boot command in the <PetaLinux Project>/images/linux directory:
cd images/linux petalinux-package --boot --fpga ./system.bit --u-boot --add boot.scr --offset 0xfc0000 --kernel --force
The BOOT.BIN file should be generated in the images/linux directory.
The –fpga option assigns the optional FPGA bit file.
–u-boot packages u-boot.elf into BOOT.BIN.
–add –offset will add a data file to a specific Flash offset.
–kernel adds image.ub to Flash offset 0x520000.
–force forces an overwrite if BOOT.BIN already exists.
FSBL is added by default. You don’t need to add an option to assign it.
You can review the bootgen.bif contents in the <PetaLinux Project>/build/ directory.
Note
The
petalinux-package --boot
tool addssystem.dtb
into theBOOT.BIN
for compatibility with a separate uImage, dtb and rootfs, instead of the FIT format forimage.ub
. The addedsystem.dtb
partition is not used during boot ifimage.ub
is used. For details, refer to the code inboot.scr
.