1. Introduction
The recent boot flow presented on the RocketBoards.org community site uses the itb (Image Tree blob) file.
This article describes the itb file and its (Image Tree Source) file.
Note: The itb file is also referred to as a FIT (Flattened Image Tree) image in the U-Boot
documentation. The tree structure described in its is called a FIT.
Reference: Single Image Boot
Flat Image Tree (FIT)
2. About its / itb file
An itb file is a file that contains multiple binaries and settings in a single file. The information contained in the itb file is described in the its file. its file contains settings for what information to include in the itb file, and if multiple settings exist, you can select any one of them to determine the structure of the itb file.
The image is shown below. In the case of the its file shown below, there are settings named Config1 and Config2. If Config1 is selected, the green configuration is shown in the FIT image in the figure, and if Config2 is selected, the red configuration is shown.
[Figure 1] Relationship between its and itb files
3. How to create an itb file
The general itb file creation command is as follows
$ mkimage -f <input file (.its)> <output file (.itb)>
In the Rocketboard.org bootloader creation flow, the mkimage tool (command) under /tools in u-boot-socfpga is used to create an itb file based on its.
It is also possible to use mkimage on your machine instead of mkimage in u-boot-socfpga by installing a package named u-boot-tools on your development machine.
This way, you can use the mkimage command directly without having to select mkimage in u-boot-socfpga/tools (the mkimage used is not /u-boot-socpga/tools/mkimage, but a generic one).
Reference: The u-boot-tools package can be installed on Ubuntu with the following command.
$ sudo apt install u-boot-tools
4. Example of its file description
As mentioned in "2. About its / itb file", the itb file is created according to the its file.
This chapter describes an example description of the its file.
The following is the its file used in building the Linux environment for the Agilex™ 7 FPGA. An explanation of the key points is provided after the code below, so please take a look.
■ file: fit_kernel_agilex7_dk_si_agf014eb.its
/dts-v1/;
/ {
description = "FIT image with kernel, DTB and FPGA core binary";
#address-cells = <1>;
images {
kernel { ... (4)
description = "Linux Kernel";
data = /incbin/("./Image.lzma");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "lzma";
load = <0x6000000>;
entry = <0x6000000>;
hash {
algo = "crc32";
};
};
fdt-0 { ... (4)
description = "socfpga_socdk_vanilla";
data = /incbin/("./socfpga_agilex_vanilla.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
hash {
algo = "crc32";
};
};
fdt-4 {
description = "socfpga_ socdk_combined";
data = /incbin/("./socfpga_agilex_socdk.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
hash {
algo = "crc32";
};
};
fpga-4 {
description = "FPGA bitstream for GHRD";
data = /incbin/("./ghrd.core.rbf");
type = "fpga";
arch = "arm64";
compression = "none";
load = <0xA000000>;
hash {
algo = "crc32";
};
};
};
configurations {
default = "board-0"; ... (2)
board-0 { ... (1)
description = "board_0";
kernel = "kernel"; ... (3)
fdt = "fdt-0"; ... (3)
signature {
algo = "crc32";
key-name-hint = "dev";
sign-images = "fdt-0", "kernel";
};
};
board-4 { ... (1)
description = "board_4";
kernel = "kernel";
fdt = "fdt-4";
fpga = "fpga-4";
signature {
algo = "crc32";
key-name-hint = "dev";
sign-images = "fdt-4", " kernel", "fpga-4";
};
};
};
}
Key points: The following are the important parts.
(1) "board-0" and "board-4" are defined in configurations.
(2) "board-0" is specified as default.
(3) kernel = "kernel"; and fdt = "fdt-0"; are defined in "board-0".
(4) In images, "kernel" and "fdt-0" are defined, and the target file is specified in the data item.
5. Conclusion
In this article, we have described its / itb file and introduced the contents related to their creation. We hope you will find it useful as the use of itb is increasing in recent devices.