Build the boot script boot.scr / u-boot.scr
Some platforms require a U-Boot boot script (boot.scr or u-boot.scr)
on the SD card BOOT partition to tell U-Boot how to load the kernel, device
tree, and (optionally) the FPGA bitstream into memory. This page explains how
to build that script from a plain-text source file using the mkimage tool.
Note
The boot script is not the same as BOOT.BIN.
For AMD Xilinx Zynq/ZynqMP/Versal BOOT.BIN generation, see
Build the boot image BOOT.BIN.
For Intel boot images, see Generating HDL boot image for Intel projects.
Prerequisites
The mkimage utility is required. It is part of the u-boot-tools
package on most Linux distributions:
~$
sudo apt-get install u-boot-tools
Verify the installation:
~$
mkimage -V
Boot script source files
We provide ready-made boot script source files (*.txt) for all
Kuiper-supported carriers in the
boot_txt_files
repository, under the boot_txt_files/ directory.
The following source files are available:
Source file |
Platform / carrier |
Output file name |
|---|---|---|
|
Zynq (e.g. ZED, ZC706) |
|
|
Zynq UltraScale+ MPSoC (e.g. ZCU102) |
|
|
Kria K26 SOM |
|
|
Versal (e.g. VCK190) |
|
|
Versal Premium (VPK180) |
|
|
Intel Cyclone V SoC (e.g. C5SoC) |
|
|
Jupiter SDR |
|
|
Zynq — without bitstream loading |
|
|
DE10-Nano — without bitstream loading |
|
Download the source file that matches your platform:
~$
wget https://raw.githubusercontent.com/analogdevicesinc/wiki-scripts/main/boot_txt_files/<platform>.txt
Replace <platform> with one of the file names from the table above
(e.g. zynqmp, versal, cyclone5).
Building the boot script
The mkimage command converts the plain-text source into a U-Boot script
image. The general form is:
mkimage -A <arch> -O linux -T script -C none -a 0 -e 0 \
-n "<description>" \
-d <input>.txt <output>.scr
Where:
-A <arch>— target architecture (armfor 32-bit,arm64for 64-bit)-O linux— operating system-T script— image type (boot script)-C none— no compression-a 0 -e 0— load and entry addresses (unused for scripts, set to 0)-n "<description>"— a human-readable description embedded in the image-d <input>.txt— the boot script source file<output>.scr— the output boot script image
For AMD Xilinx platforms
This applies to Zynq, Zynq UltraScale+ MPSoC, Kria K26, Versal, and VPK180
carriers. The output file is boot.scr.
~$
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-n "Boot script" \
-d <platform>.txt boot.scr
For Intel platforms
This applies to Cyclone V SoC and DE10-Nano carriers. The output file is
u-boot.scr.
~$
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-n "Boot script" \
-d <platform>.txt u-boot.scr
Note
Intel Cyclone V SoC projects expect the file name u-boot.scr, not
boot.scr.
After building, copy the resulting script file to the BOOT (FAT32) partition of the SD card.