Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1 | Binman Entry Documentation |
| 2 | =========================== |
| 3 | |
| 4 | This file describes the entry types supported by binman. These entry types can |
| 5 | be placed in an image one by one to build up a final firmware image. It is |
| 6 | fairly easy to create new entry types. Just add a new file to the 'etype' |
| 7 | directory. You can use the existing entries as examples. |
| 8 | |
| 9 | Note that some entries are subclasses of others, using and extending their |
| 10 | features to produce new behaviours. |
| 11 | |
| 12 | |
| 13 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 14 | .. _etype_atf_bl31: |
| 15 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 16 | Entry: atf-bl31: ARM Trusted Firmware (ATF) BL31 blob |
| 17 | ----------------------------------------------------- |
Simon Glass | 559c4de | 2020-09-01 05:13:58 -0600 | [diff] [blame] | 18 | |
| 19 | Properties / Entry arguments: |
| 20 | - atf-bl31-path: Filename of file to read into entry. This is typically |
| 21 | called bl31.bin or bl31.elf |
| 22 | |
| 23 | This entry holds the run-time firmware, typically started by U-Boot SPL. |
| 24 | See the U-Boot README for your architecture or board for how to use it. See |
| 25 | https://github.com/ARM-software/arm-trusted-firmware for more information |
| 26 | about ATF. |
| 27 | |
| 28 | |
| 29 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 30 | .. _etype_atf_fip: |
| 31 | |
Simon Glass | 3efb297 | 2021-11-23 21:08:59 -0700 | [diff] [blame] | 32 | Entry: atf-fip: ARM Trusted Firmware's Firmware Image Package (FIP) |
| 33 | ------------------------------------------------------------------- |
| 34 | |
| 35 | A FIP_ provides a way to group binaries in a firmware image, used by ARM's |
| 36 | Trusted Firmware A (TF-A) code. It is a simple format consisting of a |
| 37 | table of contents with information about the type, offset and size of the |
| 38 | binaries in the FIP. It is quite similar to FMAP, with the major difference |
| 39 | that it uses UUIDs to indicate the type of each entry. |
| 40 | |
| 41 | Note: It is recommended to always add an fdtmap to every image, as well as |
| 42 | any FIPs so that binman and other tools can access the entire image |
| 43 | correctly. |
| 44 | |
| 45 | The UUIDs correspond to useful names in `fiptool`, provided by ATF to |
| 46 | operate on FIPs. Binman uses these names to make it easier to understand |
| 47 | what is going on, although it is possible to provide a UUID if needed. |
| 48 | |
| 49 | The contents of the FIP are defined by subnodes of the atf-fip entry, e.g.:: |
| 50 | |
| 51 | atf-fip { |
| 52 | soc-fw { |
| 53 | filename = "bl31.bin"; |
| 54 | }; |
| 55 | |
| 56 | scp-fwu-cfg { |
| 57 | filename = "bl2u.bin"; |
| 58 | }; |
| 59 | |
| 60 | u-boot { |
| 61 | fip-type = "nt-fw"; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | This describes a FIP with three entries: soc-fw, scp-fwu-cfg and nt-fw. |
| 66 | You can use normal (non-external) binaries like U-Boot simply by adding a |
| 67 | FIP type, with the `fip-type` property, as above. |
| 68 | |
| 69 | Since FIP exists to bring blobs together, Binman assumes that all FIP |
| 70 | entries are external binaries. If a binary may not exist, you can use the |
| 71 | `--allow-missing` flag to Binman, in which case the image is still created, |
| 72 | even though it will not actually work. |
| 73 | |
| 74 | The size of the FIP depends on the size of the binaries. There is currently |
| 75 | no way to specify a fixed size. If the `atf-fip` node has a `size` entry, |
| 76 | this affects the space taken up by the `atf-fip` entry, but the FIP itself |
| 77 | does not expand to use that space. |
| 78 | |
| 79 | Some other FIP features are available with Binman. The header and the |
| 80 | entries have 64-bit flag works. The flag flags do not seem to be defined |
| 81 | anywhere, but you can use `fip-hdr-flags` and fip-flags` to set the values |
| 82 | of the header and entries respectively. |
| 83 | |
| 84 | FIP entries can be aligned to a particular power-of-two boundary. Use |
| 85 | fip-align for this. |
| 86 | |
| 87 | Binman only understands the entry types that are included in its |
| 88 | implementation. It is possible to specify a 16-byte UUID instead, using the |
| 89 | fip-uuid property. In this case Binman doesn't know what its type is, so |
| 90 | just uses the UUID. See the `u-boot` node in this example:: |
| 91 | |
| 92 | binman { |
| 93 | atf-fip { |
| 94 | fip-hdr-flags = /bits/ 64 <0x123>; |
| 95 | fip-align = <16>; |
| 96 | soc-fw { |
| 97 | fip-flags = /bits/ 64 <0x456>; |
| 98 | filename = "bl31.bin"; |
| 99 | }; |
| 100 | |
| 101 | scp-fwu-cfg { |
| 102 | filename = "bl2u.bin"; |
| 103 | }; |
| 104 | |
| 105 | u-boot { |
| 106 | fip-uuid = [fc 65 13 92 4a 5b 11 ec |
| 107 | 94 35 ff 2d 1c fc 79 9c]; |
| 108 | }; |
| 109 | }; |
| 110 | fdtmap { |
| 111 | }; |
| 112 | }; |
| 113 | |
| 114 | Binman allows reading and updating FIP entries after the image is created, |
| 115 | provided that an FDPMAP is present too. Updates which change the size of a |
| 116 | FIP entry will cause it to be expanded or contracted as needed. |
| 117 | |
| 118 | Properties for top-level atf-fip node |
| 119 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 120 | |
| 121 | fip-hdr-flags (64 bits) |
| 122 | Sets the flags for the FIP header. |
| 123 | |
| 124 | Properties for subnodes |
| 125 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 126 | |
| 127 | fip-type (str) |
| 128 | FIP type to use for this entry. This is needed if the entry |
| 129 | name is not a valid type. Value types are defined in `fip_util.py`. |
| 130 | The FIP type defines the UUID that is used (they map 1:1). |
| 131 | |
| 132 | fip-uuid (16 bytes) |
| 133 | If there is no FIP-type name defined, or it is not supported by Binman, |
| 134 | this property sets the UUID. It should be a 16-byte value, following the |
| 135 | hex digits of the UUID. |
| 136 | |
| 137 | fip-flags (64 bits) |
| 138 | Set the flags for a FIP entry. Use in one of the subnodes of the |
| 139 | 7atf-fip entry. |
| 140 | |
| 141 | fip-align |
| 142 | Set the alignment for a FIP entry, FIP entries can be aligned to a |
| 143 | particular power-of-two boundary. The default is 1. |
| 144 | |
| 145 | Adding new FIP-entry types |
| 146 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 147 | |
| 148 | When new FIP entries are defined by TF-A they appear in the |
| 149 | `TF-A source tree`_. You can use `fip_util.py` to update Binman to support |
| 150 | new types, then `send a patch`_ to the U-Boot mailing list. There are two |
| 151 | source files that the tool examples: |
| 152 | |
| 153 | - `include/tools_share/firmware_image_package.h` has the UUIDs |
| 154 | - `tools/fiptool/tbbr_config.c` has the name and descripion for each UUID |
| 155 | |
| 156 | To run the tool:: |
| 157 | |
| 158 | $ tools/binman/fip_util.py -s /path/to/arm-trusted-firmware |
| 159 | Warning: UUID 'UUID_NON_TRUSTED_WORLD_KEY_CERT' is not mentioned in tbbr_config.c file |
| 160 | Existing code in 'tools/binman/fip_util.py' is up-to-date |
| 161 | |
| 162 | If it shows there is an update, it writes a new version of `fip_util.py` |
| 163 | to `fip_util.py.out`. You can change the output file using the `-i` flag. |
| 164 | If you have a problem, use `-D` to enable traceback debugging. |
| 165 | |
| 166 | FIP commentary |
| 167 | ~~~~~~~~~~~~~~ |
| 168 | |
| 169 | As a side effect of use of UUIDs, FIP does not support multiple |
| 170 | entries of the same type, such as might be used to store fonts or graphics |
| 171 | icons, for example. For verified boot it could be used for each part of the |
| 172 | image (e.g. separate FIPs for A and B) but cannot describe the whole |
| 173 | firmware image. As with FMAP there is no hierarchy defined, although FMAP |
| 174 | works around this by having 'section' areas which encompass others. A |
| 175 | similar workaround would be possible with FIP but is not currently defined. |
| 176 | |
| 177 | It is recommended to always add an fdtmap to every image, as well as any |
| 178 | FIPs so that binman and other tools can access the entire image correctly. |
| 179 | |
| 180 | .. _FIP: https://trustedfirmware-a.readthedocs.io/en/latest/design/firmware-design.html#firmware-image-package-fip |
| 181 | .. _`TF-A source tree`: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 182 | .. _`send a patch`: https://www.denx.de/wiki/U-Boot/Patches |
| 183 | |
| 184 | |
| 185 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 186 | .. _etype_blob: |
| 187 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 188 | Entry: blob: Arbitrary binary blob |
| 189 | ---------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 190 | |
| 191 | Note: This should not be used by itself. It is normally used as a parent |
| 192 | class by other entry types. |
| 193 | |
| 194 | Properties / Entry arguments: |
| 195 | - filename: Filename of file to read into entry |
Simon Glass | 7ba3359 | 2018-09-14 04:57:26 -0600 | [diff] [blame] | 196 | - compress: Compression algorithm to use: |
| 197 | none: No compression |
| 198 | lz4: Use lz4 compression (via 'lz4' command-line utility) |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 199 | |
| 200 | This entry reads data from a file and places it in the entry. The |
| 201 | default filename is often specified specified by the subclass. See for |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 202 | example the 'u-boot' entry which provides the filename 'u-boot.bin'. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 203 | |
Simon Glass | 7ba3359 | 2018-09-14 04:57:26 -0600 | [diff] [blame] | 204 | If compression is enabled, an extra 'uncomp-size' property is written to |
| 205 | the node (if enabled with -u) which provides the uncompressed size of the |
| 206 | data. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 207 | |
| 208 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 209 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 210 | .. _etype_blob_dtb: |
| 211 | |
Simon Glass | e219aa4 | 2018-09-14 04:57:24 -0600 | [diff] [blame] | 212 | Entry: blob-dtb: A blob that holds a device tree |
| 213 | ------------------------------------------------ |
| 214 | |
| 215 | This is a blob containing a device tree. The contents of the blob are |
| 216 | obtained from the list of available device-tree files, managed by the |
| 217 | 'state' module. |
| 218 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 219 | Additional attributes: |
| 220 | prepend: Header used (e.g. 'length') |
Simon Glass | e219aa4 | 2018-09-14 04:57:24 -0600 | [diff] [blame] | 221 | |
| 222 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 223 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 224 | .. _etype_blob_ext: |
| 225 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 226 | Entry: blob-ext: Externally built binary blob |
| 227 | --------------------------------------------- |
Simon Glass | 5e56018 | 2020-07-09 18:39:36 -0600 | [diff] [blame] | 228 | |
| 229 | Note: This should not be used by itself. It is normally used as a parent |
| 230 | class by other entry types. |
| 231 | |
Simon Glass | 5d94cc6 | 2020-07-09 18:39:38 -0600 | [diff] [blame] | 232 | If the file providing this blob is missing, binman can optionally ignore it |
| 233 | and produce a broken image with a warning. |
| 234 | |
Simon Glass | 5e56018 | 2020-07-09 18:39:36 -0600 | [diff] [blame] | 235 | See 'blob' for Properties / Entry arguments. |
| 236 | |
| 237 | |
| 238 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 239 | .. _etype_blob_ext_list: |
| 240 | |
Simon Glass | 0b00ae6 | 2021-11-23 21:09:52 -0700 | [diff] [blame] | 241 | Entry: blob-ext-list: List of externally built binary blobs |
| 242 | ----------------------------------------------------------- |
| 243 | |
| 244 | This is like blob-ext except that a number of blobs can be provided, |
| 245 | typically with some sort of relationship, e.g. all are DDC parameters. |
| 246 | |
| 247 | If any of the external files needed by this llist is missing, binman can |
| 248 | optionally ignore it and produce a broken image with a warning. |
| 249 | |
| 250 | Args: |
| 251 | filenames: List of filenames to read and include |
| 252 | |
| 253 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 254 | |
| 255 | .. _etype_blob_named_by_arg: |
Simon Glass | 0b00ae6 | 2021-11-23 21:09:52 -0700 | [diff] [blame] | 256 | |
Simon Glass | db168d4 | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 257 | Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass |
| 258 | ----------------------------------------------------------------------------------------- |
| 259 | |
| 260 | Properties / Entry arguments: |
| 261 | - <xxx>-path: Filename containing the contents of this entry (optional, |
Simon Glass | 21db0ff | 2020-09-01 05:13:54 -0600 | [diff] [blame] | 262 | defaults to None) |
Simon Glass | db168d4 | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 263 | |
| 264 | where <xxx> is the blob_fname argument to the constructor. |
| 265 | |
| 266 | This entry cannot be used directly. Instead, it is used as a parent class |
| 267 | for another entry, which defined blob_fname. This parameter is used to |
| 268 | set the entry-arg or property containing the filename. The entry-arg or |
| 269 | property is in turn used to set the actual filename. |
| 270 | |
| 271 | See cros_ec_rw for an example of this. |
| 272 | |
| 273 | |
| 274 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 275 | .. _etype_blob_phase: |
| 276 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 277 | Entry: blob-phase: Section that holds a phase binary |
| 278 | ---------------------------------------------------- |
| 279 | |
| 280 | This is a base class that should not normally be used directly. It is used |
| 281 | when converting a 'u-boot' entry automatically into a 'u-boot-expanded' |
| 282 | entry; similarly for SPL. |
| 283 | |
| 284 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 285 | |
| 286 | .. _etype_cbfs: |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 287 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 288 | Entry: cbfs: Coreboot Filesystem (CBFS) |
| 289 | --------------------------------------- |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 290 | |
| 291 | A CBFS provides a way to group files into a group. It has a simple directory |
| 292 | structure and allows the position of individual files to be set, since it is |
| 293 | designed to support execute-in-place in an x86 SPI-flash device. Where XIP |
| 294 | is not used, it supports compression and storing ELF files. |
| 295 | |
| 296 | CBFS is used by coreboot as its way of orgnanising SPI-flash contents. |
| 297 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 298 | The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:: |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 299 | |
| 300 | cbfs { |
| 301 | size = <0x100000>; |
| 302 | u-boot { |
| 303 | cbfs-type = "raw"; |
| 304 | }; |
| 305 | u-boot-dtb { |
| 306 | cbfs-type = "raw"; |
| 307 | }; |
| 308 | }; |
| 309 | |
| 310 | This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb. |
| 311 | Note that the size is required since binman does not support calculating it. |
| 312 | The contents of each entry is just what binman would normally provide if it |
| 313 | were not a CBFS node. A blob type can be used to import arbitrary files as |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 314 | with the second subnode below:: |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 315 | |
| 316 | cbfs { |
| 317 | size = <0x100000>; |
| 318 | u-boot { |
| 319 | cbfs-name = "BOOT"; |
| 320 | cbfs-type = "raw"; |
| 321 | }; |
| 322 | |
| 323 | dtb { |
| 324 | type = "blob"; |
| 325 | filename = "u-boot.dtb"; |
| 326 | cbfs-type = "raw"; |
| 327 | cbfs-compress = "lz4"; |
Simon Glass | c2f1aed | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 328 | cbfs-offset = <0x100000>; |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 329 | }; |
| 330 | }; |
| 331 | |
| 332 | This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and |
| 333 | u-boot.dtb (named "dtb") and compressed with the lz4 algorithm. |
| 334 | |
| 335 | |
| 336 | Properties supported in the top-level CBFS node: |
| 337 | |
| 338 | cbfs-arch: |
| 339 | Defaults to "x86", but you can specify the architecture if needed. |
| 340 | |
| 341 | |
| 342 | Properties supported in the CBFS entry subnodes: |
| 343 | |
| 344 | cbfs-name: |
| 345 | This is the name of the file created in CBFS. It defaults to the entry |
| 346 | name (which is the node name), but you can override it with this |
| 347 | property. |
| 348 | |
| 349 | cbfs-type: |
| 350 | This is the CBFS file type. The following are supported: |
| 351 | |
| 352 | raw: |
| 353 | This is a 'raw' file, although compression is supported. It can be |
| 354 | used to store any file in CBFS. |
| 355 | |
| 356 | stage: |
| 357 | This is an ELF file that has been loaded (i.e. mapped to memory), so |
| 358 | appears in the CBFS as a flat binary. The input file must be an ELF |
| 359 | image, for example this puts "u-boot" (the ELF image) into a 'stage' |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 360 | entry:: |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 361 | |
| 362 | cbfs { |
| 363 | size = <0x100000>; |
| 364 | u-boot-elf { |
| 365 | cbfs-name = "BOOT"; |
| 366 | cbfs-type = "stage"; |
| 367 | }; |
| 368 | }; |
| 369 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 370 | You can use your own ELF file with something like:: |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 371 | |
| 372 | cbfs { |
| 373 | size = <0x100000>; |
| 374 | something { |
| 375 | type = "blob"; |
| 376 | filename = "cbfs-stage.elf"; |
| 377 | cbfs-type = "stage"; |
| 378 | }; |
| 379 | }; |
| 380 | |
| 381 | As mentioned, the file is converted to a flat binary, so it is |
| 382 | equivalent to adding "u-boot.bin", for example, but with the load and |
| 383 | start addresses specified by the ELF. At present there is no option |
| 384 | to add a flat binary with a load/start address, similar to the |
| 385 | 'add-flat-binary' option in cbfstool. |
| 386 | |
Simon Glass | c2f1aed | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 387 | cbfs-offset: |
| 388 | This is the offset of the file's data within the CBFS. It is used to |
| 389 | specify where the file should be placed in cases where a fixed position |
| 390 | is needed. Typical uses are for code which is not relocatable and must |
| 391 | execute in-place from a particular address. This works because SPI flash |
| 392 | is generally mapped into memory on x86 devices. The file header is |
| 393 | placed before this offset so that the data start lines up exactly with |
| 394 | the chosen offset. If this property is not provided, then the file is |
| 395 | placed in the next available spot. |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 396 | |
| 397 | The current implementation supports only a subset of CBFS features. It does |
| 398 | not support other file types (e.g. payload), adding multiple files (like the |
| 399 | 'files' entry with a pattern supported by binman), putting files at a |
| 400 | particular offset in the CBFS and a few other things. |
| 401 | |
| 402 | Of course binman can create images containing multiple CBFSs, simply by |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 403 | defining these in the binman config:: |
Simon Glass | 1de3448 | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 404 | |
| 405 | |
| 406 | binman { |
| 407 | size = <0x800000>; |
| 408 | cbfs { |
| 409 | offset = <0x100000>; |
| 410 | size = <0x100000>; |
| 411 | u-boot { |
| 412 | cbfs-type = "raw"; |
| 413 | }; |
| 414 | u-boot-dtb { |
| 415 | cbfs-type = "raw"; |
| 416 | }; |
| 417 | }; |
| 418 | |
| 419 | cbfs2 { |
| 420 | offset = <0x700000>; |
| 421 | size = <0x100000>; |
| 422 | u-boot { |
| 423 | cbfs-type = "raw"; |
| 424 | }; |
| 425 | u-boot-dtb { |
| 426 | cbfs-type = "raw"; |
| 427 | }; |
| 428 | image { |
| 429 | type = "blob"; |
| 430 | filename = "image.jpg"; |
| 431 | }; |
| 432 | }; |
| 433 | }; |
| 434 | |
| 435 | This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB, |
| 436 | both of size 1MB. |
| 437 | |
| 438 | |
| 439 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 440 | .. _etype_collection: |
| 441 | |
Simon Glass | e191578 | 2021-03-21 18:24:31 +1300 | [diff] [blame] | 442 | Entry: collection: An entry which contains a collection of other entries |
| 443 | ------------------------------------------------------------------------ |
| 444 | |
| 445 | Properties / Entry arguments: |
| 446 | - content: List of phandles to entries to include |
| 447 | |
| 448 | This allows reusing the contents of other entries. The contents of the |
| 449 | listed entries are combined to form this entry. This serves as a useful |
| 450 | base class for entry types which need to process data from elsewhere in |
| 451 | the image, not necessarily child entries. |
| 452 | |
Simon Glass | bd5cd88 | 2022-08-13 11:40:50 -0600 | [diff] [blame] | 453 | The entries can generally be anywhere in the same image, even if they are in |
| 454 | a different section from this entry. |
| 455 | |
Simon Glass | e191578 | 2021-03-21 18:24:31 +1300 | [diff] [blame] | 456 | |
| 457 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 458 | .. _etype_cros_ec_rw: |
| 459 | |
Simon Glass | db168d4 | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 460 | Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image |
| 461 | -------------------------------------------------------------------------------- |
| 462 | |
| 463 | Properties / Entry arguments: |
| 464 | - cros-ec-rw-path: Filename containing the EC image |
| 465 | |
| 466 | This entry holds a Chromium OS EC (embedded controller) image, for use in |
| 467 | updating the EC on startup via software sync. |
| 468 | |
| 469 | |
| 470 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 471 | .. _etype_fdtmap: |
| 472 | |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 473 | Entry: fdtmap: An entry which contains an FDT map |
| 474 | ------------------------------------------------- |
| 475 | |
| 476 | Properties / Entry arguments: |
| 477 | None |
| 478 | |
| 479 | An FDT map is just a header followed by an FDT containing a list of all the |
Simon Glass | fb30e29 | 2019-07-20 12:23:51 -0600 | [diff] [blame] | 480 | entries in the image. The root node corresponds to the image node in the |
| 481 | original FDT, and an image-name property indicates the image name in that |
| 482 | original tree. |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 483 | |
| 484 | The header is the string _FDTMAP_ followed by 8 unused bytes. |
| 485 | |
| 486 | When used, this entry will be populated with an FDT map which reflects the |
| 487 | entries in the current image. Hierarchy is preserved, and all offsets and |
| 488 | sizes are included. |
| 489 | |
| 490 | Note that the -u option must be provided to ensure that binman updates the |
| 491 | FDT with the position of each entry. |
| 492 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 493 | Example output for a simple image with U-Boot and an FDT map:: |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 494 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 495 | / { |
| 496 | image-name = "binman"; |
| 497 | size = <0x00000112>; |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 498 | image-pos = <0x00000000>; |
| 499 | offset = <0x00000000>; |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 500 | u-boot { |
| 501 | size = <0x00000004>; |
| 502 | image-pos = <0x00000000>; |
| 503 | offset = <0x00000000>; |
| 504 | }; |
| 505 | fdtmap { |
| 506 | size = <0x0000010e>; |
| 507 | image-pos = <0x00000004>; |
| 508 | offset = <0x00000004>; |
| 509 | }; |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 510 | }; |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 511 | |
Simon Glass | fb30e29 | 2019-07-20 12:23:51 -0600 | [diff] [blame] | 512 | If allow-repack is used then 'orig-offset' and 'orig-size' properties are |
| 513 | added as necessary. See the binman README. |
| 514 | |
Simon Glass | 637958f | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 515 | When extracting files, an alternative 'fdt' format is available for fdtmaps. |
| 516 | Use `binman extract -F fdt ...` to use this. It will export a devicetree, |
| 517 | without the fdtmap header, so it can be viewed with `fdtdump`. |
Simon Glass | 0f62133 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 518 | |
| 519 | |
Simon Glass | 637958f | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 520 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 521 | .. _etype_files: |
| 522 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 523 | Entry: files: A set of files arranged in a section |
| 524 | -------------------------------------------------- |
Simon Glass | ac6328c | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 525 | |
| 526 | Properties / Entry arguments: |
| 527 | - pattern: Filename pattern to match the files to include |
Simon Glass | 51d02ad | 2020-10-26 17:40:07 -0600 | [diff] [blame] | 528 | - files-compress: Compression algorithm to use: |
Simon Glass | ac6328c | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 529 | none: No compression |
| 530 | lz4: Use lz4 compression (via 'lz4' command-line utility) |
Simon Glass | 3f093a3 | 2021-03-18 20:24:53 +1300 | [diff] [blame] | 531 | - files-align: Align each file to the given alignment |
Simon Glass | ac6328c | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 532 | |
| 533 | This entry reads a number of files and places each in a separate sub-entry |
| 534 | within this entry. To access these you need to enable device-tree updates |
| 535 | at run-time so you can obtain the file positions. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 536 | |
| 537 | |
Simon Glass | ac6328c | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 538 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 539 | .. _etype_fill: |
| 540 | |
Simon Glass | 53f5399 | 2018-07-17 13:25:40 -0600 | [diff] [blame] | 541 | Entry: fill: An entry which is filled to a particular byte value |
| 542 | ---------------------------------------------------------------- |
| 543 | |
| 544 | Properties / Entry arguments: |
| 545 | - fill-byte: Byte to use to fill the entry |
| 546 | |
| 547 | Note that the size property must be set since otherwise this entry does not |
| 548 | know how large it should be. |
| 549 | |
| 550 | You can often achieve the same effect using the pad-byte property of the |
| 551 | overall image, in that the space between entries will then be padded with |
| 552 | that byte. But this entry is sometimes useful for explicitly setting the |
| 553 | byte value of a region. |
| 554 | |
| 555 | |
Simon Glass | c7b010d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 556 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 557 | .. _etype_fit: |
| 558 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 559 | Entry: fit: Flat Image Tree (FIT) |
| 560 | --------------------------------- |
Simon Glass | 45d556d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 561 | |
| 562 | This calls mkimage to create a FIT (U-Boot Flat Image Tree) based on the |
| 563 | input provided. |
| 564 | |
| 565 | Nodes for the FIT should be written out in the binman configuration just as |
| 566 | they would be in a file passed to mkimage. |
| 567 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 568 | For example, this creates an image containing a FIT with U-Boot SPL:: |
Simon Glass | 45d556d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 569 | |
| 570 | binman { |
| 571 | fit { |
| 572 | description = "Test FIT"; |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 573 | fit,fdt-list = "of-list"; |
Simon Glass | 45d556d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 574 | |
| 575 | images { |
| 576 | kernel@1 { |
| 577 | description = "SPL"; |
| 578 | os = "u-boot"; |
| 579 | type = "rkspi"; |
| 580 | arch = "arm"; |
| 581 | compression = "none"; |
| 582 | load = <0>; |
| 583 | entry = <0>; |
| 584 | |
| 585 | u-boot-spl { |
| 586 | }; |
| 587 | }; |
| 588 | }; |
| 589 | }; |
| 590 | }; |
| 591 | |
Simon Glass | 912339f | 2022-02-08 11:50:03 -0700 | [diff] [blame] | 592 | More complex setups can be created, with generated nodes, as described |
| 593 | below. |
| 594 | |
| 595 | Properties (in the 'fit' node itself) |
| 596 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 597 | |
| 598 | Special properties have a `fit,` prefix, indicating that they should be |
| 599 | processed but not included in the final FIT. |
| 600 | |
| 601 | The top-level 'fit' node supports the following special properties: |
| 602 | |
| 603 | fit,external-offset |
| 604 | Indicates that the contents of the FIT are external and provides the |
| 605 | external offset. This is passed to mkimage via the -E and -p flags. |
| 606 | |
Jonas Karlman | c59ea89 | 2023-01-21 19:01:39 +0000 | [diff] [blame] | 607 | fit,align |
| 608 | Indicates what alignment to use for the FIT and its external data, |
| 609 | and provides the alignment to use. This is passed to mkimage via |
| 610 | the -B flag. |
| 611 | |
Simon Glass | 912339f | 2022-02-08 11:50:03 -0700 | [diff] [blame] | 612 | fit,fdt-list |
| 613 | Indicates the entry argument which provides the list of device tree |
| 614 | files for the gen-fdt-nodes operation (as below). This is often |
| 615 | `of-list` meaning that `-a of-list="dtb1 dtb2..."` should be passed |
| 616 | to binman. |
| 617 | |
Simon Glass | 2d94c42 | 2023-07-18 07:23:59 -0600 | [diff] [blame] | 618 | fit,fdt-list-val |
| 619 | As an alternative to fit,fdt-list the list of device tree files |
| 620 | can be provided in this property as a string list, e.g.:: |
| 621 | |
| 622 | fit,fdt-list-val = "dtb1", "dtb2"; |
| 623 | |
Simon Glass | 912339f | 2022-02-08 11:50:03 -0700 | [diff] [blame] | 624 | Substitutions |
| 625 | ~~~~~~~~~~~~~ |
| 626 | |
| 627 | Node names and property values support a basic string-substitution feature. |
| 628 | Available substitutions for '@' nodes (and property values) are: |
| 629 | |
| 630 | SEQ: |
| 631 | Sequence number of the generated fdt (1, 2, ...) |
| 632 | NAME |
| 633 | Name of the dtb as provided (i.e. without adding '.dtb') |
| 634 | |
| 635 | The `default` property, if present, will be automatically set to the name |
| 636 | if of configuration whose devicetree matches the `default-dt` entry |
| 637 | argument, e.g. with `-a default-dt=sun50i-a64-pine64-lts`. |
| 638 | |
| 639 | Available substitutions for property values in these nodes are: |
| 640 | |
| 641 | DEFAULT-SEQ: |
| 642 | Sequence number of the default fdt, as provided by the 'default-dt' |
| 643 | entry argument |
| 644 | |
| 645 | Available operations |
| 646 | ~~~~~~~~~~~~~~~~~~~~ |
| 647 | |
| 648 | You can add an operation to an '@' node to indicate which operation is |
| 649 | required:: |
| 650 | |
| 651 | @fdt-SEQ { |
| 652 | fit,operation = "gen-fdt-nodes"; |
| 653 | ... |
| 654 | }; |
| 655 | |
| 656 | Available operations are: |
| 657 | |
| 658 | gen-fdt-nodes |
| 659 | Generate FDT nodes as above. This is the default if there is no |
| 660 | `fit,operation` property. |
| 661 | |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 662 | split-elf |
| 663 | Split an ELF file into a separate node for each segment. |
| 664 | |
Simon Glass | 912339f | 2022-02-08 11:50:03 -0700 | [diff] [blame] | 665 | Generating nodes from an FDT list (gen-fdt-nodes) |
| 666 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 667 | |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 668 | U-Boot supports creating fdt and config nodes automatically. To do this, |
Simon Glass | 9f1c6b9 | 2022-02-08 11:50:02 -0700 | [diff] [blame] | 669 | pass an `of-list` property (e.g. `-a of-list=file1 file2`). This tells |
| 670 | binman that you want to generates nodes for two files: `file1.dtb` and |
| 671 | `file2.dtb`. The `fit,fdt-list` property (see above) indicates that |
| 672 | `of-list` should be used. If the property is missing you will get an error. |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 673 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 674 | Then add a 'generator node', a node with a name starting with '@':: |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 675 | |
| 676 | images { |
| 677 | @fdt-SEQ { |
| 678 | description = "fdt-NAME"; |
| 679 | type = "flat_dt"; |
| 680 | compression = "none"; |
| 681 | }; |
| 682 | }; |
| 683 | |
Simon Glass | 9f1c6b9 | 2022-02-08 11:50:02 -0700 | [diff] [blame] | 684 | This tells binman to create nodes `fdt-1` and `fdt-2` for each of your two |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 685 | files. All the properties you specify will be included in the node. This |
| 686 | node acts like a template to generate the nodes. The generator node itself |
| 687 | does not appear in the output - it is replaced with what binman generates. |
Simon Glass | 9f1c6b9 | 2022-02-08 11:50:02 -0700 | [diff] [blame] | 688 | A 'data' property is created with the contents of the FDT file. |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 689 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 690 | You can create config nodes in a similar way:: |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 691 | |
| 692 | configurations { |
| 693 | default = "@config-DEFAULT-SEQ"; |
| 694 | @config-SEQ { |
| 695 | description = "NAME"; |
Samuel Holland | 91079ac | 2020-10-21 21:12:14 -0500 | [diff] [blame] | 696 | firmware = "atf"; |
| 697 | loadables = "uboot"; |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 698 | fdt = "fdt-SEQ"; |
| 699 | }; |
| 700 | }; |
| 701 | |
Simon Glass | 9f1c6b9 | 2022-02-08 11:50:02 -0700 | [diff] [blame] | 702 | This tells binman to create nodes `config-1` and `config-2`, i.e. a config |
| 703 | for each of your two files. |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 704 | |
Simon Glass | a435cd1 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 705 | Note that if no devicetree files are provided (with '-a of-list' as above) |
| 706 | then no nodes will be generated. |
| 707 | |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 708 | Generating nodes from an ELF file (split-elf) |
| 709 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 710 | |
| 711 | This uses the node as a template to generate multiple nodes. The following |
| 712 | special properties are available: |
| 713 | |
| 714 | split-elf |
| 715 | Split an ELF file into a separate node for each segment. This uses the |
| 716 | node as a template to generate multiple nodes. The following special |
| 717 | properties are available: |
| 718 | |
| 719 | fit,load |
| 720 | Generates a `load = <...>` property with the load address of the |
| 721 | segment |
| 722 | |
| 723 | fit,entry |
| 724 | Generates a `entry = <...>` property with the entry address of the |
| 725 | ELF. This is only produced for the first entry |
| 726 | |
| 727 | fit,data |
| 728 | Generates a `data = <...>` property with the contents of the segment |
| 729 | |
Jonas Karlman | 490f73c | 2023-01-21 19:02:12 +0000 | [diff] [blame] | 730 | fit,firmware |
| 731 | Generates a `firmware = <...>` property. Provides a list of possible |
| 732 | nodes to be used as the `firmware` property value. The first valid |
| 733 | node is picked as the firmware. Any remaining valid nodes is |
| 734 | prepended to the `loadable` property generated by `fit,loadables` |
| 735 | |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 736 | fit,loadables |
| 737 | Generates a `loadable = <...>` property with a list of the generated |
| 738 | nodes (including all nodes if this operation is used multiple times) |
| 739 | |
| 740 | |
| 741 | Here is an example showing ATF, TEE and a device tree all combined:: |
| 742 | |
| 743 | fit { |
| 744 | description = "test-desc"; |
| 745 | #address-cells = <1>; |
| 746 | fit,fdt-list = "of-list"; |
| 747 | |
| 748 | images { |
| 749 | u-boot { |
| 750 | description = "U-Boot (64-bit)"; |
| 751 | type = "standalone"; |
| 752 | os = "U-Boot"; |
| 753 | arch = "arm64"; |
| 754 | compression = "none"; |
Simon Glass | 72cc538 | 2022-10-20 18:22:39 -0600 | [diff] [blame] | 755 | load = <CONFIG_TEXT_BASE>; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 756 | u-boot-nodtb { |
| 757 | }; |
| 758 | }; |
| 759 | @fdt-SEQ { |
| 760 | description = "fdt-NAME.dtb"; |
| 761 | type = "flat_dt"; |
| 762 | compression = "none"; |
| 763 | }; |
| 764 | @atf-SEQ { |
| 765 | fit,operation = "split-elf"; |
| 766 | description = "ARM Trusted Firmware"; |
| 767 | type = "firmware"; |
| 768 | arch = "arm64"; |
| 769 | os = "arm-trusted-firmware"; |
| 770 | compression = "none"; |
| 771 | fit,load; |
| 772 | fit,entry; |
| 773 | fit,data; |
| 774 | |
| 775 | atf-bl31 { |
| 776 | }; |
Jonas Karlman | d2c7d90 | 2023-01-21 19:01:48 +0000 | [diff] [blame] | 777 | hash { |
| 778 | algo = "sha256"; |
| 779 | }; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 780 | }; |
| 781 | |
| 782 | @tee-SEQ { |
| 783 | fit,operation = "split-elf"; |
| 784 | description = "TEE"; |
| 785 | type = "tee"; |
| 786 | arch = "arm64"; |
| 787 | os = "tee"; |
| 788 | compression = "none"; |
| 789 | fit,load; |
| 790 | fit,entry; |
| 791 | fit,data; |
| 792 | |
| 793 | tee-os { |
| 794 | }; |
Jonas Karlman | d2c7d90 | 2023-01-21 19:01:48 +0000 | [diff] [blame] | 795 | hash { |
| 796 | algo = "sha256"; |
| 797 | }; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 798 | }; |
| 799 | }; |
| 800 | |
| 801 | configurations { |
| 802 | default = "@config-DEFAULT-SEQ"; |
| 803 | @config-SEQ { |
| 804 | description = "conf-NAME.dtb"; |
| 805 | fdt = "fdt-SEQ"; |
Jonas Karlman | 490f73c | 2023-01-21 19:02:12 +0000 | [diff] [blame] | 806 | fit,firmware = "atf-1", "u-boot"; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 807 | fit,loadables; |
| 808 | }; |
| 809 | }; |
| 810 | }; |
| 811 | |
| 812 | If ATF-BL31 is available, this generates a node for each segment in the |
| 813 | ELF file, for example:: |
| 814 | |
| 815 | images { |
| 816 | atf-1 { |
| 817 | data = <...contents of first segment...>; |
| 818 | data-offset = <0x00000000>; |
| 819 | entry = <0x00040000>; |
| 820 | load = <0x00040000>; |
| 821 | compression = "none"; |
| 822 | os = "arm-trusted-firmware"; |
| 823 | arch = "arm64"; |
| 824 | type = "firmware"; |
| 825 | description = "ARM Trusted Firmware"; |
Jonas Karlman | d2c7d90 | 2023-01-21 19:01:48 +0000 | [diff] [blame] | 826 | hash { |
| 827 | algo = "sha256"; |
| 828 | value = <...hash of first segment...>; |
| 829 | }; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 830 | }; |
| 831 | atf-2 { |
| 832 | data = <...contents of second segment...>; |
| 833 | load = <0xff3b0000>; |
| 834 | compression = "none"; |
| 835 | os = "arm-trusted-firmware"; |
| 836 | arch = "arm64"; |
| 837 | type = "firmware"; |
| 838 | description = "ARM Trusted Firmware"; |
Jonas Karlman | d2c7d90 | 2023-01-21 19:01:48 +0000 | [diff] [blame] | 839 | hash { |
| 840 | algo = "sha256"; |
| 841 | value = <...hash of second segment...>; |
| 842 | }; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 843 | }; |
| 844 | }; |
| 845 | |
| 846 | The same applies for OP-TEE if that is available. |
| 847 | |
| 848 | If each binary is not available, the relevant template node (@atf-SEQ or |
| 849 | @tee-SEQ) is removed from the output. |
| 850 | |
| 851 | This also generates a `config-xxx` node for each device tree in `of-list`. |
| 852 | Note that the U-Boot build system uses `-a of-list=$(CONFIG_OF_LIST)` |
| 853 | so you can use `CONFIG_OF_LIST` to define that list. In this example it is |
| 854 | set up for `firefly-rk3399` with a single device tree and the default set |
| 855 | with `-a default-dt=$(CONFIG_DEFAULT_DEVICE_TREE)`, so the resulting output |
| 856 | is:: |
| 857 | |
| 858 | configurations { |
| 859 | default = "config-1"; |
| 860 | config-1 { |
Jonas Karlman | 490f73c | 2023-01-21 19:02:12 +0000 | [diff] [blame] | 861 | loadables = "u-boot", "atf-2", "atf-3", "tee-1", "tee-2"; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 862 | description = "rk3399-firefly.dtb"; |
| 863 | fdt = "fdt-1"; |
Jonas Karlman | 490f73c | 2023-01-21 19:02:12 +0000 | [diff] [blame] | 864 | firmware = "atf-1"; |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 865 | }; |
| 866 | }; |
| 867 | |
Jonas Karlman | 490f73c | 2023-01-21 19:02:12 +0000 | [diff] [blame] | 868 | U-Boot SPL can then load the firmware (ATF) and all the loadables (U-Boot |
| 869 | proper, ATF and TEE), then proceed with the boot. |
Simon Glass | 5f42342 | 2022-03-05 20:19:12 -0700 | [diff] [blame] | 870 | |
Simon Glass | 45d556d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 871 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 872 | |
| 873 | .. _etype_fmap: |
Simon Glass | 45d556d | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 874 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 875 | Entry: fmap: An entry which contains an Fmap section |
| 876 | ---------------------------------------------------- |
| 877 | |
| 878 | Properties / Entry arguments: |
| 879 | None |
| 880 | |
| 881 | FMAP is a simple format used by flashrom, an open-source utility for |
| 882 | reading and writing the SPI flash, typically on x86 CPUs. The format |
| 883 | provides flashrom with a list of areas, so it knows what it in the flash. |
| 884 | It can then read or write just a single area, instead of the whole flash. |
| 885 | |
| 886 | The format is defined by the flashrom project, in the file lib/fmap.h - |
| 887 | see www.flashrom.org/Flashrom for more information. |
| 888 | |
| 889 | When used, this entry will be populated with an FMAP which reflects the |
| 890 | entries in the current image. Note that any hierarchy is squashed, since |
Simon Glass | b1d414c | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 891 | FMAP does not support this. Sections are represented as an area appearing |
| 892 | before its contents, so that it is possible to reconstruct the hierarchy |
| 893 | from the FMAP by using the offset information. This convention does not |
| 894 | seem to be documented, but is used in Chromium OS. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 895 | |
Simon Glass | cda991e | 2023-02-12 17:11:15 -0700 | [diff] [blame] | 896 | To mark an area as preserved, use the normal 'preserved' flag in the entry. |
| 897 | This will result in the corresponding FMAP area having the |
| 898 | FMAP_AREA_PRESERVE flag. This flag does not automatically propagate down to |
| 899 | child entries. |
| 900 | |
Simon Glass | b1d414c | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 901 | CBFS entries appear as a single entry, i.e. the sub-entries are ignored. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 902 | |
| 903 | |
Simon Glass | b1d414c | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 904 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 905 | .. _etype_gbb: |
| 906 | |
Simon Glass | c1ae83c | 2018-07-17 13:25:44 -0600 | [diff] [blame] | 907 | Entry: gbb: An entry which contains a Chromium OS Google Binary Block |
| 908 | --------------------------------------------------------------------- |
| 909 | |
| 910 | Properties / Entry arguments: |
| 911 | - hardware-id: Hardware ID to use for this build (a string) |
| 912 | - keydir: Directory containing the public keys to use |
| 913 | - bmpblk: Filename containing images used by recovery |
| 914 | |
| 915 | Chromium OS uses a GBB to store various pieces of information, in particular |
| 916 | the root and recovery keys that are used to verify the boot process. Some |
| 917 | more details are here: |
| 918 | |
| 919 | https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts |
| 920 | |
| 921 | but note that the page dates from 2013 so is quite out of date. See |
| 922 | README.chromium for how to obtain the required keys and tools. |
| 923 | |
| 924 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 925 | |
| 926 | .. _etype_image_header: |
Simon Glass | c1ae83c | 2018-07-17 13:25:44 -0600 | [diff] [blame] | 927 | |
Simon Glass | cec34ba | 2019-07-08 14:25:28 -0600 | [diff] [blame] | 928 | Entry: image-header: An entry which contains a pointer to the FDT map |
| 929 | --------------------------------------------------------------------- |
| 930 | |
| 931 | Properties / Entry arguments: |
| 932 | location: Location of header ("start" or "end" of image). This is |
| 933 | optional. If omitted then the entry must have an offset property. |
| 934 | |
| 935 | This adds an 8-byte entry to the start or end of the image, pointing to the |
| 936 | location of the FDT map. The format is a magic number followed by an offset |
| 937 | from the start or end of the image, in twos-compliment format. |
| 938 | |
| 939 | This entry must be in the top-level part of the image. |
| 940 | |
| 941 | NOTE: If the location is at the start/end, you will probably need to specify |
| 942 | sort-by-offset for the image, unless you actually put the image header |
| 943 | first/last in the entry list. |
| 944 | |
| 945 | |
| 946 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 947 | .. _etype_intel_cmc: |
| 948 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 949 | Entry: intel-cmc: Intel Chipset Micro Code (CMC) file |
| 950 | ----------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 951 | |
| 952 | Properties / Entry arguments: |
| 953 | - filename: Filename of file to read into entry |
| 954 | |
| 955 | This file contains microcode for some devices in a special format. An |
| 956 | example filename is 'Microcode/C0_22211.BIN'. |
| 957 | |
| 958 | See README.x86 for information about x86 binary blobs. |
| 959 | |
| 960 | |
| 961 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 962 | .. _etype_intel_descriptor: |
| 963 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 964 | Entry: intel-descriptor: Intel flash descriptor block (4KB) |
| 965 | ----------------------------------------------------------- |
| 966 | |
| 967 | Properties / Entry arguments: |
| 968 | filename: Filename of file containing the descriptor. This is typically |
| 969 | a 4KB binary file, sometimes called 'descriptor.bin' |
| 970 | |
| 971 | This entry is placed at the start of flash and provides information about |
| 972 | the SPI flash regions. In particular it provides the base address and |
| 973 | size of the ME (Management Engine) region, allowing us to place the ME |
| 974 | binary in the right place. |
| 975 | |
| 976 | With this entry in your image, the position of the 'intel-me' entry will be |
| 977 | fixed in the image, which avoids you needed to specify an offset for that |
| 978 | region. This is useful, because it is not possible to change the position |
| 979 | of the ME region without updating the descriptor. |
| 980 | |
| 981 | See README.x86 for information about x86 binary blobs. |
| 982 | |
| 983 | |
| 984 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 985 | .. _etype_intel_fit: |
| 986 | |
Simon Glass | 232f90c | 2019-08-24 07:22:50 -0600 | [diff] [blame] | 987 | Entry: intel-fit: Intel Firmware Image Table (FIT) |
| 988 | -------------------------------------------------- |
| 989 | |
| 990 | This entry contains a dummy FIT as required by recent Intel CPUs. The FIT |
| 991 | contains information about the firmware and microcode available in the |
| 992 | image. |
| 993 | |
| 994 | At present binman only supports a basic FIT with no microcode. |
| 995 | |
| 996 | |
| 997 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 998 | .. _etype_intel_fit_ptr: |
| 999 | |
Simon Glass | 232f90c | 2019-08-24 07:22:50 -0600 | [diff] [blame] | 1000 | Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer |
| 1001 | -------------------------------------------------------------- |
| 1002 | |
| 1003 | This entry contains a pointer to the FIT. It is required to be at address |
| 1004 | 0xffffffc0 in the image. |
| 1005 | |
| 1006 | |
| 1007 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1008 | .. _etype_intel_fsp: |
| 1009 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1010 | Entry: intel-fsp: Intel Firmware Support Package (FSP) file |
| 1011 | ----------------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1012 | |
| 1013 | Properties / Entry arguments: |
| 1014 | - filename: Filename of file to read into entry |
| 1015 | |
| 1016 | This file contains binary blobs which are used on some devices to make the |
| 1017 | platform work. U-Boot executes this code since it is not possible to set up |
| 1018 | the hardware using U-Boot open-source code. Documentation is typically not |
| 1019 | available in sufficient detail to allow this. |
| 1020 | |
| 1021 | An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd' |
| 1022 | |
| 1023 | See README.x86 for information about x86 binary blobs. |
| 1024 | |
| 1025 | |
| 1026 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1027 | .. _etype_intel_fsp_m: |
| 1028 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1029 | Entry: intel-fsp-m: Intel Firmware Support Package (FSP) memory init |
| 1030 | -------------------------------------------------------------------- |
Simon Glass | ba7985d | 2019-08-24 07:23:07 -0600 | [diff] [blame] | 1031 | |
| 1032 | Properties / Entry arguments: |
| 1033 | - filename: Filename of file to read into entry |
| 1034 | |
| 1035 | This file contains a binary blob which is used on some devices to set up |
| 1036 | SDRAM. U-Boot executes this code in SPL so that it can make full use of |
| 1037 | memory. Documentation is typically not available in sufficient detail to |
| 1038 | allow U-Boot do this this itself.. |
| 1039 | |
| 1040 | An example filename is 'fsp_m.bin' |
| 1041 | |
| 1042 | See README.x86 for information about x86 binary blobs. |
| 1043 | |
| 1044 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1045 | |
| 1046 | .. _etype_intel_fsp_s: |
Simon Glass | ba7985d | 2019-08-24 07:23:07 -0600 | [diff] [blame] | 1047 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1048 | Entry: intel-fsp-s: Intel Firmware Support Package (FSP) silicon init |
| 1049 | --------------------------------------------------------------------- |
Simon Glass | 4d9086d | 2019-10-20 21:31:35 -0600 | [diff] [blame] | 1050 | |
| 1051 | Properties / Entry arguments: |
| 1052 | - filename: Filename of file to read into entry |
| 1053 | |
| 1054 | This file contains a binary blob which is used on some devices to set up |
| 1055 | the silicon. U-Boot executes this code in U-Boot proper after SDRAM is |
| 1056 | running, so that it can make full use of memory. Documentation is typically |
| 1057 | not available in sufficient detail to allow U-Boot do this this itself. |
| 1058 | |
| 1059 | An example filename is 'fsp_s.bin' |
| 1060 | |
| 1061 | See README.x86 for information about x86 binary blobs. |
| 1062 | |
| 1063 | |
| 1064 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1065 | .. _etype_intel_fsp_t: |
| 1066 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1067 | Entry: intel-fsp-t: Intel Firmware Support Package (FSP) temp ram init |
| 1068 | ---------------------------------------------------------------------- |
Simon Glass | 9ea87b2 | 2019-10-20 21:31:36 -0600 | [diff] [blame] | 1069 | |
| 1070 | Properties / Entry arguments: |
| 1071 | - filename: Filename of file to read into entry |
| 1072 | |
| 1073 | This file contains a binary blob which is used on some devices to set up |
| 1074 | temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so |
| 1075 | that it has access to memory for its stack and initial storage. |
| 1076 | |
| 1077 | An example filename is 'fsp_t.bin' |
| 1078 | |
| 1079 | See README.x86 for information about x86 binary blobs. |
| 1080 | |
| 1081 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1082 | |
| 1083 | .. _etype_intel_ifwi: |
Simon Glass | 9ea87b2 | 2019-10-20 21:31:36 -0600 | [diff] [blame] | 1084 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1085 | Entry: intel-ifwi: Intel Integrated Firmware Image (IFWI) file |
| 1086 | -------------------------------------------------------------- |
Simon Glass | c2f1aed | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 1087 | |
| 1088 | Properties / Entry arguments: |
| 1089 | - filename: Filename of file to read into entry. This is either the |
| 1090 | IFWI file itself, or a file that can be converted into one using a |
| 1091 | tool |
| 1092 | - convert-fit: If present this indicates that the ifwitool should be |
| 1093 | used to convert the provided file into a IFWI. |
| 1094 | |
| 1095 | This file contains code and data used by the SoC that is required to make |
| 1096 | it work. It includes U-Boot TPL, microcode, things related to the CSE |
| 1097 | (Converged Security Engine, the microcontroller that loads all the firmware) |
| 1098 | and other items beyond the wit of man. |
| 1099 | |
| 1100 | A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a |
| 1101 | file that will be converted to an IFWI. |
| 1102 | |
| 1103 | The position of this entry is generally set by the intel-descriptor entry. |
| 1104 | |
| 1105 | The contents of the IFWI are specified by the subnodes of the IFWI node. |
| 1106 | Each subnode describes an entry which is placed into the IFWFI with a given |
| 1107 | sub-partition (and optional entry name). |
| 1108 | |
Simon Glass | 8a5e249 | 2019-08-24 07:22:47 -0600 | [diff] [blame] | 1109 | Properties for subnodes: |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1110 | - ifwi-subpart: sub-parition to put this entry into, e.g. "IBBP" |
| 1111 | - ifwi-entry: entry name t use, e.g. "IBBL" |
| 1112 | - ifwi-replace: if present, indicates that the item should be replaced |
| 1113 | in the IFWI. Otherwise it is added. |
Simon Glass | 8a5e249 | 2019-08-24 07:22:47 -0600 | [diff] [blame] | 1114 | |
Simon Glass | c2f1aed | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 1115 | See README.x86 for information about x86 binary blobs. |
| 1116 | |
| 1117 | |
| 1118 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1119 | .. _etype_intel_me: |
| 1120 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1121 | Entry: intel-me: Intel Management Engine (ME) file |
| 1122 | -------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1123 | |
| 1124 | Properties / Entry arguments: |
| 1125 | - filename: Filename of file to read into entry |
| 1126 | |
| 1127 | This file contains code used by the SoC that is required to make it work. |
| 1128 | The Management Engine is like a background task that runs things that are |
Thomas Hebb | fd37f24 | 2019-11-13 18:18:03 -0800 | [diff] [blame] | 1129 | not clearly documented, but may include keyboard, display and network |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1130 | access. For platform that use ME it is not possible to disable it. U-Boot |
| 1131 | does not directly execute code in the ME binary. |
| 1132 | |
| 1133 | A typical filename is 'me.bin'. |
| 1134 | |
Simon Glass | c4056b8 | 2019-07-08 13:18:38 -0600 | [diff] [blame] | 1135 | The position of this entry is generally set by the intel-descriptor entry. |
| 1136 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1137 | See README.x86 for information about x86 binary blobs. |
| 1138 | |
| 1139 | |
| 1140 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1141 | .. _etype_intel_mrc: |
| 1142 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1143 | Entry: intel-mrc: Intel Memory Reference Code (MRC) file |
| 1144 | -------------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1145 | |
| 1146 | Properties / Entry arguments: |
| 1147 | - filename: Filename of file to read into entry |
| 1148 | |
| 1149 | This file contains code for setting up the SDRAM on some Intel systems. This |
| 1150 | is executed by U-Boot when needed early during startup. A typical filename |
| 1151 | is 'mrc.bin'. |
| 1152 | |
| 1153 | See README.x86 for information about x86 binary blobs. |
| 1154 | |
| 1155 | |
| 1156 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1157 | .. _etype_intel_refcode: |
| 1158 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1159 | Entry: intel-refcode: Intel Reference Code file |
| 1160 | ----------------------------------------------- |
Simon Glass | 17b84eb | 2019-05-17 22:00:53 -0600 | [diff] [blame] | 1161 | |
| 1162 | Properties / Entry arguments: |
| 1163 | - filename: Filename of file to read into entry |
| 1164 | |
| 1165 | This file contains code for setting up the platform on some Intel systems. |
| 1166 | This is executed by U-Boot when needed early during startup. A typical |
| 1167 | filename is 'refcode.bin'. |
| 1168 | |
| 1169 | See README.x86 for information about x86 binary blobs. |
| 1170 | |
| 1171 | |
| 1172 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1173 | .. _etype_intel_vbt: |
| 1174 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1175 | Entry: intel-vbt: Intel Video BIOS Table (VBT) file |
| 1176 | --------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1177 | |
| 1178 | Properties / Entry arguments: |
| 1179 | - filename: Filename of file to read into entry |
| 1180 | |
| 1181 | This file contains code that sets up the integrated graphics subsystem on |
| 1182 | some Intel SoCs. U-Boot executes this when the display is started up. |
| 1183 | |
| 1184 | See README.x86 for information about Intel binary blobs. |
| 1185 | |
| 1186 | |
| 1187 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1188 | .. _etype_intel_vga: |
| 1189 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1190 | Entry: intel-vga: Intel Video Graphics Adaptor (VGA) file |
| 1191 | --------------------------------------------------------- |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1192 | |
| 1193 | Properties / Entry arguments: |
| 1194 | - filename: Filename of file to read into entry |
| 1195 | |
| 1196 | This file contains code that sets up the integrated graphics subsystem on |
| 1197 | some Intel SoCs. U-Boot executes this when the display is started up. |
| 1198 | |
| 1199 | This is similar to the VBT file but in a different format. |
| 1200 | |
| 1201 | See README.x86 for information about Intel binary blobs. |
| 1202 | |
| 1203 | |
| 1204 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1205 | .. _etype_mkimage: |
| 1206 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1207 | Entry: mkimage: Binary produced by mkimage |
| 1208 | ------------------------------------------ |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1209 | |
| 1210 | Properties / Entry arguments: |
Simon Glass | 42074dc | 2022-08-13 11:40:47 -0600 | [diff] [blame] | 1211 | - args: Arguments to pass |
Simon Glass | 8fbca77 | 2022-08-13 11:40:48 -0600 | [diff] [blame] | 1212 | - data-to-imagename: Indicates that the -d data should be passed in as |
| 1213 | the image name also (-n) |
Quentin Schulz | 9b5c648 | 2022-09-02 15:10:48 +0200 | [diff] [blame] | 1214 | - multiple-data-files: boolean to tell binman to pass all files as |
| 1215 | datafiles to mkimage instead of creating a temporary file the result |
| 1216 | of datafiles concatenation |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1217 | - filename: filename of output binary generated by mkimage |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1218 | |
Simon Glass | 42074dc | 2022-08-13 11:40:47 -0600 | [diff] [blame] | 1219 | The data passed to mkimage via the -d flag is collected from subnodes of the |
| 1220 | mkimage node, e.g.:: |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1221 | |
| 1222 | mkimage { |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1223 | filename = "imximage.bin"; |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1224 | args = "-n test -T imximage"; |
| 1225 | |
| 1226 | u-boot-spl { |
| 1227 | }; |
| 1228 | }; |
| 1229 | |
Simon Glass | 42074dc | 2022-08-13 11:40:47 -0600 | [diff] [blame] | 1230 | This calls mkimage to create an imximage with `u-boot-spl.bin` as the data |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1231 | file, with mkimage being called like this:: |
Simon Glass | 42074dc | 2022-08-13 11:40:47 -0600 | [diff] [blame] | 1232 | |
| 1233 | mkimage -d <data_file> -n test -T imximage <output_file> |
| 1234 | |
| 1235 | The output from mkimage then becomes part of the image produced by |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1236 | binman but also is written into `imximage.bin` file. If you need to put |
| 1237 | multiple things in the data file, you can use a section, or just multiple |
| 1238 | subnodes like this:: |
Simon Glass | 42074dc | 2022-08-13 11:40:47 -0600 | [diff] [blame] | 1239 | |
| 1240 | mkimage { |
| 1241 | args = "-n test -T imximage"; |
| 1242 | |
| 1243 | u-boot-spl { |
| 1244 | }; |
| 1245 | |
| 1246 | u-boot-tpl { |
| 1247 | }; |
| 1248 | }; |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1249 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1250 | Note that binman places the contents (here SPL and TPL) into a single file |
| 1251 | and passes that to mkimage using the -d option. |
| 1252 | |
Quentin Schulz | 9b5c648 | 2022-09-02 15:10:48 +0200 | [diff] [blame] | 1253 | To pass all datafiles untouched to mkimage:: |
| 1254 | |
| 1255 | mkimage { |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1256 | args = "-n rk3399 -T rkspi"; |
| 1257 | multiple-data-files; |
Quentin Schulz | 9b5c648 | 2022-09-02 15:10:48 +0200 | [diff] [blame] | 1258 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1259 | u-boot-tpl { |
| 1260 | }; |
Quentin Schulz | 9b5c648 | 2022-09-02 15:10:48 +0200 | [diff] [blame] | 1261 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1262 | u-boot-spl { |
| 1263 | }; |
Quentin Schulz | 9b5c648 | 2022-09-02 15:10:48 +0200 | [diff] [blame] | 1264 | }; |
| 1265 | |
| 1266 | This calls mkimage to create a Rockchip RK3399-specific first stage |
| 1267 | bootloader, made of TPL+SPL. Since this first stage bootloader requires to |
| 1268 | align the TPL and SPL but also some weird hacks that is handled by mkimage |
| 1269 | directly, binman is told to not perform the concatenation of datafiles prior |
| 1270 | to passing the data to mkimage. |
| 1271 | |
Simon Glass | 948dd3a | 2022-02-08 11:49:58 -0700 | [diff] [blame] | 1272 | To use CONFIG options in the arguments, use a string list instead, as in |
| 1273 | this example which also produces four arguments:: |
| 1274 | |
| 1275 | mkimage { |
| 1276 | args = "-n", CONFIG_SYS_SOC, "-T imximage"; |
| 1277 | |
| 1278 | u-boot-spl { |
| 1279 | }; |
| 1280 | }; |
| 1281 | |
Simon Glass | 8fbca77 | 2022-08-13 11:40:48 -0600 | [diff] [blame] | 1282 | If you need to pass the input data in with the -n argument as well, then use |
| 1283 | the 'data-to-imagename' property:: |
| 1284 | |
| 1285 | mkimage { |
| 1286 | args = "-T imximage"; |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1287 | data-to-imagename; |
Simon Glass | 8fbca77 | 2022-08-13 11:40:48 -0600 | [diff] [blame] | 1288 | |
| 1289 | u-boot-spl { |
| 1290 | }; |
| 1291 | }; |
| 1292 | |
| 1293 | That will pass the data to mkimage both as the data file (with -d) and as |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1294 | the image name (with -n). In both cases, a filename is passed as the |
| 1295 | argument, with the actual data being in that file. |
Simon Glass | 948dd3a | 2022-02-08 11:49:58 -0700 | [diff] [blame] | 1296 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1297 | If need to pass different data in with -n, then use an `imagename` subnode:: |
Simon Glass | b166975 | 2022-08-13 11:40:49 -0600 | [diff] [blame] | 1298 | |
| 1299 | mkimage { |
| 1300 | args = "-T imximage"; |
| 1301 | |
| 1302 | imagename { |
| 1303 | blob { |
| 1304 | filename = "spl/u-boot-spl.cfgout" |
| 1305 | }; |
| 1306 | }; |
| 1307 | |
| 1308 | u-boot-spl { |
| 1309 | }; |
| 1310 | }; |
| 1311 | |
| 1312 | This will pass in u-boot-spl as the input data and the .cfgout file as the |
| 1313 | -n data. |
| 1314 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1315 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1316 | |
Simon Glass | a4948b2 | 2023-01-11 16:10:14 -0700 | [diff] [blame] | 1317 | .. _etype_null: |
| 1318 | |
| 1319 | Entry: null: An entry which has no contents of its own |
| 1320 | ------------------------------------------------------ |
| 1321 | |
| 1322 | Note that the size property must be set since otherwise this entry does not |
| 1323 | know how large it should be. |
| 1324 | |
| 1325 | The contents are set by the containing section, e.g. the section's pad |
| 1326 | byte. |
| 1327 | |
| 1328 | |
| 1329 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1330 | .. _etype_opensbi: |
Simon Glass | 48f3aad | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 1331 | |
Bin Meng | c0b1574 | 2021-05-10 20:23:33 +0800 | [diff] [blame] | 1332 | Entry: opensbi: RISC-V OpenSBI fw_dynamic blob |
| 1333 | ---------------------------------------------- |
| 1334 | |
| 1335 | Properties / Entry arguments: |
| 1336 | - opensbi-path: Filename of file to read into entry. This is typically |
| 1337 | called fw_dynamic.bin |
| 1338 | |
| 1339 | This entry holds the run-time firmware, typically started by U-Boot SPL. |
| 1340 | See the U-Boot README for your architecture or board for how to use it. See |
| 1341 | https://github.com/riscv/opensbi for more information about OpenSBI. |
| 1342 | |
| 1343 | |
| 1344 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1345 | .. _etype_powerpc_mpc85xx_bootpg_resetvec: |
| 1346 | |
Jagdish Gediya | 311d484 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 1347 | Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot |
| 1348 | ----------------------------------------------------------------------------------------- |
| 1349 | |
| 1350 | Properties / Entry arguments: |
| 1351 | - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin') |
| 1352 | |
Thomas Hebb | fd37f24 | 2019-11-13 18:18:03 -0800 | [diff] [blame] | 1353 | This entry is valid for PowerPC mpc85xx cpus. This entry holds |
Jagdish Gediya | 311d484 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 1354 | 'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be |
| 1355 | placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'. |
| 1356 | |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1357 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1358 | |
| 1359 | .. _etype_pre_load: |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1360 | |
Philippe Reynes | ebe96cb | 2022-03-28 22:57:04 +0200 | [diff] [blame] | 1361 | Entry: pre-load: Pre load image header |
| 1362 | -------------------------------------- |
| 1363 | |
| 1364 | Properties / Entry arguments: |
Simon Glass | 9f57158 | 2022-08-13 11:40:43 -0600 | [diff] [blame] | 1365 | - pre-load-key-path: Path of the directory that store key (provided by |
| 1366 | the environment variable PRE_LOAD_KEY_PATH) |
Philippe Reynes | ebe96cb | 2022-03-28 22:57:04 +0200 | [diff] [blame] | 1367 | - content: List of phandles to entries to sign |
| 1368 | - algo-name: Hash and signature algo to use for the signature |
| 1369 | - padding-name: Name of the padding (pkcs-1.5 or pss) |
| 1370 | - key-name: Filename of the private key to sign |
| 1371 | - header-size: Total size of the header |
| 1372 | - version: Version of the header |
| 1373 | |
| 1374 | This entry creates a pre-load header that contains a global |
| 1375 | image signature. |
| 1376 | |
| 1377 | For example, this creates an image with a pre-load header and a binary:: |
| 1378 | |
| 1379 | binman { |
| 1380 | image2 { |
| 1381 | filename = "sandbox.bin"; |
| 1382 | |
| 1383 | pre-load { |
| 1384 | content = <&image>; |
| 1385 | algo-name = "sha256,rsa2048"; |
| 1386 | padding-name = "pss"; |
| 1387 | key-name = "private.pem"; |
| 1388 | header-size = <4096>; |
| 1389 | version = <1>; |
| 1390 | }; |
| 1391 | |
| 1392 | image: blob-ext { |
| 1393 | filename = "sandbox.itb"; |
| 1394 | }; |
| 1395 | }; |
| 1396 | }; |
| 1397 | |
| 1398 | |
| 1399 | |
Jonas Karlman | 3530549 | 2023-02-25 19:01:33 +0000 | [diff] [blame] | 1400 | .. _etype_rockchip_tpl: |
| 1401 | |
| 1402 | Entry: rockchip-tpl: Rockchip TPL binary |
| 1403 | ---------------------------------------- |
| 1404 | |
| 1405 | Properties / Entry arguments: |
| 1406 | - rockchip-tpl-path: Filename of file to read into the entry, |
| 1407 | typically <soc>_ddr_<version>.bin |
| 1408 | |
| 1409 | This entry holds an external TPL binary used by some Rockchip SoCs |
| 1410 | instead of normal U-Boot TPL, typically to initialize DRAM. |
| 1411 | |
| 1412 | |
| 1413 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1414 | .. _etype_scp: |
| 1415 | |
Simon Glass | 8911fa1 | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 1416 | Entry: scp: System Control Processor (SCP) firmware blob |
| 1417 | -------------------------------------------------------- |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1418 | |
| 1419 | Properties / Entry arguments: |
| 1420 | - scp-path: Filename of file to read into the entry, typically scp.bin |
| 1421 | |
| 1422 | This entry holds firmware for an external platform-specific coprocessor. |
Jagdish Gediya | 311d484 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 1423 | |
| 1424 | |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1425 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1426 | .. _etype_section: |
| 1427 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1428 | Entry: section: Entry that contains other entries |
| 1429 | ------------------------------------------------- |
| 1430 | |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1431 | A section is an entry which can contain other entries, thus allowing |
| 1432 | hierarchical images to be created. See 'Sections and hierarchical images' |
| 1433 | in the binman README for more information. |
| 1434 | |
| 1435 | The base implementation simply joins the various entries together, using |
| 1436 | various rules about alignment, etc. |
| 1437 | |
| 1438 | Subclassing |
| 1439 | ~~~~~~~~~~~ |
| 1440 | |
| 1441 | This class can be subclassed to support other file formats which hold |
| 1442 | multiple entries, such as CBFS. To do this, override the following |
| 1443 | functions. The documentation here describes what your function should do. |
| 1444 | For example code, see etypes which subclass `Entry_section`, or `cbfs.py` |
| 1445 | for a more involved example:: |
| 1446 | |
| 1447 | $ grep -l \(Entry_section tools/binman/etype/*.py |
| 1448 | |
| 1449 | ReadNode() |
| 1450 | Call `super().ReadNode()`, then read any special properties for the |
| 1451 | section. Then call `self.ReadEntries()` to read the entries. |
| 1452 | |
| 1453 | Binman calls this at the start when reading the image description. |
| 1454 | |
| 1455 | ReadEntries() |
| 1456 | Read in the subnodes of the section. This may involve creating entries |
| 1457 | of a particular etype automatically, as well as reading any special |
| 1458 | properties in the entries. For each entry, entry.ReadNode() should be |
| 1459 | called, to read the basic entry properties. The properties should be |
| 1460 | added to `self._entries[]`, in the correct order, with a suitable name. |
| 1461 | |
| 1462 | Binman calls this at the start when reading the image description. |
| 1463 | |
| 1464 | BuildSectionData(required) |
| 1465 | Create the custom file format that you want and return it as bytes. |
| 1466 | This likely sets up a file header, then loops through the entries, |
| 1467 | adding them to the file. For each entry, call `entry.GetData()` to |
| 1468 | obtain the data. If that returns None, and `required` is False, then |
| 1469 | this method must give up and return None. But if `required` is True then |
| 1470 | it should assume that all data is valid. |
| 1471 | |
| 1472 | Binman calls this when packing the image, to find out the size of |
| 1473 | everything. It is called again at the end when building the final image. |
| 1474 | |
| 1475 | SetImagePos(image_pos): |
| 1476 | Call `super().SetImagePos(image_pos)`, then set the `image_pos` values |
| 1477 | for each of the entries. This should use the custom file format to find |
| 1478 | the `start offset` (and `image_pos`) of each entry. If the file format |
| 1479 | uses compression in such a way that there is no offset available (other |
| 1480 | than reading the whole file and decompressing it), then the offsets for |
| 1481 | affected entries can remain unset (`None`). The size should also be set |
| 1482 | if possible. |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1483 | |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1484 | Binman calls this after the image has been packed, to update the |
| 1485 | location that all the entries ended up at. |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1486 | |
Simon Glass | 637958f | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 1487 | ReadChildData(child, decomp, alt_format): |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1488 | The default version of this may be good enough, if you are able to |
| 1489 | implement SetImagePos() correctly. But that is a bit of a bypass, so |
| 1490 | you can override this method to read from your custom file format. It |
| 1491 | should read the entire entry containing the custom file using |
| 1492 | `super().ReadData(True)`, then parse the file to get the data for the |
| 1493 | given child, then return that data. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1494 | |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1495 | If your file format supports compression, the `decomp` argument tells |
| 1496 | you whether to return the compressed data (`decomp` is False) or to |
| 1497 | uncompress it first, then return the uncompressed data (`decomp` is |
| 1498 | True). This is used by the `binman extract -U` option. |
Simon Glass | 21db0ff | 2020-09-01 05:13:54 -0600 | [diff] [blame] | 1499 | |
Simon Glass | 637958f | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 1500 | If your entry supports alternative formats, the alt_format provides the |
| 1501 | alternative format that the user has selected. Your function should |
| 1502 | return data in that format. This is used by the 'binman extract -l' |
| 1503 | option. |
| 1504 | |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1505 | Binman calls this when reading in an image, in order to populate all the |
| 1506 | entries with the data from that image (`binman ls`). |
| 1507 | |
| 1508 | WriteChildData(child): |
| 1509 | Binman calls this after `child.data` is updated, to inform the custom |
| 1510 | file format about this, in case it needs to do updates. |
| 1511 | |
| 1512 | The default version of this does nothing and probably needs to be |
| 1513 | overridden for the 'binman replace' command to work. Your version should |
| 1514 | use `child.data` to update the data for that child in the custom file |
| 1515 | format. |
| 1516 | |
| 1517 | Binman calls this when updating an image that has been read in and in |
| 1518 | particular to update the data for a particular entry (`binman replace`) |
| 1519 | |
| 1520 | Properties / Entry arguments |
| 1521 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1522 | |
| 1523 | See :ref:`develop/package/binman:Image description format` for more |
| 1524 | information. |
| 1525 | |
| 1526 | align-default |
| 1527 | Default alignment for this section, if no alignment is given in the |
| 1528 | entry |
| 1529 | |
| 1530 | pad-byte |
| 1531 | Pad byte to use when padding |
| 1532 | |
| 1533 | sort-by-offset |
| 1534 | True if entries should be sorted by offset, False if they must be |
| 1535 | in-order in the device tree description |
| 1536 | |
| 1537 | end-at-4gb |
| 1538 | Used to build an x86 ROM which ends at 4GB (2^32) |
| 1539 | |
| 1540 | name-prefix |
| 1541 | Adds a prefix to the name of every entry in the section when writing out |
| 1542 | the map |
| 1543 | |
| 1544 | skip-at-start |
| 1545 | Number of bytes before the first entry starts. These effectively adjust |
| 1546 | the starting offset of entries. For example, if this is 16, then the |
| 1547 | first entry would start at 16. An entry with offset = 20 would in fact |
| 1548 | be written at offset 4 in the image file, since the first 16 bytes are |
| 1549 | skipped when writing. |
Simon Glass | b1d414c | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 1550 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 1551 | filename |
| 1552 | filename to write the unpadded section contents to within the output |
| 1553 | directory (None to skip this). |
| 1554 | |
Simon Glass | 39dd215 | 2019-07-08 14:25:47 -0600 | [diff] [blame] | 1555 | Since a section is also an entry, it inherits all the properies of entries |
| 1556 | too. |
| 1557 | |
Simon Glass | cc9a41c | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1558 | Note that the `allow_missing` member controls whether this section permits |
| 1559 | external blobs to be missing their contents. The option will produce an |
| 1560 | image but of course it will not work. It is useful to make sure that |
| 1561 | Continuous Integration systems can build without the binaries being |
| 1562 | available. This is set by the `SetAllowMissing()` method, if |
| 1563 | `--allow-missing` is passed to binman. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1564 | |
| 1565 | |
| 1566 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1567 | .. _etype_tee_os: |
| 1568 | |
Roger Quadros | 5cdcea0 | 2022-02-19 20:50:04 +0200 | [diff] [blame] | 1569 | Entry: tee-os: Entry containing an OP-TEE Trusted OS (TEE) blob |
| 1570 | --------------------------------------------------------------- |
| 1571 | |
| 1572 | Properties / Entry arguments: |
| 1573 | - tee-os-path: Filename of file to read into entry. This is typically |
Simon Glass | ad5cfe1 | 2023-01-07 14:07:14 -0700 | [diff] [blame] | 1574 | called tee.bin or tee.elf |
Roger Quadros | 5cdcea0 | 2022-02-19 20:50:04 +0200 | [diff] [blame] | 1575 | |
| 1576 | This entry holds the run-time firmware, typically started by U-Boot SPL. |
| 1577 | See the U-Boot README for your architecture or board for how to use it. See |
| 1578 | https://github.com/OP-TEE/optee_os for more information about OP-TEE. |
| 1579 | |
Simon Glass | ad5cfe1 | 2023-01-07 14:07:14 -0700 | [diff] [blame] | 1580 | Note that if the file is in ELF format, it must go in a FIT. In that case, |
| 1581 | this entry will mark itself as absent, providing the data only through the |
| 1582 | read_elf_segments() method. |
| 1583 | |
| 1584 | Marking this entry as absent means that it if is used in the wrong context |
| 1585 | it can be automatically dropped. Thus it is possible to add an OP-TEE entry |
| 1586 | like this:: |
| 1587 | |
| 1588 | binman { |
| 1589 | tee-os { |
| 1590 | }; |
| 1591 | }; |
| 1592 | |
| 1593 | and pass either an ELF or plain binary in with -a tee-os-path <filename> |
| 1594 | and have binman do the right thing: |
| 1595 | |
| 1596 | - include the entry if tee.bin is provided and it does NOT have the v1 |
| 1597 | header |
| 1598 | - drop it otherwise |
| 1599 | |
| 1600 | When used within a FIT, we can do:: |
| 1601 | |
| 1602 | binman { |
| 1603 | fit { |
| 1604 | tee-os { |
| 1605 | }; |
| 1606 | }; |
| 1607 | }; |
| 1608 | |
| 1609 | which will split the ELF into separate nodes for each segment, if an ELF |
| 1610 | file is provided (see :ref:`etype_fit`), or produce a single node if the |
| 1611 | OP-TEE binary v1 format is provided (see optee_doc_) . |
| 1612 | |
| 1613 | .. _optee_doc: https://optee.readthedocs.io/en/latest/architecture/core.html#partitioning-of-the-binary |
| 1614 | |
Roger Quadros | 5cdcea0 | 2022-02-19 20:50:04 +0200 | [diff] [blame] | 1615 | |
| 1616 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1617 | .. _etype_text: |
| 1618 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1619 | Entry: text: An entry which contains text |
| 1620 | ----------------------------------------- |
| 1621 | |
| 1622 | The text can be provided either in the node itself or by a command-line |
| 1623 | argument. There is a level of indirection to allow multiple text strings |
| 1624 | and sharing of text. |
| 1625 | |
| 1626 | Properties / Entry arguments: |
| 1627 | text-label: The value of this string indicates the property / entry-arg |
| 1628 | that contains the string to place in the entry |
| 1629 | <xxx> (actual name is the value of text-label): contains the string to |
| 1630 | place in the entry. |
Simon Glass | 47f6a62 | 2019-07-08 13:18:40 -0600 | [diff] [blame] | 1631 | <text>: The text to place in the entry (overrides the above mechanism). |
| 1632 | This is useful when the text is constant. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1633 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1634 | Example node:: |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1635 | |
| 1636 | text { |
| 1637 | size = <50>; |
| 1638 | text-label = "message"; |
| 1639 | }; |
| 1640 | |
| 1641 | You can then use: |
| 1642 | |
| 1643 | binman -amessage="this is my message" |
| 1644 | |
| 1645 | and binman will insert that string into the entry. |
| 1646 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1647 | It is also possible to put the string directly in the node:: |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1648 | |
| 1649 | text { |
| 1650 | size = <8>; |
| 1651 | text-label = "message"; |
| 1652 | message = "a message directly in the node" |
| 1653 | }; |
| 1654 | |
Simon Glass | 0ac96b6 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1655 | or just:: |
Simon Glass | 47f6a62 | 2019-07-08 13:18:40 -0600 | [diff] [blame] | 1656 | |
| 1657 | text { |
| 1658 | size = <8>; |
| 1659 | text = "some text directly in the node" |
| 1660 | }; |
| 1661 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1662 | The text is not itself nul-terminated. This can be achieved, if required, |
| 1663 | by setting the size of the entry to something larger than the text. |
| 1664 | |
| 1665 | |
| 1666 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1667 | .. _etype_u_boot: |
| 1668 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1669 | Entry: u-boot: U-Boot flat binary |
| 1670 | --------------------------------- |
| 1671 | |
| 1672 | Properties / Entry arguments: |
| 1673 | - filename: Filename of u-boot.bin (default 'u-boot.bin') |
| 1674 | |
| 1675 | This is the U-Boot binary, containing relocation information to allow it |
| 1676 | to relocate itself at runtime. The binary typically includes a device tree |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1677 | blob at the end of it. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1678 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 1679 | U-Boot can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1680 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1681 | Note that this entry is automatically replaced with u-boot-expanded unless |
Simon Glass | 7098b7f | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1682 | --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1683 | |
| 1684 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1685 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1686 | .. _etype_u_boot_dtb: |
| 1687 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1688 | Entry: u-boot-dtb: U-Boot device tree |
| 1689 | ------------------------------------- |
| 1690 | |
| 1691 | Properties / Entry arguments: |
| 1692 | - filename: Filename of u-boot.dtb (default 'u-boot.dtb') |
| 1693 | |
| 1694 | This is the U-Boot device tree, containing configuration information for |
| 1695 | U-Boot. U-Boot needs this to know what devices are present and which drivers |
| 1696 | to activate. |
| 1697 | |
Simon Glass | e219aa4 | 2018-09-14 04:57:24 -0600 | [diff] [blame] | 1698 | Note: This is mostly an internal entry type, used by others. This allows |
| 1699 | binman to know which entries contain a device tree. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1700 | |
| 1701 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1702 | |
| 1703 | .. _etype_u_boot_dtb_with_ucode: |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1704 | |
| 1705 | Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed |
| 1706 | ----------------------------------------------------------------------------------- |
| 1707 | |
| 1708 | Properties / Entry arguments: |
| 1709 | - filename: Filename of u-boot.dtb (default 'u-boot.dtb') |
| 1710 | |
| 1711 | See Entry_u_boot_ucode for full details of the three entries involved in |
| 1712 | this process. This entry provides the U-Boot device-tree file, which |
| 1713 | contains the microcode. If the microcode is not being collated into one |
| 1714 | place then the offset and size of the microcode is recorded by this entry, |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1715 | for use by u-boot-with-ucode_ptr. If it is being collated, then this |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1716 | entry deletes the microcode from the device tree (to save space) and makes |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1717 | it available to u-boot-ucode. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1718 | |
| 1719 | |
| 1720 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1721 | .. _etype_u_boot_elf: |
| 1722 | |
Simon Glass | b171423 | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1723 | Entry: u-boot-elf: U-Boot ELF image |
| 1724 | ----------------------------------- |
| 1725 | |
| 1726 | Properties / Entry arguments: |
| 1727 | - filename: Filename of u-boot (default 'u-boot') |
| 1728 | |
| 1729 | This is the U-Boot ELF image. It does not include a device tree but can be |
| 1730 | relocated to any address for execution. |
| 1731 | |
| 1732 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1733 | |
| 1734 | .. _etype_u_boot_env: |
Simon Glass | b171423 | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1735 | |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1736 | Entry: u-boot-env: An entry which contains a U-Boot environment |
| 1737 | --------------------------------------------------------------- |
| 1738 | |
| 1739 | Properties / Entry arguments: |
| 1740 | - filename: File containing the environment text, with each line in the |
| 1741 | form var=value |
| 1742 | |
| 1743 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1744 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1745 | .. _etype_u_boot_expanded: |
| 1746 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1747 | Entry: u-boot-expanded: U-Boot flat binary broken out into its component parts |
| 1748 | ------------------------------------------------------------------------------ |
| 1749 | |
| 1750 | This is a section containing the U-Boot binary and a devicetree. Using this |
| 1751 | entry type automatically creates this section, with the following entries |
| 1752 | in it: |
| 1753 | |
| 1754 | u-boot-nodtb |
| 1755 | u-boot-dtb |
| 1756 | |
| 1757 | Having the devicetree separate allows binman to update it in the final |
| 1758 | image, so that the entries positions are provided to the running U-Boot. |
| 1759 | |
| 1760 | |
Simon Glass | 136dd35 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1761 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1762 | .. _etype_u_boot_img: |
| 1763 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1764 | Entry: u-boot-img: U-Boot legacy image |
| 1765 | -------------------------------------- |
| 1766 | |
| 1767 | Properties / Entry arguments: |
| 1768 | - filename: Filename of u-boot.img (default 'u-boot.img') |
| 1769 | |
| 1770 | This is the U-Boot binary as a packaged image, in legacy format. It has a |
| 1771 | header which allows it to be loaded at the correct address for execution. |
| 1772 | |
| 1773 | You should use FIT (Flat Image Tree) instead of the legacy image for new |
| 1774 | applications. |
| 1775 | |
| 1776 | |
| 1777 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1778 | .. _etype_u_boot_nodtb: |
| 1779 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1780 | Entry: u-boot-nodtb: U-Boot flat binary without device tree appended |
| 1781 | -------------------------------------------------------------------- |
| 1782 | |
| 1783 | Properties / Entry arguments: |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1784 | - filename: Filename to include (default 'u-boot-nodtb.bin') |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1785 | |
| 1786 | This is the U-Boot binary, containing relocation information to allow it |
| 1787 | to relocate itself at runtime. It does not include a device tree blob at |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1788 | the end of it so normally cannot work without it. You can add a u-boot-dtb |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1789 | entry after this one, or use a u-boot entry instead, normally expands to a |
| 1790 | section containing u-boot and u-boot-dtb |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1791 | |
| 1792 | |
| 1793 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1794 | .. _etype_u_boot_spl: |
| 1795 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1796 | Entry: u-boot-spl: U-Boot SPL binary |
| 1797 | ------------------------------------ |
| 1798 | |
| 1799 | Properties / Entry arguments: |
| 1800 | - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin') |
| 1801 | |
| 1802 | This is the U-Boot SPL (Secondary Program Loader) binary. This is a small |
| 1803 | binary which loads before U-Boot proper, typically into on-chip SRAM. It is |
| 1804 | responsible for locating, loading and jumping to U-Boot. Note that SPL is |
| 1805 | not relocatable so must be loaded to the correct address in SRAM, or written |
Simon Glass | 8425a1f | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1806 | to run from the correct address if direct flash execution is possible (e.g. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1807 | on x86 devices). |
| 1808 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 1809 | SPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1810 | |
| 1811 | in the binman README for more information. |
| 1812 | |
| 1813 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1814 | binman uses that to look up symbols to write into the SPL binary. |
| 1815 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1816 | Note that this entry is automatically replaced with u-boot-spl-expanded |
Simon Glass | 7098b7f | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1817 | unless --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1818 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1819 | |
| 1820 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1821 | .. _etype_u_boot_spl_bss_pad: |
| 1822 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1823 | Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region |
| 1824 | --------------------------------------------------------------------- |
| 1825 | |
| 1826 | Properties / Entry arguments: |
| 1827 | None |
| 1828 | |
Simon Glass | 308939b | 2021-03-18 20:24:55 +1300 | [diff] [blame] | 1829 | This holds the padding added after the SPL binary to cover the BSS (Block |
| 1830 | Started by Symbol) region. This region holds the various variables used by |
| 1831 | SPL. It is set to 0 by SPL when it starts up. If you want to append data to |
| 1832 | the SPL image (such as a device tree file), you must pad out the BSS region |
| 1833 | to avoid the data overlapping with U-Boot variables. This entry is useful in |
| 1834 | that case. It automatically pads out the entry size to cover both the code, |
| 1835 | data and BSS. |
| 1836 | |
| 1837 | The contents of this entry will a certain number of zero bytes, determined |
| 1838 | by __bss_size |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1839 | |
| 1840 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1841 | binman uses that to look up the BSS address. |
| 1842 | |
| 1843 | |
| 1844 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1845 | .. _etype_u_boot_spl_dtb: |
| 1846 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1847 | Entry: u-boot-spl-dtb: U-Boot SPL device tree |
| 1848 | --------------------------------------------- |
| 1849 | |
| 1850 | Properties / Entry arguments: |
| 1851 | - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb') |
| 1852 | |
| 1853 | This is the SPL device tree, containing configuration information for |
| 1854 | SPL. SPL needs this to know what devices are present and which drivers |
| 1855 | to activate. |
| 1856 | |
| 1857 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1858 | |
| 1859 | .. _etype_u_boot_spl_elf: |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1860 | |
Simon Glass | b171423 | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1861 | Entry: u-boot-spl-elf: U-Boot SPL ELF image |
| 1862 | ------------------------------------------- |
| 1863 | |
| 1864 | Properties / Entry arguments: |
Simon Glass | 5dcc21d | 2019-07-08 13:18:45 -0600 | [diff] [blame] | 1865 | - filename: Filename of SPL u-boot (default 'spl/u-boot-spl') |
Simon Glass | b171423 | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1866 | |
| 1867 | This is the U-Boot SPL ELF image. It does not include a device tree but can |
| 1868 | be relocated to any address for execution. |
| 1869 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1870 | |
| 1871 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1872 | .. _etype_u_boot_spl_expanded: |
| 1873 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1874 | Entry: u-boot-spl-expanded: U-Boot SPL flat binary broken out into its component parts |
| 1875 | -------------------------------------------------------------------------------------- |
| 1876 | |
| 1877 | Properties / Entry arguments: |
| 1878 | - spl-dtb: Controls whether this entry is selected (set to 'y' or '1' to |
| 1879 | select) |
| 1880 | |
| 1881 | This is a section containing the U-Boot binary, BSS padding if needed and a |
| 1882 | devicetree. Using this entry type automatically creates this section, with |
| 1883 | the following entries in it: |
| 1884 | |
| 1885 | u-boot-spl-nodtb |
| 1886 | u-boot-spl-bss-pad |
| 1887 | u-boot-dtb |
| 1888 | |
| 1889 | Having the devicetree separate allows binman to update it in the final |
| 1890 | image, so that the entries positions are provided to the running U-Boot. |
| 1891 | |
| 1892 | This entry is selected based on the value of the 'spl-dtb' entryarg. If |
| 1893 | this is non-empty (and not 'n' or '0') then this expanded entry is selected. |
Simon Glass | b171423 | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1894 | |
| 1895 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1896 | |
| 1897 | .. _etype_u_boot_spl_nodtb: |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1898 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1899 | Entry: u-boot-spl-nodtb: SPL binary without device tree appended |
| 1900 | ---------------------------------------------------------------- |
| 1901 | |
| 1902 | Properties / Entry arguments: |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1903 | - filename: Filename to include (default 'spl/u-boot-spl-nodtb.bin') |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1904 | |
| 1905 | This is the U-Boot SPL binary, It does not include a device tree blob at |
| 1906 | the end of it so may not be able to work without it, assuming SPL needs |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1907 | a device tree to operate on your platform. You can add a u-boot-spl-dtb |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1908 | entry after this one, or use a u-boot-spl entry instead' which normally |
| 1909 | expands to a section containing u-boot-spl-dtb, u-boot-spl-bss-pad and |
| 1910 | u-boot-spl-dtb |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1911 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 1912 | SPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | 31e04cb | 2021-03-18 20:24:56 +1300 | [diff] [blame] | 1913 | |
| 1914 | in the binman README for more information. |
| 1915 | |
| 1916 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1917 | binman uses that to look up symbols to write into the SPL binary. |
| 1918 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1919 | |
| 1920 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1921 | .. _etype_u_boot_spl_with_ucode_ptr: |
| 1922 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1923 | Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer |
| 1924 | ---------------------------------------------------------------------------- |
| 1925 | |
Simon Glass | 3fb4f42 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 1926 | This is used when SPL must set up the microcode for U-Boot. |
| 1927 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1928 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 1929 | process. |
| 1930 | |
| 1931 | |
| 1932 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1933 | .. _etype_u_boot_tpl: |
| 1934 | |
Simon Glass | 8425a1f | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1935 | Entry: u-boot-tpl: U-Boot TPL binary |
| 1936 | ------------------------------------ |
| 1937 | |
| 1938 | Properties / Entry arguments: |
| 1939 | - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin') |
| 1940 | |
| 1941 | This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small |
| 1942 | binary which loads before SPL, typically into on-chip SRAM. It is |
| 1943 | responsible for locating, loading and jumping to SPL, the next-stage |
| 1944 | loader. Note that SPL is not relocatable so must be loaded to the correct |
| 1945 | address in SRAM, or written to run from the correct address if direct |
| 1946 | flash execution is possible (e.g. on x86 devices). |
| 1947 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 1948 | SPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | 8425a1f | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1949 | |
| 1950 | in the binman README for more information. |
| 1951 | |
| 1952 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 1953 | binman uses that to look up symbols to write into the TPL binary. |
| 1954 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1955 | Note that this entry is automatically replaced with u-boot-tpl-expanded |
Simon Glass | 7098b7f | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1956 | unless --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1957 | |
Simon Glass | 8425a1f | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1958 | |
| 1959 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1960 | .. _etype_u_boot_tpl_bss_pad: |
| 1961 | |
Simon Glass | 63f41d4 | 2021-03-18 20:24:58 +1300 | [diff] [blame] | 1962 | Entry: u-boot-tpl-bss-pad: U-Boot TPL binary padded with a BSS region |
| 1963 | --------------------------------------------------------------------- |
| 1964 | |
| 1965 | Properties / Entry arguments: |
| 1966 | None |
| 1967 | |
| 1968 | This holds the padding added after the TPL binary to cover the BSS (Block |
| 1969 | Started by Symbol) region. This region holds the various variables used by |
| 1970 | TPL. It is set to 0 by TPL when it starts up. If you want to append data to |
| 1971 | the TPL image (such as a device tree file), you must pad out the BSS region |
| 1972 | to avoid the data overlapping with U-Boot variables. This entry is useful in |
| 1973 | that case. It automatically pads out the entry size to cover both the code, |
| 1974 | data and BSS. |
| 1975 | |
| 1976 | The contents of this entry will a certain number of zero bytes, determined |
| 1977 | by __bss_size |
| 1978 | |
| 1979 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 1980 | binman uses that to look up the BSS address. |
| 1981 | |
| 1982 | |
| 1983 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1984 | .. _etype_u_boot_tpl_dtb: |
| 1985 | |
Simon Glass | 8425a1f | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1986 | Entry: u-boot-tpl-dtb: U-Boot TPL device tree |
| 1987 | --------------------------------------------- |
| 1988 | |
| 1989 | Properties / Entry arguments: |
| 1990 | - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb') |
| 1991 | |
| 1992 | This is the TPL device tree, containing configuration information for |
| 1993 | TPL. TPL needs this to know what devices are present and which drivers |
| 1994 | to activate. |
| 1995 | |
| 1996 | |
| 1997 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 1998 | .. _etype_u_boot_tpl_dtb_with_ucode: |
| 1999 | |
Simon Glass | 3fb4f42 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 2000 | Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer |
| 2001 | ---------------------------------------------------------------------------- |
| 2002 | |
| 2003 | This is used when TPL must set up the microcode for U-Boot. |
| 2004 | |
| 2005 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 2006 | process. |
| 2007 | |
| 2008 | |
| 2009 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2010 | .. _etype_u_boot_tpl_elf: |
| 2011 | |
Simon Glass | a899f71 | 2019-07-08 13:18:46 -0600 | [diff] [blame] | 2012 | Entry: u-boot-tpl-elf: U-Boot TPL ELF image |
| 2013 | ------------------------------------------- |
| 2014 | |
| 2015 | Properties / Entry arguments: |
| 2016 | - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl') |
| 2017 | |
| 2018 | This is the U-Boot TPL ELF image. It does not include a device tree but can |
| 2019 | be relocated to any address for execution. |
| 2020 | |
| 2021 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2022 | |
| 2023 | .. _etype_u_boot_tpl_expanded: |
Simon Glass | a899f71 | 2019-07-08 13:18:46 -0600 | [diff] [blame] | 2024 | |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 2025 | Entry: u-boot-tpl-expanded: U-Boot TPL flat binary broken out into its component parts |
| 2026 | -------------------------------------------------------------------------------------- |
| 2027 | |
| 2028 | Properties / Entry arguments: |
| 2029 | - tpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to |
| 2030 | select) |
| 2031 | |
| 2032 | This is a section containing the U-Boot binary, BSS padding if needed and a |
| 2033 | devicetree. Using this entry type automatically creates this section, with |
| 2034 | the following entries in it: |
| 2035 | |
| 2036 | u-boot-tpl-nodtb |
| 2037 | u-boot-tpl-bss-pad |
| 2038 | u-boot-dtb |
| 2039 | |
| 2040 | Having the devicetree separate allows binman to update it in the final |
| 2041 | image, so that the entries positions are provided to the running U-Boot. |
| 2042 | |
| 2043 | This entry is selected based on the value of the 'tpl-dtb' entryarg. If |
| 2044 | this is non-empty (and not 'n' or '0') then this expanded entry is selected. |
| 2045 | |
| 2046 | |
| 2047 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2048 | .. _etype_u_boot_tpl_nodtb: |
| 2049 | |
Simon Glass | c98de97 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 2050 | Entry: u-boot-tpl-nodtb: TPL binary without device tree appended |
| 2051 | ---------------------------------------------------------------- |
| 2052 | |
| 2053 | Properties / Entry arguments: |
| 2054 | - filename: Filename to include (default 'tpl/u-boot-tpl-nodtb.bin') |
| 2055 | |
| 2056 | This is the U-Boot TPL binary, It does not include a device tree blob at |
| 2057 | the end of it so may not be able to work without it, assuming TPL needs |
| 2058 | a device tree to operate on your platform. You can add a u-boot-tpl-dtb |
Simon Glass | 718b529 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 2059 | entry after this one, or use a u-boot-tpl entry instead, which normally |
| 2060 | expands to a section containing u-boot-tpl-dtb, u-boot-tpl-bss-pad and |
| 2061 | u-boot-tpl-dtb |
Simon Glass | c98de97 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 2062 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 2063 | TPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | c98de97 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 2064 | |
| 2065 | in the binman README for more information. |
| 2066 | |
| 2067 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 2068 | binman uses that to look up symbols to write into the TPL binary. |
| 2069 | |
| 2070 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2071 | |
| 2072 | .. _etype_u_boot_tpl_with_ucode_ptr: |
Simon Glass | c98de97 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 2073 | |
Simon Glass | 3fb4f42 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 2074 | Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer |
| 2075 | ---------------------------------------------------------------------------- |
| 2076 | |
| 2077 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 2078 | process. |
| 2079 | |
| 2080 | |
| 2081 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2082 | .. _etype_u_boot_ucode: |
| 2083 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2084 | Entry: u-boot-ucode: U-Boot microcode block |
| 2085 | ------------------------------------------- |
| 2086 | |
| 2087 | Properties / Entry arguments: |
| 2088 | None |
| 2089 | |
| 2090 | The contents of this entry are filled in automatically by other entries |
| 2091 | which must also be in the image. |
| 2092 | |
| 2093 | U-Boot on x86 needs a single block of microcode. This is collected from |
| 2094 | the various microcode update nodes in the device tree. It is also unable |
| 2095 | to read the microcode from the device tree on platforms that use FSP |
| 2096 | (Firmware Support Package) binaries, because the API requires that the |
| 2097 | microcode is supplied before there is any SRAM available to use (i.e. |
| 2098 | the FSP sets up the SRAM / cache-as-RAM but does so in the call that |
| 2099 | requires the microcode!). To keep things simple, all x86 platforms handle |
| 2100 | microcode the same way in U-Boot (even non-FSP platforms). This is that |
| 2101 | a table is placed at _dt_ucode_base_size containing the base address and |
| 2102 | size of the microcode. This is either passed to the FSP (for FSP |
| 2103 | platforms), or used to set up the microcode (for non-FSP platforms). |
| 2104 | This all happens in the build system since it is the only way to get |
| 2105 | the microcode into a single blob and accessible without SRAM. |
| 2106 | |
| 2107 | There are two cases to handle. If there is only one microcode blob in |
| 2108 | the device tree, then the ucode pointer it set to point to that. This |
| 2109 | entry (u-boot-ucode) is empty. If there is more than one update, then |
| 2110 | this entry holds the concatenation of all updates, and the device tree |
| 2111 | entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This |
| 2112 | last step ensures that that the microcode appears in one contiguous |
| 2113 | block in the image and is not unnecessarily duplicated in the device |
| 2114 | tree. It is referred to as 'collation' here. |
| 2115 | |
| 2116 | Entry types that have a part to play in handling microcode: |
| 2117 | |
| 2118 | Entry_u_boot_with_ucode_ptr: |
| 2119 | Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree). |
| 2120 | It updates it with the address and size of the microcode so that |
| 2121 | U-Boot can find it early on start-up. |
| 2122 | Entry_u_boot_dtb_with_ucode: |
| 2123 | Contains u-boot.dtb. It stores the microcode in a |
| 2124 | 'self.ucode_data' property, which is then read by this class to |
| 2125 | obtain the microcode if needed. If collation is performed, it |
| 2126 | removes the microcode from the device tree. |
| 2127 | Entry_u_boot_ucode: |
| 2128 | This class. If collation is enabled it reads the microcode from |
| 2129 | the Entry_u_boot_dtb_with_ucode entry, and uses it as the |
| 2130 | contents of this entry. |
| 2131 | |
| 2132 | |
| 2133 | |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 2134 | .. _etype_u_boot_vpl: |
| 2135 | |
| 2136 | Entry: u-boot-vpl: U-Boot VPL binary |
| 2137 | ------------------------------------ |
| 2138 | |
| 2139 | Properties / Entry arguments: |
| 2140 | - filename: Filename of u-boot-vpl.bin (default 'vpl/u-boot-vpl.bin') |
| 2141 | |
| 2142 | This is the U-Boot VPL (Verifying Program Loader) binary. This is a small |
| 2143 | binary which loads before SPL, typically into on-chip SRAM. It is |
| 2144 | responsible for locating, loading and jumping to SPL, the next-stage |
| 2145 | loader. Note that VPL is not relocatable so must be loaded to the correct |
| 2146 | address in SRAM, or written to run from the correct address if direct |
| 2147 | flash execution is possible (e.g. on x86 devices). |
| 2148 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 2149 | SPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 2150 | |
| 2151 | in the binman README for more information. |
| 2152 | |
| 2153 | The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since |
| 2154 | binman uses that to look up symbols to write into the VPL binary. |
| 2155 | |
| 2156 | |
| 2157 | |
| 2158 | .. _etype_u_boot_vpl_bss_pad: |
| 2159 | |
| 2160 | Entry: u-boot-vpl-bss-pad: U-Boot VPL binary padded with a BSS region |
| 2161 | --------------------------------------------------------------------- |
| 2162 | |
| 2163 | Properties / Entry arguments: |
| 2164 | None |
| 2165 | |
| 2166 | This holds the padding added after the VPL binary to cover the BSS (Block |
| 2167 | Started by Symbol) region. This region holds the various variables used by |
| 2168 | VPL. It is set to 0 by VPL when it starts up. If you want to append data to |
| 2169 | the VPL image (such as a device tree file), you must pad out the BSS region |
| 2170 | to avoid the data overlapping with U-Boot variables. This entry is useful in |
| 2171 | that case. It automatically pads out the entry size to cover both the code, |
| 2172 | data and BSS. |
| 2173 | |
| 2174 | The contents of this entry will a certain number of zero bytes, determined |
| 2175 | by __bss_size |
| 2176 | |
| 2177 | The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since |
| 2178 | binman uses that to look up the BSS address. |
| 2179 | |
| 2180 | |
| 2181 | |
| 2182 | .. _etype_u_boot_vpl_dtb: |
| 2183 | |
| 2184 | Entry: u-boot-vpl-dtb: U-Boot VPL device tree |
| 2185 | --------------------------------------------- |
| 2186 | |
| 2187 | Properties / Entry arguments: |
| 2188 | - filename: Filename of u-boot.dtb (default 'vpl/u-boot-vpl.dtb') |
| 2189 | |
| 2190 | This is the VPL device tree, containing configuration information for |
| 2191 | VPL. VPL needs this to know what devices are present and which drivers |
| 2192 | to activate. |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | .. _etype_u_boot_vpl_elf: |
| 2197 | |
| 2198 | Entry: u-boot-vpl-elf: U-Boot VPL ELF image |
| 2199 | ------------------------------------------- |
| 2200 | |
| 2201 | Properties / Entry arguments: |
| 2202 | - filename: Filename of VPL u-boot (default 'vpl/u-boot-vpl') |
| 2203 | |
| 2204 | This is the U-Boot VPL ELF image. It does not include a device tree but can |
| 2205 | be relocated to any address for execution. |
| 2206 | |
| 2207 | |
| 2208 | |
| 2209 | .. _etype_u_boot_vpl_expanded: |
| 2210 | |
| 2211 | Entry: u-boot-vpl-expanded: U-Boot VPL flat binary broken out into its component parts |
| 2212 | -------------------------------------------------------------------------------------- |
| 2213 | |
| 2214 | Properties / Entry arguments: |
| 2215 | - vpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to |
| 2216 | select) |
| 2217 | |
| 2218 | This is a section containing the U-Boot binary, BSS padding if needed and a |
| 2219 | devicetree. Using this entry type automatically creates this section, with |
| 2220 | the following entries in it: |
| 2221 | |
| 2222 | u-boot-vpl-nodtb |
| 2223 | u-boot-vpl-bss-pad |
| 2224 | u-boot-dtb |
| 2225 | |
| 2226 | Having the devicetree separate allows binman to update it in the final |
| 2227 | image, so that the entries positions are provided to the running U-Boot. |
| 2228 | |
| 2229 | This entry is selected based on the value of the 'vpl-dtb' entryarg. If |
| 2230 | this is non-empty (and not 'n' or '0') then this expanded entry is selected. |
| 2231 | |
| 2232 | |
| 2233 | |
| 2234 | .. _etype_u_boot_vpl_nodtb: |
| 2235 | |
| 2236 | Entry: u-boot-vpl-nodtb: VPL binary without device tree appended |
| 2237 | ---------------------------------------------------------------- |
| 2238 | |
| 2239 | Properties / Entry arguments: |
| 2240 | - filename: Filename to include (default 'vpl/u-boot-vpl-nodtb.bin') |
| 2241 | |
| 2242 | This is the U-Boot VPL binary, It does not include a device tree blob at |
| 2243 | the end of it so may not be able to work without it, assuming VPL needs |
| 2244 | a device tree to operate on your platform. You can add a u_boot_vpl_dtb |
| 2245 | entry after this one, or use a u_boot_vpl entry instead, which normally |
| 2246 | expands to a section containing u-boot-vpl-dtb, u-boot-vpl-bss-pad and |
| 2247 | u-boot-vpl-dtb |
| 2248 | |
Simon Glass | 18ed996 | 2023-01-07 14:07:11 -0700 | [diff] [blame] | 2249 | VPL can access binman symbols at runtime. See :ref:`binman_fdt`. |
Simon Glass | da6a908 | 2023-01-07 14:07:10 -0700 | [diff] [blame] | 2250 | |
| 2251 | The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since |
| 2252 | binman uses that to look up symbols to write into the VPL binary. |
| 2253 | |
| 2254 | |
| 2255 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2256 | .. _etype_u_boot_with_ucode_ptr: |
| 2257 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2258 | Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer |
| 2259 | -------------------------------------------------------------------- |
| 2260 | |
| 2261 | Properties / Entry arguments: |
Masahiro Yamada | a7a0ca4 | 2019-12-14 13:47:26 +0900 | [diff] [blame] | 2262 | - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin') |
Simon Glass | ee21d3a | 2018-09-14 04:57:07 -0600 | [diff] [blame] | 2263 | - optional-ucode: boolean property to make microcode optional. If the |
| 2264 | u-boot.bin image does not include microcode, no error will |
| 2265 | be generated. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2266 | |
| 2267 | See Entry_u_boot_ucode for full details of the three entries involved in |
| 2268 | this process. This entry updates U-Boot with the offset and size of the |
| 2269 | microcode, to allow early x86 boot code to find it without doing anything |
Simon Glass | 537e006 | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 2270 | complicated. Otherwise it is the same as the u-boot entry. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2271 | |
| 2272 | |
| 2273 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2274 | .. _etype_vblock: |
| 2275 | |
Simon Glass | 5c35016 | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 2276 | Entry: vblock: An entry which contains a Chromium OS verified boot block |
| 2277 | ------------------------------------------------------------------------ |
| 2278 | |
| 2279 | Properties / Entry arguments: |
Simon Glass | 17b84eb | 2019-05-17 22:00:53 -0600 | [diff] [blame] | 2280 | - content: List of phandles to entries to sign |
Simon Glass | 5c35016 | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 2281 | - keydir: Directory containing the public keys to use |
| 2282 | - keyblock: Name of the key file to use (inside keydir) |
| 2283 | - signprivate: Name of provide key file to use (inside keydir) |
| 2284 | - version: Version number of the vblock (typically 1) |
| 2285 | - kernelkey: Name of the kernel key to use (inside keydir) |
| 2286 | - preamble-flags: Value of the vboot preamble flags (typically 0) |
| 2287 | |
Simon Glass | 639505b | 2018-09-14 04:57:11 -0600 | [diff] [blame] | 2288 | Output files: |
| 2289 | - input.<unique_name> - input file passed to futility |
| 2290 | - vblock.<unique_name> - output file generated by futility (which is |
| 2291 | used as the entry contents) |
| 2292 | |
Jagdish Gediya | 311d484 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 2293 | Chromium OS signs the read-write firmware and kernel, writing the signature |
Simon Glass | 5c35016 | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 2294 | in this block. This allows U-Boot to verify that the next firmware stage |
| 2295 | and kernel are genuine. |
| 2296 | |
| 2297 | |
| 2298 | |
Simon Glass | c3fe97f | 2023-03-02 17:02:45 -0700 | [diff] [blame] | 2299 | .. _etype_x509_cert: |
| 2300 | |
| 2301 | Entry: x509-cert: An entry which contains an X509 certificate |
| 2302 | ------------------------------------------------------------- |
| 2303 | |
| 2304 | Properties / Entry arguments: |
| 2305 | - content: List of phandles to entries to sign |
| 2306 | |
| 2307 | Output files: |
| 2308 | - input.<unique_name> - input file passed to openssl |
| 2309 | - cert.<unique_name> - output file generated by openssl (which is |
| 2310 | used as the entry contents) |
| 2311 | |
| 2312 | openssl signs the provided data, writing the signature in this entry. This |
| 2313 | allows verification that the data is genuine |
| 2314 | |
| 2315 | |
| 2316 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2317 | .. _etype_x86_reset16: |
| 2318 | |
Simon Glass | 0b074d6 | 2019-08-24 07:22:48 -0600 | [diff] [blame] | 2319 | Entry: x86-reset16: x86 16-bit reset code for U-Boot |
| 2320 | ---------------------------------------------------- |
| 2321 | |
| 2322 | Properties / Entry arguments: |
| 2323 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 2324 | 'u-boot-x86-reset16.bin') |
| 2325 | |
| 2326 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 2327 | must be placed at a particular address. This entry holds that code. It is |
| 2328 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 2329 | for jumping to the x86-start16 code, which continues execution. |
| 2330 | |
| 2331 | For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead. |
| 2332 | |
| 2333 | |
| 2334 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2335 | .. _etype_x86_reset16_spl: |
| 2336 | |
Simon Glass | 0b074d6 | 2019-08-24 07:22:48 -0600 | [diff] [blame] | 2337 | Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot |
| 2338 | -------------------------------------------------------- |
| 2339 | |
| 2340 | Properties / Entry arguments: |
| 2341 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 2342 | 'u-boot-x86-reset16.bin') |
| 2343 | |
| 2344 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 2345 | must be placed at a particular address. This entry holds that code. It is |
| 2346 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 2347 | for jumping to the x86-start16 code, which continues execution. |
| 2348 | |
| 2349 | For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead. |
| 2350 | |
| 2351 | |
| 2352 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2353 | .. _etype_x86_reset16_tpl: |
| 2354 | |
Simon Glass | 0b074d6 | 2019-08-24 07:22:48 -0600 | [diff] [blame] | 2355 | Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot |
| 2356 | -------------------------------------------------------- |
| 2357 | |
| 2358 | Properties / Entry arguments: |
| 2359 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 2360 | 'u-boot-x86-reset16.bin') |
| 2361 | |
| 2362 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 2363 | must be placed at a particular address. This entry holds that code. It is |
| 2364 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 2365 | for jumping to the x86-start16 code, which continues execution. |
| 2366 | |
| 2367 | For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead. |
| 2368 | |
| 2369 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2370 | |
| 2371 | .. _etype_x86_start16: |
Simon Glass | 0b074d6 | 2019-08-24 07:22:48 -0600 | [diff] [blame] | 2372 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2373 | Entry: x86-start16: x86 16-bit start-up code for U-Boot |
| 2374 | ------------------------------------------------------- |
| 2375 | |
| 2376 | Properties / Entry arguments: |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2377 | - filename: Filename of u-boot-x86-start16.bin (default |
| 2378 | 'u-boot-x86-start16.bin') |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2379 | |
| 2380 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2381 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 2382 | entry holds that code. It is typically placed at offset |
| 2383 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 2384 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 2385 | U-Boot). |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2386 | |
| 2387 | For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead. |
| 2388 | |
| 2389 | |
| 2390 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2391 | .. _etype_x86_start16_spl: |
| 2392 | |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2393 | Entry: x86-start16-spl: x86 16-bit start-up code for SPL |
| 2394 | -------------------------------------------------------- |
| 2395 | |
| 2396 | Properties / Entry arguments: |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2397 | - filename: Filename of spl/u-boot-x86-start16-spl.bin (default |
| 2398 | 'spl/u-boot-x86-start16-spl.bin') |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2399 | |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2400 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 2401 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 2402 | entry holds that code. It is typically placed at offset |
| 2403 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 2404 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 2405 | U-Boot). |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2406 | |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2407 | For 32-bit U-Boot, the 'x86-start16' entry type is used instead. |
Simon Glass | 7a61c6b | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 2408 | |
| 2409 | |
| 2410 | |
Simon Glass | a7c9778 | 2022-08-07 16:33:25 -0600 | [diff] [blame] | 2411 | .. _etype_x86_start16_tpl: |
| 2412 | |
Simon Glass | ed40e96 | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 2413 | Entry: x86-start16-tpl: x86 16-bit start-up code for TPL |
| 2414 | -------------------------------------------------------- |
| 2415 | |
| 2416 | Properties / Entry arguments: |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2417 | - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default |
| 2418 | 'tpl/u-boot-x86-start16-tpl.bin') |
Simon Glass | ed40e96 | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 2419 | |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2420 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 2421 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 2422 | entry holds that code. It is typically placed at offset |
| 2423 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 2424 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 2425 | U-Boot). |
Simon Glass | ed40e96 | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 2426 | |
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 2427 | If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types |
Simon Glass | ed40e96 | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 2428 | may be used instead. |
| 2429 | |
| 2430 | |
| 2431 | |