Simon Glass | c44aa61 | 2023-06-23 13:22:04 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 3 | Flattened Image Tree (FIT) Format |
| 4 | ================================= |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 5 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 6 | Introduction |
| 7 | ------------ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 8 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 9 | The number of elements playing a role in the kernel booting process has |
| 10 | increased over time and now typically includes the devicetree, kernel image and |
| 11 | possibly a ramdisk image. Generally, all must be placed in the system memory and |
| 12 | booted together. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 13 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 14 | For firmware images a similar process has taken place, with various binaries |
| 15 | loaded at different addresses, such as ARM's ATF, OpenSBI, FPGA and U-Boot |
| 16 | itself. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 17 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 18 | FIT provides a flexible and extensible format to deal with this complexity. It |
| 19 | provides support for multiple components. It also supports multiple |
| 20 | configurations, so that the same FIT can be used to boot multiple boards, with |
| 21 | some components in common (e.g. kernel) and some specific to that board (e.g. |
| 22 | devicetree). |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 23 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 24 | Terminology |
| 25 | ~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 26 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 27 | This document defines FIT by providing FDT (Flat Device Tree) bindings. These |
| 28 | describe the final form of the FIT at the moment when it is used. The user |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 29 | perspective may be simpler, as some of the properties (like timestamps and |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 30 | hashes) are filled in automatically by the U-Boot mkimage tool. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 31 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 32 | To avoid confusion with the kernel FDT the following naming convention is used: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 33 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 34 | FIT |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 35 | Flattened Image Tree |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 36 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 37 | FIT is formally a flattened devicetree (in the libfdt meaning), which conforms |
| 38 | to bindings defined in this document. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 39 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 40 | .its |
| 41 | image tree source |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 42 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 43 | .itb |
| 44 | flattened image tree blob |
| 45 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 46 | Image-building procedure |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 47 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 48 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 49 | The following picture shows how the FIT is prepared. Input consists of |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 50 | image source file (.its) and a set of data files. Image is created with the |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 51 | help of standard U-Boot mkimage tool which in turn uses dtc (device tree |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 52 | compiler) to produce image tree blob (.itb). The resulting .itb file is the |
| 53 | actual binary of a new FIT:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 54 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 55 | tqm5200.its |
| 56 | + |
| 57 | vmlinux.bin.gz mkimage + dtc xfer to target |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 58 | eldk-4.2-ramdisk --------------> tqm5200.itb --------------> boot |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 59 | tqm5200.dtb /|\ |
| 60 | | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 61 | 'new FIT' |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 62 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 63 | Steps: |
| 64 | |
| 65 | #. Create .its file, automatically filled-in properties are omitted |
| 66 | |
| 67 | #. Call mkimage tool on a .its file |
| 68 | |
| 69 | #. mkimage calls dtc to create .itb image and assures that |
| 70 | missing properties are added |
| 71 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 72 | #. .itb (new FIT) is uploaded onto the target and used therein |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 73 | |
| 74 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 75 | Unique identifiers |
| 76 | ~~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 77 | |
| 78 | To identify FIT sub-nodes representing images, hashes, configurations (which |
| 79 | are defined in the following sections), the "unit name" of the given sub-node |
| 80 | is used as it's identifier as it assures uniqueness without additional |
| 81 | checking required. |
| 82 | |
| 83 | |
Simon Glass | f592566 | 2023-06-23 13:22:11 +0100 | [diff] [blame^] | 84 | External data |
| 85 | ~~~~~~~~~~~~~ |
| 86 | |
| 87 | FIT is normally built initially with image data in the 'data' property of each |
| 88 | image node. It is also possible for this data to reside outside the FIT itself. |
| 89 | This allows the 'FDT' part of the FIT to be quite small, so that it can be |
| 90 | loaded and scanned without loading a large amount of data. Then when an image is |
| 91 | needed it can be loaded from an external source. |
| 92 | |
| 93 | External FITs use 'data-offset' or 'data-position' instead of 'data'. |
| 94 | |
| 95 | The mkimage tool can convert a FIT to use external data using the `-E` argument, |
| 96 | optionally using `-p` to specific a fixed position. |
| 97 | |
| 98 | It is often desirable to align each image to a block size or cache-line size |
| 99 | (e.g. 512 bytes), so that there is no need to copy it to an aligned address when |
| 100 | reading the image data. The mkimage tool provides a `-B` argument to support |
| 101 | this. |
| 102 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 103 | Root-node properties |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 104 | -------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 105 | |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 106 | The root node of the FIT should have the following layout:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 107 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 108 | / o image-tree |
| 109 | |- description = "image description" |
| 110 | |- timestamp = <12399321> |
| 111 | |- #address-cells = <1> |
| 112 | | |
| 113 | o images |
| 114 | | | |
| 115 | | o image-1 {...} |
| 116 | | o image-2 {...} |
| 117 | | ... |
| 118 | | |
| 119 | o configurations |
| 120 | |- default = "conf-1" |
| 121 | | |
| 122 | o conf-1 {...} |
| 123 | o conf-2 {...} |
| 124 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 125 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 126 | Optional property |
| 127 | ~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 128 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 129 | description |
Simon Glass | 7396304 | 2023-06-23 13:22:09 +0100 | [diff] [blame] | 130 | Textual description of the FIT |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 131 | |
| 132 | Mandatory property |
| 133 | ~~~~~~~~~~~~~~~~~~ |
| 134 | |
| 135 | timestamp |
| 136 | Last image modification time being counted in seconds since |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 137 | 1970-01-01 00:00:00 - to be automatically calculated by mkimage tool. |
| 138 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 139 | Conditionally mandatory property |
| 140 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 141 | |
| 142 | #address-cells |
| 143 | Number of 32bit cells required to represent entry and |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 144 | load addresses supplied within sub-image nodes. May be omitted when no |
| 145 | entry or load addresses are used. |
| 146 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 147 | Mandatory nodes |
| 148 | ~~~~~~~~~~~~~~~ |
| 149 | |
| 150 | images |
| 151 | This node contains a set of sub-nodes, each of them representing |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 152 | single component sub-image (like kernel, ramdisk, etc.). At least one |
| 153 | sub-image is required. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 154 | |
| 155 | configurations |
| 156 | Contains a set of available configuration nodes and |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 157 | defines a default configuration. |
| 158 | |
| 159 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 160 | '/images' node |
| 161 | -------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 162 | |
| 163 | This node is a container node for component sub-image nodes. Each sub-node of |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 164 | the '/images' node should have the following layout:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 165 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 166 | o image-1 |
| 167 | |- description = "component sub-image description" |
| 168 | |- data = /incbin/("path/to/data/file.bin") |
| 169 | |- type = "sub-image type name" |
| 170 | |- arch = "ARCH name" |
| 171 | |- os = "OS name" |
| 172 | |- compression = "compression name" |
| 173 | |- load = <00000000> |
| 174 | |- entry = <00000000> |
| 175 | | |
| 176 | o hash-1 {...} |
| 177 | o hash-2 {...} |
| 178 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 179 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 180 | Mandatory properties |
| 181 | ~~~~~~~~~~~~~~~~~~~~ |
| 182 | |
| 183 | description |
| 184 | Textual description of the component sub-image |
| 185 | |
| 186 | type |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 187 | Name of component sub-image type. Supported types are: |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 188 | |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 189 | ==================== ================== |
| 190 | Sub-image type Meaning |
| 191 | ==================== ================== |
| 192 | invalid Invalid Image |
| 193 | aisimage Davinci AIS image |
| 194 | atmelimage ATMEL ROM-Boot Image |
| 195 | copro Coprocessor Image} |
| 196 | fdt_legacy legacy Image with Flat Device Tree |
| 197 | filesystem Filesystem Image |
| 198 | firmware Firmware |
| 199 | firmware_ivt Firmware with HABv4 IVT } |
| 200 | flat_dt Flat Device Tree |
| 201 | fpga FPGA Image } |
| 202 | gpimage TI Keystone SPL Image |
| 203 | imx8image NXP i.MX8 Boot Image |
| 204 | imx8mimage NXP i.MX8M Boot Image |
| 205 | imximage Freescale i.MX Boot Image |
| 206 | kernel Kernel Image |
| 207 | kernel_noload Kernel Image (no loading done) |
| 208 | kwbimage Kirkwood Boot Image |
| 209 | lpc32xximage LPC32XX Boot Image |
| 210 | mtk_image MediaTek BootROM loadable Image } |
| 211 | multi Multi-File Image |
| 212 | mxsimage Freescale MXS Boot Image |
| 213 | omapimage TI OMAP SPL With GP CH |
| 214 | pblimage Freescale PBL Boot Image |
| 215 | pmmc TI Power Management Micro-Controller Firmware |
| 216 | ramdisk RAMDisk Image |
| 217 | rkimage Rockchip Boot Image } |
| 218 | rksd Rockchip SD Boot Image } |
| 219 | rkspi Rockchip SPI Boot Image } |
| 220 | script Script |
| 221 | socfpgaimage Altera SoCFPGA CV/AV preloader |
| 222 | socfpgaimage_v1 Altera SoCFPGA A10 preloader |
| 223 | spkgimage Renesas SPKG Image } |
| 224 | standalone Standalone Program |
| 225 | stm32image STMicroelectronics STM32 Image } |
| 226 | sunxi_egon Allwinner eGON Boot Image } |
| 227 | sunxi_toc0 Allwinner TOC0 Boot Image } |
| 228 | tee Trusted Execution Environment Image |
| 229 | ublimage Davinci UBL image |
| 230 | vybridimage Vybrid Boot Image |
| 231 | x86_setup x86 setup.bin |
| 232 | zynqimage Xilinx Zynq Boot Image } |
| 233 | zynqmpbif Xilinx ZynqMP Boot Image (bif) } |
| 234 | zynqmpimage Xilinx ZynqMP Boot Image } |
| 235 | ==================== ================== |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 236 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 237 | compression |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 238 | Compression used by included data. If no compression is used, the |
| 239 | compression property should be set to "none". If the data is compressed but |
| 240 | it should not be uncompressed by the loader (e.g. compressed ramdisk), this |
| 241 | should also be set to "none". |
| 242 | |
| 243 | Supported compression types are: |
| 244 | |
| 245 | ==================== ================== |
| 246 | Compression type Meaning |
| 247 | ==================== ================== |
| 248 | none uncompressed |
| 249 | bzip2 bzip2 compressed |
| 250 | gzip gzip compressed |
| 251 | lz4 lz4 compressed |
| 252 | lzma lzma compressed |
| 253 | lzo lzo compressed |
| 254 | zstd zstd compressed |
| 255 | ==================== ================== |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 256 | |
Simon Glass | f592566 | 2023-06-23 13:22:11 +0100 | [diff] [blame^] | 257 | data-size |
| 258 | size of the data in bytes |
| 259 | |
| 260 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 261 | Conditionally mandatory property |
| 262 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 263 | |
Simon Glass | f592566 | 2023-06-23 13:22:11 +0100 | [diff] [blame^] | 264 | data |
| 265 | Path to the external file which contains this node's binary data. Within |
| 266 | the FIT this is the contents of the file. This is mandatory unless |
| 267 | external data is used. |
| 268 | |
| 269 | data-offset |
| 270 | Offset of the data in a separate image store. The image store is placed |
| 271 | immediately after the last byte of the device tree binary, aligned to a |
| 272 | 4-byte boundary. This is mandatory if external data is used, with an offset. |
| 273 | |
| 274 | data-position |
| 275 | Machine address at which the data is to be found. This is a fixed address |
| 276 | not relative to the loading of the FIT. This is mandatory if external data |
| 277 | used with a fixed address. |
| 278 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 279 | os |
| 280 | OS name, mandatory for types "kernel". Valid OS names are: |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 281 | |
| 282 | ==================== ================== |
| 283 | OS name Meaning |
| 284 | ==================== ================== |
| 285 | invalid Invalid OS |
| 286 | 4_4bsd 4_4BSD |
| 287 | arm-trusted-firmware ARM Trusted Firmware |
| 288 | dell Dell |
| 289 | efi EFI Firmware |
| 290 | esix Esix |
| 291 | freebsd FreeBSD |
| 292 | integrity INTEGRITY |
| 293 | irix Irix |
| 294 | linux Linux |
| 295 | ncr NCR |
| 296 | netbsd NetBSD |
| 297 | openbsd OpenBSD |
| 298 | openrtos OpenRTOS |
| 299 | opensbi RISC-V OpenSBI |
| 300 | ose Enea OSE |
| 301 | plan9 Plan 9 |
| 302 | psos pSOS |
| 303 | qnx QNX |
| 304 | rtems RTEMS |
| 305 | sco SCO |
| 306 | solaris Solaris |
| 307 | svr4 SVR4 |
| 308 | tee Trusted Execution Environment |
| 309 | u-boot U-Boot |
| 310 | vxworks VxWorks |
| 311 | ==================== ================== |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 312 | |
| 313 | arch |
| 314 | Architecture name, mandatory for types: "standalone", "kernel", |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 315 | "firmware", "ramdisk" and "fdt". Valid architecture names are: |
| 316 | |
| 317 | ==================== ================== |
| 318 | Architecture type Meaning |
| 319 | ==================== ================== |
| 320 | invalid Invalid ARCH |
| 321 | alpha Alpha |
| 322 | arc ARC |
| 323 | arm64 AArch64 |
| 324 | arm ARM |
| 325 | avr32 AVR32 |
| 326 | blackfin Blackfin |
| 327 | ia64 IA64 |
| 328 | m68k M68K |
| 329 | microblaze MicroBlaze |
| 330 | mips64 MIPS 64 Bit |
| 331 | mips MIPS |
| 332 | nds32 NDS32 |
| 333 | nios2 NIOS II |
| 334 | or1k OpenRISC 1000 |
| 335 | powerpc PowerPC |
| 336 | ppc PowerPC |
| 337 | riscv RISC-V |
| 338 | s390 IBM S390 |
| 339 | sandbox Sandbox |
| 340 | sh SuperH |
| 341 | sparc64 SPARC 64 Bit |
| 342 | sparc SPARC |
| 343 | x86_64 AMD x86_64 |
| 344 | x86 Intel x86 |
| 345 | xtensa Xtensa |
| 346 | ==================== ================== |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 347 | |
| 348 | entry |
| 349 | entry point address, address size is determined by |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 350 | '#address-cells' property of the root node. |
| 351 | Mandatory for types: "firmware", and "kernel". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 352 | |
| 353 | load |
| 354 | load address, address size is determined by '#address-cells' |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 355 | property of the root node. |
| 356 | Mandatory for types: "firmware", and "kernel". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 357 | |
| 358 | compatible |
| 359 | compatible method for loading image. |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 360 | Mandatory for types: "fpga", and images that do not specify a load address. |
Oleksandr Suvorov | 1777357 | 2022-07-22 17:16:13 +0300 | [diff] [blame] | 361 | Supported compatible methods: |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 362 | |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 363 | ========================== ========================================= |
| 364 | Compatible string Meaning |
| 365 | ========================== ========================================= |
| 366 | u-boot,fpga-legacy Generic fpga loading routine. |
| 367 | u-boot,zynqmp-fpga-ddrauth Signed non-encrypted FPGA bitstream for |
| 368 | Xilinx Zynq UltraScale+ (ZymqMP) device. |
| 369 | u-boot,zynqmp-fpga-enc Encrypted FPGA bitstream for Xilinx Zynq |
| 370 | UltraScale+ (ZynqMP) device. |
| 371 | ========================== ========================================= |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 372 | |
| 373 | phase |
| 374 | U-Boot phase for which the image is intended. |
| 375 | |
| 376 | "spl" |
| 377 | image is an SPL image |
| 378 | |
| 379 | "u-boot" |
| 380 | image is a U-Boot image |
| 381 | |
| 382 | Optional nodes: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 383 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 384 | hash-1 |
| 385 | Each hash sub-node represents separate hash or checksum |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 386 | calculated for node's data according to specified algorithm. |
| 387 | |
| 388 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 389 | Hash nodes |
| 390 | ---------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 391 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 392 | :: |
| 393 | |
| 394 | o hash-1 |
| 395 | |- algo = "hash or checksum algorithm name" |
| 396 | |- value = [hash or checksum value] |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 397 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 398 | Mandatory properties |
| 399 | ~~~~~~~~~~~~~~~~~~~~ |
| 400 | |
| 401 | algo |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 402 | Algorithm name. Supported algoriths and their value sizes are: |
| 403 | |
| 404 | ==================== ============ ========================================= |
| 405 | Sub-image type Size (bytes) Meaning |
| 406 | ==================== ============ ========================================= |
| 407 | crc16-ccitt 2 Cyclic Redundancy Check 16-bit |
| 408 | (Consultative Committee for International |
| 409 | Telegraphy and Telephony) |
| 410 | crc32 4 Cyclic Redundancy Check 32-bit |
| 411 | md5 16 Message Digest 5 (MD5) |
| 412 | sha1 20 Secure Hash Algorithm 1 (SHA1) |
| 413 | sha256 32 Secure Hash Algorithm 2 (SHA256) |
| 414 | sha384 48 Secure Hash Algorithm 2 (SHA384) |
| 415 | sha512 64 Secure Hash Algorithm 2 (SHA512) |
| 416 | ==================== ============ ========================================= |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 417 | |
| 418 | value |
Simon Glass | e0b5ddf | 2023-06-23 13:22:10 +0100 | [diff] [blame] | 419 | Actual checksum or hash value. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 420 | |
| 421 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 422 | '/configurations' node |
| 423 | ---------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 424 | |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 425 | The 'configurations' node creates convenient, labeled boot configurations, |
| 426 | which combine together kernel images with their ramdisks and fdt blobs. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 427 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 428 | The 'configurations' node has the following structure:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 429 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 430 | o configurations |
| 431 | |- default = "default configuration sub-node unit name" |
| 432 | | |
| 433 | o config-1 {...} |
| 434 | o config-2 {...} |
| 435 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 436 | |
| 437 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 438 | Optional property |
| 439 | ~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 440 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 441 | default |
| 442 | Selects one of the configuration sub-nodes as a default configuration. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 443 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 444 | Mandatory nodes |
| 445 | ~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 446 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 447 | configuration-sub-node-unit-name |
| 448 | At least one of the configuration sub-nodes is required. |
| 449 | |
| 450 | |
| 451 | Configuration nodes |
| 452 | ------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 453 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 454 | Each configuration has the following structure:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 455 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 456 | o config-1 |
| 457 | |- description = "configuration description" |
| 458 | |- kernel = "kernel sub-node unit name" |
| 459 | |- fdt = "fdt sub-node unit-name" [, "fdt overlay sub-node unit-name", ...] |
| 460 | |- loadables = "loadables sub-node unit-name" |
| 461 | |- script = " |
| 462 | |- compatible = "vendor,board-style device tree compatible string" |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 463 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 464 | |
| 465 | Mandatory properties |
| 466 | ~~~~~~~~~~~~~~~~~~~~ |
| 467 | |
| 468 | description |
| 469 | Textual configuration description. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 470 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 471 | kernel or firmware |
| 472 | Unit name of the corresponding kernel or firmware |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 473 | (u-boot, op-tee, etc) image. If both "kernel" and "firmware" are specified, |
| 474 | control is passed to the firmware image. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 475 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 476 | Optional properties |
| 477 | ~~~~~~~~~~~~~~~~~~~ |
| 478 | |
| 479 | fdt |
| 480 | Unit name of the corresponding fdt blob (component image node of a |
Pantelis Antoniou | b225652 | 2017-09-04 23:12:17 +0300 | [diff] [blame] | 481 | "fdt type"). Additional fdt overlay nodes can be supplied which signify |
| 482 | that the resulting device tree blob is generated by the first base fdt |
| 483 | blob with all subsequent overlays applied. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 484 | |
| 485 | fpga |
| 486 | Unit name of the corresponding fpga bitstream blob |
Michal Simek | 0a130b1 | 2016-05-17 13:58:44 +0200 | [diff] [blame] | 487 | (component image node of a "fpga type"). |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 488 | |
| 489 | loadables |
| 490 | Unit name containing a list of additional binaries to be |
Karl Apsite | 8f0537d | 2015-05-21 09:52:47 -0400 | [diff] [blame] | 491 | loaded at their given locations. "loadables" is a comma-separated list |
Andrew F. Davis | 28b28f7 | 2016-11-29 16:33:20 -0600 | [diff] [blame] | 492 | of strings. U-Boot will load each binary at its given start-address and |
Thomas Hebb | fd37f24 | 2019-11-13 18:18:03 -0800 | [diff] [blame] | 493 | may optionally invoke additional post-processing steps on this binary based |
Andrew F. Davis | 28b28f7 | 2016-11-29 16:33:20 -0600 | [diff] [blame] | 494 | on its component image node type. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 495 | |
| 496 | script |
| 497 | The image to use when loading a U-Boot script (for use with the |
Sean Anderson | d3e7e20 | 2022-12-12 14:12:11 -0500 | [diff] [blame] | 498 | source command). |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 499 | |
| 500 | compatible |
| 501 | The root compatible string of the U-Boot device tree that |
Julius Werner | 4e82352 | 2019-07-24 19:37:56 -0700 | [diff] [blame] | 502 | this configuration shall automatically match when CONFIG_FIT_BEST_MATCH is |
| 503 | enabled. If this property is not provided, the compatible string will be |
| 504 | extracted from the fdt blob instead. This is only possible if the fdt is |
| 505 | not compressed, so images with compressed fdts that want to use compatible |
| 506 | string matching must always provide this property. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 507 | |
| 508 | The FDT blob is required to properly boot FDT based kernel, so the minimal |
| 509 | configuration for 2.6 FDT kernel is (kernel, fdt) pair. |
| 510 | |
| 511 | Older, 2.4 kernel and 2.6 non-FDT kernel do not use FDT blob, in such cases |
| 512 | 'struct bd_info' must be passed instead of FDT blob, thus fdt property *must |
| 513 | not* be specified in a configuration node. |
| 514 | |
Kever Yang | 8e238b5 | 2020-03-30 11:56:24 +0800 | [diff] [blame] | 515 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 516 | Examples |
| 517 | -------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 518 | |
Simon Glass | c44aa61 | 2023-06-23 13:22:04 +0100 | [diff] [blame] | 519 | Some example files are available here, showing various scenarios |
| 520 | |
| 521 | .. toctree:: |
| 522 | :maxdepth: 1 |
| 523 | |
| 524 | kernel |
| 525 | kernel_fdt |
| 526 | kernel_fdts_compressed |
| 527 | kernel |
| 528 | multi |
| 529 | multi_spl |
| 530 | multi-with-fpga |
| 531 | multi-with-loadables |
| 532 | sec_firmware_ppa |
| 533 | sign-configs |
| 534 | sign-images |
| 535 | uefi |
| 536 | update3 |
| 537 | update_uboot |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 538 | |
| 539 | .. sectionauthor:: Marian Balakowicz <m8@semihalf.com> |
| 540 | .. sectionauthor:: External data additions, 25/1/16 Simon Glass <sjg@chromium.org> |