Making a Linux Bootable Image for QSPI Flash with PetaLinux - 2023.2 English

Zynq-7000 SoC Embedded Design Tutorial (UG1165)

Document ID
UG1165
Release Date
2024-05-02
Version
2023.2 English

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..

  1. 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 adds system.dtb into the BOOT.BIN for compatibility with a separate uImage, dtb and rootfs, instead of the FIT format for image.ub. The added system.dtb partition is not used during boot if image.ub is used. For details, refer to the code in boot.scr.