Simon Glass | c44aa61 | 2023-06-23 13:22:04 +0100 | [diff] [blame^] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 3 | U-Boot new uImage source file format (bindings definition) |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 4 | ========================================================== |
| 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 | |
| 9 | Evolution of the 2.6 Linux kernel for embedded PowerPC systems introduced new |
| 10 | booting method which requires that hardware description is available to the |
| 11 | kernel in the form of Flattened Device Tree. |
| 12 | |
| 13 | Booting with a Flattened Device Tree is much more flexible and is intended to |
| 14 | replace direct passing of 'struct bd_info' which was used to boot pre-FDT |
| 15 | kernels. |
| 16 | |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 17 | However, U-Boot needs to support both techniques to provide backward |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 18 | compatibility for platforms which are not FDT ready. Number of elements |
| 19 | playing role in the booting process has increased and now includes the FDT |
| 20 | blob. Kernel image, FDT blob and possibly ramdisk image - all must be placed |
| 21 | in the system memory and passed to bootm as a arguments. Some of them may be |
| 22 | missing: FDT is not present for legacy platforms, ramdisk is always optional. |
| 23 | Additionally, old uImage format has been extended to support multi sub-images |
| 24 | but the support is limited by simple format of the legacy uImage structure. |
Simon Glass | bb7d3bb | 2022-09-06 20:26:52 -0600 | [diff] [blame] | 25 | Single binary header 'struct legacy_img_hdr' is not flexible enough to cover all |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 26 | possible scenarios. |
| 27 | |
| 28 | All those factors combined clearly show that there is a need for new, more |
| 29 | flexible, multi component uImage format. |
| 30 | |
| 31 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 32 | New uImage format assumptions |
| 33 | ----------------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 34 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 35 | Implementation |
| 36 | ~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 37 | |
| 38 | Libfdt has been selected for the new uImage format implementation as (1) it |
| 39 | provides needed functionality, (2) is actively maintained and developed and |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 40 | (3) increases code reuse as it is already part of the U-Boot source tree. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 41 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 42 | Terminology |
| 43 | ~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 44 | |
| 45 | This document defines new uImage structure by providing FDT bindings for new |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 46 | uImage internals. Bindings are defined from U-Boot perspective, i.e. describe |
| 47 | final form of the uImage at the moment when it reaches U-Boot. User |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 48 | perspective may be simpler, as some of the properties (like timestamps and |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 49 | hashes) will need to be filled in automatically by the U-Boot mkimage tool. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 50 | |
| 51 | To avoid confusion with the kernel FDT the following naming convention is |
| 52 | proposed for the new uImage format related terms: |
| 53 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 54 | FIT |
| 55 | Flattened uImage Tree |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 56 | |
| 57 | FIT is formally a flattened device tree (in the libfdt meaning), which |
| 58 | conforms to bindings defined in this document. |
| 59 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 60 | .its |
| 61 | image tree source |
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 | .itb |
| 64 | flattened image tree blob |
| 65 | |
| 66 | Image building procedure |
| 67 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 68 | |
| 69 | The following picture shows how the new uImage is prepared. Input consists of |
| 70 | 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] | 71 | help of standard U-Boot mkimage tool which in turn uses dtc (device tree |
Masahiro Yamada | 89af930 | 2013-09-13 20:28:21 +0900 | [diff] [blame] | 72 | compiler) to produce image tree blob (.itb). Resulting .itb file is the |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 73 | actual binary of a new uImage:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 74 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 75 | tqm5200.its |
| 76 | + |
| 77 | vmlinux.bin.gz mkimage + dtc xfer to target |
| 78 | eldk-4.2-ramdisk --------------> tqm5200.itb --------------> bootm |
| 79 | tqm5200.dtb /|\ |
| 80 | | |
| 81 | 'new uImage' |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 82 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 83 | Steps: |
| 84 | |
| 85 | #. Create .its file, automatically filled-in properties are omitted |
| 86 | |
| 87 | #. Call mkimage tool on a .its file |
| 88 | |
| 89 | #. mkimage calls dtc to create .itb image and assures that |
| 90 | missing properties are added |
| 91 | |
| 92 | #. .itb (new uImage) is uploaded onto the target and used therein |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 93 | |
| 94 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 95 | Unique identifiers |
| 96 | ~~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 97 | |
| 98 | To identify FIT sub-nodes representing images, hashes, configurations (which |
| 99 | are defined in the following sections), the "unit name" of the given sub-node |
| 100 | is used as it's identifier as it assures uniqueness without additional |
| 101 | checking required. |
| 102 | |
| 103 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 104 | Root node properties |
| 105 | -------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 106 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 107 | Root node of the uImage Tree should have the following layout:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 108 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 109 | / o image-tree |
| 110 | |- description = "image description" |
| 111 | |- timestamp = <12399321> |
| 112 | |- #address-cells = <1> |
| 113 | | |
| 114 | o images |
| 115 | | | |
| 116 | | o image-1 {...} |
| 117 | | o image-2 {...} |
| 118 | | ... |
| 119 | | |
| 120 | o configurations |
| 121 | |- default = "conf-1" |
| 122 | | |
| 123 | o conf-1 {...} |
| 124 | o conf-2 {...} |
| 125 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 126 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 127 | Optional property |
| 128 | ~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 129 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 130 | description |
| 131 | Textual description of the uImage |
| 132 | |
| 133 | Mandatory property |
| 134 | ~~~~~~~~~~~~~~~~~~ |
| 135 | |
| 136 | timestamp |
| 137 | Last image modification time being counted in seconds since |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 138 | 1970-01-01 00:00:00 - to be automatically calculated by mkimage tool. |
| 139 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 140 | Conditionally mandatory property |
| 141 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 142 | |
| 143 | #address-cells |
| 144 | Number of 32bit cells required to represent entry and |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 145 | load addresses supplied within sub-image nodes. May be omitted when no |
| 146 | entry or load addresses are used. |
| 147 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 148 | Mandatory nodes |
| 149 | ~~~~~~~~~~~~~~~ |
| 150 | |
| 151 | images |
| 152 | This node contains a set of sub-nodes, each of them representing |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 153 | single component sub-image (like kernel, ramdisk, etc.). At least one |
| 154 | sub-image is required. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 155 | |
| 156 | configurations |
| 157 | Contains a set of available configuration nodes and |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 158 | defines a default configuration. |
| 159 | |
| 160 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 161 | '/images' node |
| 162 | -------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 163 | |
| 164 | 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] | 165 | the '/images' node should have the following layout:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 166 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 167 | o image-1 |
| 168 | |- description = "component sub-image description" |
| 169 | |- data = /incbin/("path/to/data/file.bin") |
| 170 | |- type = "sub-image type name" |
| 171 | |- arch = "ARCH name" |
| 172 | |- os = "OS name" |
| 173 | |- compression = "compression name" |
| 174 | |- load = <00000000> |
| 175 | |- entry = <00000000> |
| 176 | | |
| 177 | o hash-1 {...} |
| 178 | o hash-2 {...} |
| 179 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 180 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 181 | Mandatory properties |
| 182 | ~~~~~~~~~~~~~~~~~~~~ |
| 183 | |
| 184 | description |
| 185 | Textual description of the component sub-image |
| 186 | |
| 187 | type |
| 188 | Name of component sub-image type, supported types are: |
| 189 | |
Tom Rini | 96496f8 | 2017-07-18 14:14:19 -0400 | [diff] [blame] | 190 | "standalone", "kernel", "kernel_noload", "ramdisk", "firmware", "script", |
| 191 | "filesystem", "flat_dt" and others (see uimage_type in common/image.c). |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 192 | |
| 193 | data |
| 194 | Path to the external file which contains this node's binary data. |
| 195 | |
| 196 | compression |
| 197 | Compression used by included data. Supported compressions |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 198 | are "gzip" and "bzip2". If no compression is used compression property |
Simon Goldschmidt | 9fded7b | 2018-07-30 12:53:18 +0200 | [diff] [blame] | 199 | should be set to "none". If the data is compressed but it should not be |
| 200 | uncompressed by U-Boot (e.g. compressed ramdisk), this should also be set |
| 201 | to "none". |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 202 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 203 | Conditionally mandatory property |
| 204 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 205 | |
| 206 | os |
| 207 | OS name, mandatory for types "kernel". Valid OS names are: |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 208 | "openbsd", "netbsd", "freebsd", "4_4bsd", "linux", "svr4", "esix", |
Guilherme Maciel Ferreira | 5e39831 | 2015-01-15 02:37:33 -0200 | [diff] [blame] | 209 | "solaris", "irix", "sco", "dell", "ncr", "lynxos", "vxworks", "psos", "qnx", |
Sean Anderson | 075757d | 2020-08-07 13:13:31 -0400 | [diff] [blame] | 210 | "u-boot", "rtems", "unity", "integrity". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 211 | |
| 212 | arch |
| 213 | Architecture name, mandatory for types: "standalone", "kernel", |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 214 | "firmware", "ramdisk" and "fdt". Valid architecture names are: "alpha", |
| 215 | "arm", "i386", "ia64", "mips", "mips64", "ppc", "s390", "sh", "sparc", |
Simon Glass | 750d66c | 2014-10-19 21:11:23 -0600 | [diff] [blame] | 216 | "sparc64", "m68k", "microblaze", "nios2", "blackfin", "avr32", "st200", |
| 217 | "sandbox". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 218 | |
| 219 | entry |
| 220 | entry point address, address size is determined by |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 221 | '#address-cells' property of the root node. |
| 222 | Mandatory for types: "firmware", and "kernel". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 223 | |
| 224 | load |
| 225 | load address, address size is determined by '#address-cells' |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 226 | property of the root node. |
| 227 | Mandatory for types: "firmware", and "kernel". |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 228 | |
| 229 | compatible |
| 230 | compatible method for loading image. |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 231 | 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] | 232 | Supported compatible methods: |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 233 | |
| 234 | "u-boot,fpga-legacy" |
| 235 | the generic fpga loading routine. |
| 236 | |
| 237 | "u-boot,zynqmp-fpga-ddrauth" |
| 238 | signed non-encrypted FPGA bitstream for |
| 239 | Xilinx Zynq UltraScale+ (ZymqMP) device. |
| 240 | |
| 241 | "u-boot,zynqmp-fpga-enc" |
| 242 | encrypted FPGA bitstream for Xilinx Zynq |
| 243 | |
Adrian Fiergolski | 0d6bb43 | 2022-07-22 17:16:14 +0300 | [diff] [blame] | 244 | UltraScale+ (ZynqMP) device. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 245 | |
| 246 | phase |
| 247 | U-Boot phase for which the image is intended. |
| 248 | |
| 249 | "spl" |
| 250 | image is an SPL image |
| 251 | |
| 252 | "u-boot" |
| 253 | image is a U-Boot image |
| 254 | |
| 255 | Optional nodes: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 256 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 257 | hash-1 |
| 258 | Each hash sub-node represents separate hash or checksum |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 259 | calculated for node's data according to specified algorithm. |
| 260 | |
| 261 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 262 | Hash nodes |
| 263 | ---------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 264 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 265 | :: |
| 266 | |
| 267 | o hash-1 |
| 268 | |- algo = "hash or checksum algorithm name" |
| 269 | |- value = [hash or checksum value] |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 270 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 271 | Mandatory properties |
| 272 | ~~~~~~~~~~~~~~~~~~~~ |
| 273 | |
| 274 | algo |
| 275 | Algorithm name, supported are "crc32", "md5" and "sha1". |
| 276 | |
| 277 | value |
| 278 | Actual checksum or hash value, correspondingly 4, 16 or 20 bytes long. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 279 | |
| 280 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 281 | '/configurations' node |
| 282 | ---------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 283 | |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 284 | The 'configurations' node creates convenient, labeled boot configurations, |
| 285 | which combine together kernel images with their ramdisks and fdt blobs. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 286 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 287 | The 'configurations' node has the following structure:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 288 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 289 | o configurations |
| 290 | |- default = "default configuration sub-node unit name" |
| 291 | | |
| 292 | o config-1 {...} |
| 293 | o config-2 {...} |
| 294 | ... |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 295 | |
| 296 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 297 | Optional property |
| 298 | ~~~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 299 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 300 | default |
| 301 | Selects one of the configuration sub-nodes as a default configuration. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 302 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 303 | Mandatory nodes |
| 304 | ~~~~~~~~~~~~~~~ |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 305 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 306 | configuration-sub-node-unit-name |
| 307 | At least one of the configuration sub-nodes is required. |
| 308 | |
| 309 | |
| 310 | Configuration nodes |
| 311 | ------------------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 312 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 313 | Each configuration has the following structure:: |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 314 | |
Simon Glass | a37a8f2 | 2023-06-23 13:22:02 +0100 | [diff] [blame] | 315 | o config-1 |
| 316 | |- description = "configuration description" |
| 317 | |- kernel = "kernel sub-node unit name" |
| 318 | |- fdt = "fdt sub-node unit-name" [, "fdt overlay sub-node unit-name", ...] |
| 319 | |- loadables = "loadables sub-node unit-name" |
| 320 | |- script = " |
| 321 | |- compatible = "vendor,board-style device tree compatible string" |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 322 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 323 | |
| 324 | Mandatory properties |
| 325 | ~~~~~~~~~~~~~~~~~~~~ |
| 326 | |
| 327 | description |
| 328 | Textual configuration description. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 329 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 330 | kernel or firmware |
| 331 | Unit name of the corresponding kernel or firmware |
Alexandru Gagniuc | 5638c5f | 2020-12-15 13:15:43 -0600 | [diff] [blame] | 332 | (u-boot, op-tee, etc) image. If both "kernel" and "firmware" are specified, |
| 333 | control is passed to the firmware image. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 334 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 335 | Optional properties |
| 336 | ~~~~~~~~~~~~~~~~~~~ |
| 337 | |
| 338 | fdt |
| 339 | Unit name of the corresponding fdt blob (component image node of a |
Pantelis Antoniou | b225652 | 2017-09-04 23:12:17 +0300 | [diff] [blame] | 340 | "fdt type"). Additional fdt overlay nodes can be supplied which signify |
| 341 | that the resulting device tree blob is generated by the first base fdt |
| 342 | blob with all subsequent overlays applied. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 343 | |
| 344 | fpga |
| 345 | Unit name of the corresponding fpga bitstream blob |
Michal Simek | 0a130b1 | 2016-05-17 13:58:44 +0200 | [diff] [blame] | 346 | (component image node of a "fpga type"). |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 347 | |
| 348 | loadables |
| 349 | Unit name containing a list of additional binaries to be |
Karl Apsite | 8f0537d | 2015-05-21 09:52:47 -0400 | [diff] [blame] | 350 | loaded at their given locations. "loadables" is a comma-separated list |
Andrew F. Davis | 28b28f7 | 2016-11-29 16:33:20 -0600 | [diff] [blame] | 351 | 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] | 352 | may optionally invoke additional post-processing steps on this binary based |
Andrew F. Davis | 28b28f7 | 2016-11-29 16:33:20 -0600 | [diff] [blame] | 353 | on its component image node type. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 354 | |
| 355 | script |
| 356 | 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] | 357 | source command). |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 358 | |
| 359 | compatible |
| 360 | The root compatible string of the U-Boot device tree that |
Julius Werner | 4e82352 | 2019-07-24 19:37:56 -0700 | [diff] [blame] | 361 | this configuration shall automatically match when CONFIG_FIT_BEST_MATCH is |
| 362 | enabled. If this property is not provided, the compatible string will be |
| 363 | extracted from the fdt blob instead. This is only possible if the fdt is |
| 364 | not compressed, so images with compressed fdts that want to use compatible |
| 365 | string matching must always provide this property. |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 366 | |
| 367 | The FDT blob is required to properly boot FDT based kernel, so the minimal |
| 368 | configuration for 2.6 FDT kernel is (kernel, fdt) pair. |
| 369 | |
| 370 | Older, 2.4 kernel and 2.6 non-FDT kernel do not use FDT blob, in such cases |
| 371 | 'struct bd_info' must be passed instead of FDT blob, thus fdt property *must |
| 372 | not* be specified in a configuration node. |
| 373 | |
| 374 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 375 | External data |
| 376 | ------------- |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 377 | |
| 378 | The above format shows a 'data' property which holds the data for each image. |
| 379 | It is also possible for this data to reside outside the FIT itself. This |
| 380 | allows the FIT to be quite small, so that it can be loaded and scanned |
| 381 | without loading a large amount of data. Then when an image is needed it can |
| 382 | be loaded from an external source. |
| 383 | |
| 384 | In this case the 'data' property is omitted. Instead you can use: |
| 385 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 386 | data-offset |
| 387 | offset of the data in a separate image store. The image |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 388 | store is placed immediately after the last byte of the device tree binary, |
| 389 | aligned to a 4-byte boundary. |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 390 | |
Simon Glass | c44aa61 | 2023-06-23 13:22:04 +0100 | [diff] [blame^] | 391 | data-size |
| 392 | size of the data in bytes |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 393 | |
Teddy Reed | a845762 | 2016-06-09 19:38:02 -0700 | [diff] [blame] | 394 | The 'data-offset' property can be substituted with 'data-position', which |
| 395 | defines an absolute position or address as the offset. This is helpful when |
Peng Fan | 8876c7e | 2017-12-05 13:20:59 +0800 | [diff] [blame] | 396 | booting U-Boot proper before performing relocation. Pass '-p [offset]' to |
| 397 | mkimage to enable 'data-position'. |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 398 | |
York Sun | adf99fa | 2017-08-15 11:14:44 -0700 | [diff] [blame] | 399 | Normal kernel FIT image has data embedded within FIT structure. U-Boot image |
| 400 | for SPL boot has external data. Existence of 'data-offset' can be used to |
| 401 | identify which format is used. |
| 402 | |
Kever Yang | 8e238b5 | 2020-03-30 11:56:24 +0800 | [diff] [blame] | 403 | For FIT image with external data, it would be better to align each blob of data |
| 404 | to block(512 byte) for block device, so that we don't need to do the copy when |
| 405 | read the image data in SPL. Pass '-B 0x200' to mkimage to align the FIT |
| 406 | structure and data to 512 byte, other values available for other align size. |
| 407 | |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 408 | Examples |
| 409 | -------- |
Marian Balakowicz | 18710b8 | 2008-03-12 12:13:13 +0100 | [diff] [blame] | 410 | |
Simon Glass | c44aa61 | 2023-06-23 13:22:04 +0100 | [diff] [blame^] | 411 | Some example files are available here, showing various scenarios |
| 412 | |
| 413 | .. toctree:: |
| 414 | :maxdepth: 1 |
| 415 | |
| 416 | kernel |
| 417 | kernel_fdt |
| 418 | kernel_fdts_compressed |
| 419 | kernel |
| 420 | multi |
| 421 | multi_spl |
| 422 | multi-with-fpga |
| 423 | multi-with-loadables |
| 424 | sec_firmware_ppa |
| 425 | sign-configs |
| 426 | sign-images |
| 427 | uefi |
| 428 | update3 |
| 429 | update_uboot |
Simon Glass | 47e3733 | 2023-06-23 13:22:03 +0100 | [diff] [blame] | 430 | |
| 431 | .. sectionauthor:: Marian Balakowicz <m8@semihalf.com> |
| 432 | .. sectionauthor:: External data additions, 25/1/16 Simon Glass <sjg@chromium.org> |