Simon Glass | 5a5da7c | 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 | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 14 | Entry: atf-bl31: ARM Trusted Firmware (ATF) BL31 blob |
| 15 | ----------------------------------------------------- |
Simon Glass | dc2f81a | 2020-09-01 05:13:58 -0600 | [diff] [blame] | 16 | |
| 17 | Properties / Entry arguments: |
| 18 | - atf-bl31-path: Filename of file to read into entry. This is typically |
| 19 | called bl31.bin or bl31.elf |
| 20 | |
| 21 | This entry holds the run-time firmware, typically started by U-Boot SPL. |
| 22 | See the U-Boot README for your architecture or board for how to use it. See |
| 23 | https://github.com/ARM-software/arm-trusted-firmware for more information |
| 24 | about ATF. |
| 25 | |
| 26 | |
| 27 | |
Simon Glass | 7598972 | 2021-11-23 21:08:59 -0700 | [diff] [blame] | 28 | Entry: atf-fip: ARM Trusted Firmware's Firmware Image Package (FIP) |
| 29 | ------------------------------------------------------------------- |
| 30 | |
| 31 | A FIP_ provides a way to group binaries in a firmware image, used by ARM's |
| 32 | Trusted Firmware A (TF-A) code. It is a simple format consisting of a |
| 33 | table of contents with information about the type, offset and size of the |
| 34 | binaries in the FIP. It is quite similar to FMAP, with the major difference |
| 35 | that it uses UUIDs to indicate the type of each entry. |
| 36 | |
| 37 | Note: It is recommended to always add an fdtmap to every image, as well as |
| 38 | any FIPs so that binman and other tools can access the entire image |
| 39 | correctly. |
| 40 | |
| 41 | The UUIDs correspond to useful names in `fiptool`, provided by ATF to |
| 42 | operate on FIPs. Binman uses these names to make it easier to understand |
| 43 | what is going on, although it is possible to provide a UUID if needed. |
| 44 | |
| 45 | The contents of the FIP are defined by subnodes of the atf-fip entry, e.g.:: |
| 46 | |
| 47 | atf-fip { |
| 48 | soc-fw { |
| 49 | filename = "bl31.bin"; |
| 50 | }; |
| 51 | |
| 52 | scp-fwu-cfg { |
| 53 | filename = "bl2u.bin"; |
| 54 | }; |
| 55 | |
| 56 | u-boot { |
| 57 | fip-type = "nt-fw"; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | This describes a FIP with three entries: soc-fw, scp-fwu-cfg and nt-fw. |
| 62 | You can use normal (non-external) binaries like U-Boot simply by adding a |
| 63 | FIP type, with the `fip-type` property, as above. |
| 64 | |
| 65 | Since FIP exists to bring blobs together, Binman assumes that all FIP |
| 66 | entries are external binaries. If a binary may not exist, you can use the |
| 67 | `--allow-missing` flag to Binman, in which case the image is still created, |
| 68 | even though it will not actually work. |
| 69 | |
| 70 | The size of the FIP depends on the size of the binaries. There is currently |
| 71 | no way to specify a fixed size. If the `atf-fip` node has a `size` entry, |
| 72 | this affects the space taken up by the `atf-fip` entry, but the FIP itself |
| 73 | does not expand to use that space. |
| 74 | |
| 75 | Some other FIP features are available with Binman. The header and the |
| 76 | entries have 64-bit flag works. The flag flags do not seem to be defined |
| 77 | anywhere, but you can use `fip-hdr-flags` and fip-flags` to set the values |
| 78 | of the header and entries respectively. |
| 79 | |
| 80 | FIP entries can be aligned to a particular power-of-two boundary. Use |
| 81 | fip-align for this. |
| 82 | |
| 83 | Binman only understands the entry types that are included in its |
| 84 | implementation. It is possible to specify a 16-byte UUID instead, using the |
| 85 | fip-uuid property. In this case Binman doesn't know what its type is, so |
| 86 | just uses the UUID. See the `u-boot` node in this example:: |
| 87 | |
| 88 | binman { |
| 89 | atf-fip { |
| 90 | fip-hdr-flags = /bits/ 64 <0x123>; |
| 91 | fip-align = <16>; |
| 92 | soc-fw { |
| 93 | fip-flags = /bits/ 64 <0x456>; |
| 94 | filename = "bl31.bin"; |
| 95 | }; |
| 96 | |
| 97 | scp-fwu-cfg { |
| 98 | filename = "bl2u.bin"; |
| 99 | }; |
| 100 | |
| 101 | u-boot { |
| 102 | fip-uuid = [fc 65 13 92 4a 5b 11 ec |
| 103 | 94 35 ff 2d 1c fc 79 9c]; |
| 104 | }; |
| 105 | }; |
| 106 | fdtmap { |
| 107 | }; |
| 108 | }; |
| 109 | |
| 110 | Binman allows reading and updating FIP entries after the image is created, |
| 111 | provided that an FDPMAP is present too. Updates which change the size of a |
| 112 | FIP entry will cause it to be expanded or contracted as needed. |
| 113 | |
| 114 | Properties for top-level atf-fip node |
| 115 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 116 | |
| 117 | fip-hdr-flags (64 bits) |
| 118 | Sets the flags for the FIP header. |
| 119 | |
| 120 | Properties for subnodes |
| 121 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 122 | |
| 123 | fip-type (str) |
| 124 | FIP type to use for this entry. This is needed if the entry |
| 125 | name is not a valid type. Value types are defined in `fip_util.py`. |
| 126 | The FIP type defines the UUID that is used (they map 1:1). |
| 127 | |
| 128 | fip-uuid (16 bytes) |
| 129 | If there is no FIP-type name defined, or it is not supported by Binman, |
| 130 | this property sets the UUID. It should be a 16-byte value, following the |
| 131 | hex digits of the UUID. |
| 132 | |
| 133 | fip-flags (64 bits) |
| 134 | Set the flags for a FIP entry. Use in one of the subnodes of the |
| 135 | 7atf-fip entry. |
| 136 | |
| 137 | fip-align |
| 138 | Set the alignment for a FIP entry, FIP entries can be aligned to a |
| 139 | particular power-of-two boundary. The default is 1. |
| 140 | |
| 141 | Adding new FIP-entry types |
| 142 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 143 | |
| 144 | When new FIP entries are defined by TF-A they appear in the |
| 145 | `TF-A source tree`_. You can use `fip_util.py` to update Binman to support |
| 146 | new types, then `send a patch`_ to the U-Boot mailing list. There are two |
| 147 | source files that the tool examples: |
| 148 | |
| 149 | - `include/tools_share/firmware_image_package.h` has the UUIDs |
| 150 | - `tools/fiptool/tbbr_config.c` has the name and descripion for each UUID |
| 151 | |
| 152 | To run the tool:: |
| 153 | |
| 154 | $ tools/binman/fip_util.py -s /path/to/arm-trusted-firmware |
| 155 | Warning: UUID 'UUID_NON_TRUSTED_WORLD_KEY_CERT' is not mentioned in tbbr_config.c file |
| 156 | Existing code in 'tools/binman/fip_util.py' is up-to-date |
| 157 | |
| 158 | If it shows there is an update, it writes a new version of `fip_util.py` |
| 159 | to `fip_util.py.out`. You can change the output file using the `-i` flag. |
| 160 | If you have a problem, use `-D` to enable traceback debugging. |
| 161 | |
| 162 | FIP commentary |
| 163 | ~~~~~~~~~~~~~~ |
| 164 | |
| 165 | As a side effect of use of UUIDs, FIP does not support multiple |
| 166 | entries of the same type, such as might be used to store fonts or graphics |
| 167 | icons, for example. For verified boot it could be used for each part of the |
| 168 | image (e.g. separate FIPs for A and B) but cannot describe the whole |
| 169 | firmware image. As with FMAP there is no hierarchy defined, although FMAP |
| 170 | works around this by having 'section' areas which encompass others. A |
| 171 | similar workaround would be possible with FIP but is not currently defined. |
| 172 | |
| 173 | It is recommended to always add an fdtmap to every image, as well as any |
| 174 | FIPs so that binman and other tools can access the entire image correctly. |
| 175 | |
| 176 | .. _FIP: https://trustedfirmware-a.readthedocs.io/en/latest/design/firmware-design.html#firmware-image-package-fip |
| 177 | .. _`TF-A source tree`: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 178 | .. _`send a patch`: https://www.denx.de/wiki/U-Boot/Patches |
| 179 | |
| 180 | |
| 181 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 182 | Entry: blob: Arbitrary binary blob |
| 183 | ---------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 184 | |
| 185 | Note: This should not be used by itself. It is normally used as a parent |
| 186 | class by other entry types. |
| 187 | |
| 188 | Properties / Entry arguments: |
| 189 | - filename: Filename of file to read into entry |
Simon Glass | 83d73c2 | 2018-09-14 04:57:26 -0600 | [diff] [blame] | 190 | - compress: Compression algorithm to use: |
| 191 | none: No compression |
| 192 | lz4: Use lz4 compression (via 'lz4' command-line utility) |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 193 | |
| 194 | This entry reads data from a file and places it in the entry. The |
| 195 | default filename is often specified specified by the subclass. See for |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 196 | example the 'u-boot' entry which provides the filename 'u-boot.bin'. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 197 | |
Simon Glass | 83d73c2 | 2018-09-14 04:57:26 -0600 | [diff] [blame] | 198 | If compression is enabled, an extra 'uncomp-size' property is written to |
| 199 | the node (if enabled with -u) which provides the uncompressed size of the |
| 200 | data. |
| 201 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 202 | |
| 203 | |
Simon Glass | 6ed45ba | 2018-09-14 04:57:24 -0600 | [diff] [blame] | 204 | Entry: blob-dtb: A blob that holds a device tree |
| 205 | ------------------------------------------------ |
| 206 | |
| 207 | This is a blob containing a device tree. The contents of the blob are |
| 208 | obtained from the list of available device-tree files, managed by the |
| 209 | 'state' module. |
| 210 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 211 | |
| 212 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 213 | Entry: blob-ext: Externally built binary blob |
| 214 | --------------------------------------------- |
Simon Glass | ce867ad | 2020-07-09 18:39:36 -0600 | [diff] [blame] | 215 | |
| 216 | Note: This should not be used by itself. It is normally used as a parent |
| 217 | class by other entry types. |
| 218 | |
Simon Glass | 4f9f105 | 2020-07-09 18:39:38 -0600 | [diff] [blame] | 219 | If the file providing this blob is missing, binman can optionally ignore it |
| 220 | and produce a broken image with a warning. |
| 221 | |
Simon Glass | ce867ad | 2020-07-09 18:39:36 -0600 | [diff] [blame] | 222 | See 'blob' for Properties / Entry arguments. |
| 223 | |
| 224 | |
| 225 | |
Simon Glass | cc2c500 | 2021-11-23 21:09:52 -0700 | [diff] [blame] | 226 | Entry: blob-ext-list: List of externally built binary blobs |
| 227 | ----------------------------------------------------------- |
| 228 | |
| 229 | This is like blob-ext except that a number of blobs can be provided, |
| 230 | typically with some sort of relationship, e.g. all are DDC parameters. |
| 231 | |
| 232 | If any of the external files needed by this llist is missing, binman can |
| 233 | optionally ignore it and produce a broken image with a warning. |
| 234 | |
| 235 | Args: |
| 236 | filenames: List of filenames to read and include |
| 237 | |
| 238 | |
| 239 | |
Simon Glass | ec127af | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 240 | Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass |
| 241 | ----------------------------------------------------------------------------------------- |
| 242 | |
| 243 | Properties / Entry arguments: |
| 244 | - <xxx>-path: Filename containing the contents of this entry (optional, |
Simon Glass | 3decfa3 | 2020-09-01 05:13:54 -0600 | [diff] [blame] | 245 | defaults to None) |
Simon Glass | ec127af | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 246 | |
| 247 | where <xxx> is the blob_fname argument to the constructor. |
| 248 | |
| 249 | This entry cannot be used directly. Instead, it is used as a parent class |
| 250 | for another entry, which defined blob_fname. This parameter is used to |
| 251 | set the entry-arg or property containing the filename. The entry-arg or |
| 252 | property is in turn used to set the actual filename. |
| 253 | |
| 254 | See cros_ec_rw for an example of this. |
| 255 | |
| 256 | |
| 257 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 258 | Entry: blob-phase: Section that holds a phase binary |
| 259 | ---------------------------------------------------- |
| 260 | |
| 261 | This is a base class that should not normally be used directly. It is used |
| 262 | when converting a 'u-boot' entry automatically into a 'u-boot-expanded' |
| 263 | entry; similarly for SPL. |
| 264 | |
| 265 | |
| 266 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 267 | Entry: cbfs: Coreboot Filesystem (CBFS) |
| 268 | --------------------------------------- |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 269 | |
| 270 | A CBFS provides a way to group files into a group. It has a simple directory |
| 271 | structure and allows the position of individual files to be set, since it is |
| 272 | designed to support execute-in-place in an x86 SPI-flash device. Where XIP |
| 273 | is not used, it supports compression and storing ELF files. |
| 274 | |
| 275 | CBFS is used by coreboot as its way of orgnanising SPI-flash contents. |
| 276 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 277 | The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:: |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 278 | |
| 279 | cbfs { |
| 280 | size = <0x100000>; |
| 281 | u-boot { |
| 282 | cbfs-type = "raw"; |
| 283 | }; |
| 284 | u-boot-dtb { |
| 285 | cbfs-type = "raw"; |
| 286 | }; |
| 287 | }; |
| 288 | |
| 289 | This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb. |
| 290 | Note that the size is required since binman does not support calculating it. |
| 291 | The contents of each entry is just what binman would normally provide if it |
| 292 | were not a CBFS node. A blob type can be used to import arbitrary files as |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 293 | with the second subnode below:: |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 294 | |
| 295 | cbfs { |
| 296 | size = <0x100000>; |
| 297 | u-boot { |
| 298 | cbfs-name = "BOOT"; |
| 299 | cbfs-type = "raw"; |
| 300 | }; |
| 301 | |
| 302 | dtb { |
| 303 | type = "blob"; |
| 304 | filename = "u-boot.dtb"; |
| 305 | cbfs-type = "raw"; |
| 306 | cbfs-compress = "lz4"; |
Simon Glass | e073d4e | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 307 | cbfs-offset = <0x100000>; |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 308 | }; |
| 309 | }; |
| 310 | |
| 311 | This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and |
| 312 | u-boot.dtb (named "dtb") and compressed with the lz4 algorithm. |
| 313 | |
| 314 | |
| 315 | Properties supported in the top-level CBFS node: |
| 316 | |
| 317 | cbfs-arch: |
| 318 | Defaults to "x86", but you can specify the architecture if needed. |
| 319 | |
| 320 | |
| 321 | Properties supported in the CBFS entry subnodes: |
| 322 | |
| 323 | cbfs-name: |
| 324 | This is the name of the file created in CBFS. It defaults to the entry |
| 325 | name (which is the node name), but you can override it with this |
| 326 | property. |
| 327 | |
| 328 | cbfs-type: |
| 329 | This is the CBFS file type. The following are supported: |
| 330 | |
| 331 | raw: |
| 332 | This is a 'raw' file, although compression is supported. It can be |
| 333 | used to store any file in CBFS. |
| 334 | |
| 335 | stage: |
| 336 | This is an ELF file that has been loaded (i.e. mapped to memory), so |
| 337 | appears in the CBFS as a flat binary. The input file must be an ELF |
| 338 | image, for example this puts "u-boot" (the ELF image) into a 'stage' |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 339 | entry:: |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 340 | |
| 341 | cbfs { |
| 342 | size = <0x100000>; |
| 343 | u-boot-elf { |
| 344 | cbfs-name = "BOOT"; |
| 345 | cbfs-type = "stage"; |
| 346 | }; |
| 347 | }; |
| 348 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 349 | You can use your own ELF file with something like:: |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 350 | |
| 351 | cbfs { |
| 352 | size = <0x100000>; |
| 353 | something { |
| 354 | type = "blob"; |
| 355 | filename = "cbfs-stage.elf"; |
| 356 | cbfs-type = "stage"; |
| 357 | }; |
| 358 | }; |
| 359 | |
| 360 | As mentioned, the file is converted to a flat binary, so it is |
| 361 | equivalent to adding "u-boot.bin", for example, but with the load and |
| 362 | start addresses specified by the ELF. At present there is no option |
| 363 | to add a flat binary with a load/start address, similar to the |
| 364 | 'add-flat-binary' option in cbfstool. |
| 365 | |
Simon Glass | e073d4e | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 366 | cbfs-offset: |
| 367 | This is the offset of the file's data within the CBFS. It is used to |
| 368 | specify where the file should be placed in cases where a fixed position |
| 369 | is needed. Typical uses are for code which is not relocatable and must |
| 370 | execute in-place from a particular address. This works because SPI flash |
| 371 | is generally mapped into memory on x86 devices. The file header is |
| 372 | placed before this offset so that the data start lines up exactly with |
| 373 | the chosen offset. If this property is not provided, then the file is |
| 374 | placed in the next available spot. |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 375 | |
| 376 | The current implementation supports only a subset of CBFS features. It does |
| 377 | not support other file types (e.g. payload), adding multiple files (like the |
| 378 | 'files' entry with a pattern supported by binman), putting files at a |
| 379 | particular offset in the CBFS and a few other things. |
| 380 | |
| 381 | Of course binman can create images containing multiple CBFSs, simply by |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 382 | defining these in the binman config:: |
Simon Glass | ac62fba | 2019-07-08 13:18:53 -0600 | [diff] [blame] | 383 | |
| 384 | |
| 385 | binman { |
| 386 | size = <0x800000>; |
| 387 | cbfs { |
| 388 | offset = <0x100000>; |
| 389 | size = <0x100000>; |
| 390 | u-boot { |
| 391 | cbfs-type = "raw"; |
| 392 | }; |
| 393 | u-boot-dtb { |
| 394 | cbfs-type = "raw"; |
| 395 | }; |
| 396 | }; |
| 397 | |
| 398 | cbfs2 { |
| 399 | offset = <0x700000>; |
| 400 | size = <0x100000>; |
| 401 | u-boot { |
| 402 | cbfs-type = "raw"; |
| 403 | }; |
| 404 | u-boot-dtb { |
| 405 | cbfs-type = "raw"; |
| 406 | }; |
| 407 | image { |
| 408 | type = "blob"; |
| 409 | filename = "image.jpg"; |
| 410 | }; |
| 411 | }; |
| 412 | }; |
| 413 | |
| 414 | This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB, |
| 415 | both of size 1MB. |
| 416 | |
| 417 | |
| 418 | |
Simon Glass | 189f291 | 2021-03-21 18:24:31 +1300 | [diff] [blame] | 419 | Entry: collection: An entry which contains a collection of other entries |
| 420 | ------------------------------------------------------------------------ |
| 421 | |
| 422 | Properties / Entry arguments: |
| 423 | - content: List of phandles to entries to include |
| 424 | |
| 425 | This allows reusing the contents of other entries. The contents of the |
| 426 | listed entries are combined to form this entry. This serves as a useful |
| 427 | base class for entry types which need to process data from elsewhere in |
| 428 | the image, not necessarily child entries. |
| 429 | |
| 430 | |
| 431 | |
Simon Glass | ec127af | 2018-07-17 13:25:39 -0600 | [diff] [blame] | 432 | Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image |
| 433 | -------------------------------------------------------------------------------- |
| 434 | |
| 435 | Properties / Entry arguments: |
| 436 | - cros-ec-rw-path: Filename containing the EC image |
| 437 | |
| 438 | This entry holds a Chromium OS EC (embedded controller) image, for use in |
| 439 | updating the EC on startup via software sync. |
| 440 | |
| 441 | |
| 442 | |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 443 | Entry: fdtmap: An entry which contains an FDT map |
| 444 | ------------------------------------------------- |
| 445 | |
| 446 | Properties / Entry arguments: |
| 447 | None |
| 448 | |
| 449 | An FDT map is just a header followed by an FDT containing a list of all the |
Simon Glass | 12bb1a9 | 2019-07-20 12:23:51 -0600 | [diff] [blame] | 450 | entries in the image. The root node corresponds to the image node in the |
| 451 | original FDT, and an image-name property indicates the image name in that |
| 452 | original tree. |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 453 | |
| 454 | The header is the string _FDTMAP_ followed by 8 unused bytes. |
| 455 | |
| 456 | When used, this entry will be populated with an FDT map which reflects the |
| 457 | entries in the current image. Hierarchy is preserved, and all offsets and |
| 458 | sizes are included. |
| 459 | |
| 460 | Note that the -u option must be provided to ensure that binman updates the |
| 461 | FDT with the position of each entry. |
| 462 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 463 | Example output for a simple image with U-Boot and an FDT map:: |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 464 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 465 | / { |
| 466 | image-name = "binman"; |
| 467 | size = <0x00000112>; |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 468 | image-pos = <0x00000000>; |
| 469 | offset = <0x00000000>; |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 470 | u-boot { |
| 471 | size = <0x00000004>; |
| 472 | image-pos = <0x00000000>; |
| 473 | offset = <0x00000000>; |
| 474 | }; |
| 475 | fdtmap { |
| 476 | size = <0x0000010e>; |
| 477 | image-pos = <0x00000004>; |
| 478 | offset = <0x00000004>; |
| 479 | }; |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 480 | }; |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 481 | |
Simon Glass | 12bb1a9 | 2019-07-20 12:23:51 -0600 | [diff] [blame] | 482 | If allow-repack is used then 'orig-offset' and 'orig-size' properties are |
| 483 | added as necessary. See the binman README. |
| 484 | |
Simon Glass | 943bf78 | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 485 | When extracting files, an alternative 'fdt' format is available for fdtmaps. |
| 486 | Use `binman extract -F fdt ...` to use this. It will export a devicetree, |
| 487 | without the fdtmap header, so it can be viewed with `fdtdump`. |
| 488 | |
Simon Glass | 086cec9 | 2019-07-08 14:25:27 -0600 | [diff] [blame] | 489 | |
| 490 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 491 | Entry: files: A set of files arranged in a section |
| 492 | -------------------------------------------------- |
Simon Glass | 0a98b28 | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 493 | |
| 494 | Properties / Entry arguments: |
| 495 | - pattern: Filename pattern to match the files to include |
Simon Glass | 9248c8d | 2020-10-26 17:40:07 -0600 | [diff] [blame] | 496 | - files-compress: Compression algorithm to use: |
Simon Glass | 0a98b28 | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 497 | none: No compression |
| 498 | lz4: Use lz4 compression (via 'lz4' command-line utility) |
Simon Glass | 4ce4077 | 2021-03-18 20:24:53 +1300 | [diff] [blame] | 499 | - files-align: Align each file to the given alignment |
Simon Glass | 0a98b28 | 2018-09-14 04:57:28 -0600 | [diff] [blame] | 500 | |
| 501 | This entry reads a number of files and places each in a separate sub-entry |
| 502 | within this entry. To access these you need to enable device-tree updates |
| 503 | at run-time so you can obtain the file positions. |
| 504 | |
| 505 | |
| 506 | |
Simon Glass | 3af8e49 | 2018-07-17 13:25:40 -0600 | [diff] [blame] | 507 | Entry: fill: An entry which is filled to a particular byte value |
| 508 | ---------------------------------------------------------------- |
| 509 | |
| 510 | Properties / Entry arguments: |
| 511 | - fill-byte: Byte to use to fill the entry |
| 512 | |
| 513 | Note that the size property must be set since otherwise this entry does not |
| 514 | know how large it should be. |
| 515 | |
| 516 | You can often achieve the same effect using the pad-byte property of the |
| 517 | overall image, in that the space between entries will then be padded with |
| 518 | that byte. But this entry is sometimes useful for explicitly setting the |
| 519 | byte value of a region. |
| 520 | |
| 521 | |
| 522 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 523 | Entry: fit: Flat Image Tree (FIT) |
| 524 | --------------------------------- |
Simon Glass | fdc3436 | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 525 | |
| 526 | This calls mkimage to create a FIT (U-Boot Flat Image Tree) based on the |
| 527 | input provided. |
| 528 | |
| 529 | Nodes for the FIT should be written out in the binman configuration just as |
| 530 | they would be in a file passed to mkimage. |
| 531 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 532 | For example, this creates an image containing a FIT with U-Boot SPL:: |
Simon Glass | fdc3436 | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 533 | |
| 534 | binman { |
| 535 | fit { |
| 536 | description = "Test FIT"; |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 537 | fit,fdt-list = "of-list"; |
Simon Glass | fdc3436 | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 538 | |
| 539 | images { |
| 540 | kernel@1 { |
| 541 | description = "SPL"; |
| 542 | os = "u-boot"; |
| 543 | type = "rkspi"; |
| 544 | arch = "arm"; |
| 545 | compression = "none"; |
| 546 | load = <0>; |
| 547 | entry = <0>; |
| 548 | |
| 549 | u-boot-spl { |
| 550 | }; |
| 551 | }; |
| 552 | }; |
| 553 | }; |
| 554 | }; |
| 555 | |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 556 | U-Boot supports creating fdt and config nodes automatically. To do this, |
| 557 | pass an of-list property (e.g. -a of-list=file1 file2). This tells binman |
| 558 | that you want to generates nodes for two files: file1.dtb and file2.dtb |
| 559 | The fit,fdt-list property (see above) indicates that of-list should be used. |
| 560 | If the property is missing you will get an error. |
| 561 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 562 | Then add a 'generator node', a node with a name starting with '@':: |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 563 | |
| 564 | images { |
| 565 | @fdt-SEQ { |
| 566 | description = "fdt-NAME"; |
| 567 | type = "flat_dt"; |
| 568 | compression = "none"; |
| 569 | }; |
| 570 | }; |
| 571 | |
| 572 | This tells binman to create nodes fdt-1 and fdt-2 for each of your two |
| 573 | files. All the properties you specify will be included in the node. This |
| 574 | node acts like a template to generate the nodes. The generator node itself |
| 575 | does not appear in the output - it is replaced with what binman generates. |
| 576 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 577 | You can create config nodes in a similar way:: |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 578 | |
| 579 | configurations { |
| 580 | default = "@config-DEFAULT-SEQ"; |
| 581 | @config-SEQ { |
| 582 | description = "NAME"; |
Samuel Holland | 68158d5 | 2020-10-21 21:12:14 -0500 | [diff] [blame] | 583 | firmware = "atf"; |
| 584 | loadables = "uboot"; |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 585 | fdt = "fdt-SEQ"; |
| 586 | }; |
| 587 | }; |
| 588 | |
| 589 | This tells binman to create nodes config-1 and config-2, i.e. a config for |
| 590 | each of your two files. |
| 591 | |
| 592 | Available substitutions for '@' nodes are: |
| 593 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 594 | SEQ: |
| 595 | Sequence number of the generated fdt (1, 2, ...) |
| 596 | NAME |
| 597 | Name of the dtb as provided (i.e. without adding '.dtb') |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 598 | |
| 599 | Note that if no devicetree files are provided (with '-a of-list' as above) |
| 600 | then no nodes will be generated. |
| 601 | |
Simon Glass | c0f1ebe | 2020-09-06 10:39:08 -0600 | [diff] [blame] | 602 | The 'default' property, if present, will be automatically set to the name |
| 603 | if of configuration whose devicetree matches the 'default-dt' entry |
| 604 | argument, e.g. with '-a default-dt=sun50i-a64-pine64-lts'. |
| 605 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 606 | Available substitutions for '@' property values are |
Simon Glass | f324330 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 607 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 608 | DEFAULT-SEQ: |
| 609 | Sequence number of the default fdt,as provided by the 'default-dt' entry |
| 610 | argument |
Simon Glass | 6cf9953 | 2020-09-01 05:13:59 -0600 | [diff] [blame] | 611 | |
| 612 | Properties (in the 'fit' node itself): |
Simon Glass | fdc3436 | 2020-07-09 18:39:45 -0600 | [diff] [blame] | 613 | fit,external-offset: Indicates that the contents of the FIT are external |
| 614 | and provides the external offset. This is passsed to mkimage via |
| 615 | the -E and -p flags. |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
Simon Glass | 11e36cc | 2018-07-17 13:25:38 -0600 | [diff] [blame] | 620 | Entry: fmap: An entry which contains an Fmap section |
| 621 | ---------------------------------------------------- |
| 622 | |
| 623 | Properties / Entry arguments: |
| 624 | None |
| 625 | |
| 626 | FMAP is a simple format used by flashrom, an open-source utility for |
| 627 | reading and writing the SPI flash, typically on x86 CPUs. The format |
| 628 | provides flashrom with a list of areas, so it knows what it in the flash. |
| 629 | It can then read or write just a single area, instead of the whole flash. |
| 630 | |
| 631 | The format is defined by the flashrom project, in the file lib/fmap.h - |
| 632 | see www.flashrom.org/Flashrom for more information. |
| 633 | |
| 634 | When used, this entry will be populated with an FMAP which reflects the |
| 635 | entries in the current image. Note that any hierarchy is squashed, since |
Simon Glass | 1736575 | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 636 | FMAP does not support this. Sections are represented as an area appearing |
| 637 | before its contents, so that it is possible to reconstruct the hierarchy |
| 638 | from the FMAP by using the offset information. This convention does not |
| 639 | seem to be documented, but is used in Chromium OS. |
| 640 | |
| 641 | CBFS entries appear as a single entry, i.e. the sub-entries are ignored. |
Simon Glass | 11e36cc | 2018-07-17 13:25:38 -0600 | [diff] [blame] | 642 | |
| 643 | |
| 644 | |
Simon Glass | 0ef87aa | 2018-07-17 13:25:44 -0600 | [diff] [blame] | 645 | Entry: gbb: An entry which contains a Chromium OS Google Binary Block |
| 646 | --------------------------------------------------------------------- |
| 647 | |
| 648 | Properties / Entry arguments: |
| 649 | - hardware-id: Hardware ID to use for this build (a string) |
| 650 | - keydir: Directory containing the public keys to use |
| 651 | - bmpblk: Filename containing images used by recovery |
| 652 | |
| 653 | Chromium OS uses a GBB to store various pieces of information, in particular |
| 654 | the root and recovery keys that are used to verify the boot process. Some |
| 655 | more details are here: |
| 656 | |
| 657 | https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts |
| 658 | |
| 659 | but note that the page dates from 2013 so is quite out of date. See |
| 660 | README.chromium for how to obtain the required keys and tools. |
| 661 | |
| 662 | |
| 663 | |
Simon Glass | cf22894 | 2019-07-08 14:25:28 -0600 | [diff] [blame] | 664 | Entry: image-header: An entry which contains a pointer to the FDT map |
| 665 | --------------------------------------------------------------------- |
| 666 | |
| 667 | Properties / Entry arguments: |
| 668 | location: Location of header ("start" or "end" of image). This is |
| 669 | optional. If omitted then the entry must have an offset property. |
| 670 | |
| 671 | This adds an 8-byte entry to the start or end of the image, pointing to the |
| 672 | location of the FDT map. The format is a magic number followed by an offset |
| 673 | from the start or end of the image, in twos-compliment format. |
| 674 | |
| 675 | This entry must be in the top-level part of the image. |
| 676 | |
| 677 | NOTE: If the location is at the start/end, you will probably need to specify |
| 678 | sort-by-offset for the image, unless you actually put the image header |
| 679 | first/last in the entry list. |
| 680 | |
| 681 | |
| 682 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 683 | Entry: intel-cmc: Intel Chipset Micro Code (CMC) file |
| 684 | ----------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 685 | |
| 686 | Properties / Entry arguments: |
| 687 | - filename: Filename of file to read into entry |
| 688 | |
| 689 | This file contains microcode for some devices in a special format. An |
| 690 | example filename is 'Microcode/C0_22211.BIN'. |
| 691 | |
| 692 | See README.x86 for information about x86 binary blobs. |
| 693 | |
| 694 | |
| 695 | |
| 696 | Entry: intel-descriptor: Intel flash descriptor block (4KB) |
| 697 | ----------------------------------------------------------- |
| 698 | |
| 699 | Properties / Entry arguments: |
| 700 | filename: Filename of file containing the descriptor. This is typically |
| 701 | a 4KB binary file, sometimes called 'descriptor.bin' |
| 702 | |
| 703 | This entry is placed at the start of flash and provides information about |
| 704 | the SPI flash regions. In particular it provides the base address and |
| 705 | size of the ME (Management Engine) region, allowing us to place the ME |
| 706 | binary in the right place. |
| 707 | |
| 708 | With this entry in your image, the position of the 'intel-me' entry will be |
| 709 | fixed in the image, which avoids you needed to specify an offset for that |
| 710 | region. This is useful, because it is not possible to change the position |
| 711 | of the ME region without updating the descriptor. |
| 712 | |
| 713 | See README.x86 for information about x86 binary blobs. |
| 714 | |
| 715 | |
| 716 | |
Simon Glass | 5af1207 | 2019-08-24 07:22:50 -0600 | [diff] [blame] | 717 | Entry: intel-fit: Intel Firmware Image Table (FIT) |
| 718 | -------------------------------------------------- |
| 719 | |
| 720 | This entry contains a dummy FIT as required by recent Intel CPUs. The FIT |
| 721 | contains information about the firmware and microcode available in the |
| 722 | image. |
| 723 | |
| 724 | At present binman only supports a basic FIT with no microcode. |
| 725 | |
| 726 | |
| 727 | |
| 728 | Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer |
| 729 | -------------------------------------------------------------- |
| 730 | |
| 731 | This entry contains a pointer to the FIT. It is required to be at address |
| 732 | 0xffffffc0 in the image. |
| 733 | |
| 734 | |
| 735 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 736 | Entry: intel-fsp: Intel Firmware Support Package (FSP) file |
| 737 | ----------------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 738 | |
| 739 | Properties / Entry arguments: |
| 740 | - filename: Filename of file to read into entry |
| 741 | |
| 742 | This file contains binary blobs which are used on some devices to make the |
| 743 | platform work. U-Boot executes this code since it is not possible to set up |
| 744 | the hardware using U-Boot open-source code. Documentation is typically not |
| 745 | available in sufficient detail to allow this. |
| 746 | |
| 747 | An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd' |
| 748 | |
| 749 | See README.x86 for information about x86 binary blobs. |
| 750 | |
| 751 | |
| 752 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 753 | Entry: intel-fsp-m: Intel Firmware Support Package (FSP) memory init |
| 754 | -------------------------------------------------------------------- |
Simon Glass | ea0fff9 | 2019-08-24 07:23:07 -0600 | [diff] [blame] | 755 | |
| 756 | Properties / Entry arguments: |
| 757 | - filename: Filename of file to read into entry |
| 758 | |
| 759 | This file contains a binary blob which is used on some devices to set up |
| 760 | SDRAM. U-Boot executes this code in SPL so that it can make full use of |
| 761 | memory. Documentation is typically not available in sufficient detail to |
| 762 | allow U-Boot do this this itself.. |
| 763 | |
| 764 | An example filename is 'fsp_m.bin' |
| 765 | |
| 766 | See README.x86 for information about x86 binary blobs. |
| 767 | |
| 768 | |
| 769 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 770 | Entry: intel-fsp-s: Intel Firmware Support Package (FSP) silicon init |
| 771 | --------------------------------------------------------------------- |
Simon Glass | bc6a88f | 2019-10-20 21:31:35 -0600 | [diff] [blame] | 772 | |
| 773 | Properties / Entry arguments: |
| 774 | - filename: Filename of file to read into entry |
| 775 | |
| 776 | This file contains a binary blob which is used on some devices to set up |
| 777 | the silicon. U-Boot executes this code in U-Boot proper after SDRAM is |
| 778 | running, so that it can make full use of memory. Documentation is typically |
| 779 | not available in sufficient detail to allow U-Boot do this this itself. |
| 780 | |
| 781 | An example filename is 'fsp_s.bin' |
| 782 | |
| 783 | See README.x86 for information about x86 binary blobs. |
| 784 | |
| 785 | |
| 786 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 787 | Entry: intel-fsp-t: Intel Firmware Support Package (FSP) temp ram init |
| 788 | ---------------------------------------------------------------------- |
Simon Glass | 998d148 | 2019-10-20 21:31:36 -0600 | [diff] [blame] | 789 | |
| 790 | Properties / Entry arguments: |
| 791 | - filename: Filename of file to read into entry |
| 792 | |
| 793 | This file contains a binary blob which is used on some devices to set up |
| 794 | temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so |
| 795 | that it has access to memory for its stack and initial storage. |
| 796 | |
| 797 | An example filename is 'fsp_t.bin' |
| 798 | |
| 799 | See README.x86 for information about x86 binary blobs. |
| 800 | |
| 801 | |
| 802 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 803 | Entry: intel-ifwi: Intel Integrated Firmware Image (IFWI) file |
| 804 | -------------------------------------------------------------- |
Simon Glass | e073d4e | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 805 | |
| 806 | Properties / Entry arguments: |
| 807 | - filename: Filename of file to read into entry. This is either the |
| 808 | IFWI file itself, or a file that can be converted into one using a |
| 809 | tool |
| 810 | - convert-fit: If present this indicates that the ifwitool should be |
| 811 | used to convert the provided file into a IFWI. |
| 812 | |
| 813 | This file contains code and data used by the SoC that is required to make |
| 814 | it work. It includes U-Boot TPL, microcode, things related to the CSE |
| 815 | (Converged Security Engine, the microcontroller that loads all the firmware) |
| 816 | and other items beyond the wit of man. |
| 817 | |
| 818 | A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a |
| 819 | file that will be converted to an IFWI. |
| 820 | |
| 821 | The position of this entry is generally set by the intel-descriptor entry. |
| 822 | |
| 823 | The contents of the IFWI are specified by the subnodes of the IFWI node. |
| 824 | Each subnode describes an entry which is placed into the IFWFI with a given |
| 825 | sub-partition (and optional entry name). |
| 826 | |
Simon Glass | 3da9ce8 | 2019-08-24 07:22:47 -0600 | [diff] [blame] | 827 | Properties for subnodes: |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 828 | - ifwi-subpart: sub-parition to put this entry into, e.g. "IBBP" |
| 829 | - ifwi-entry: entry name t use, e.g. "IBBL" |
| 830 | - ifwi-replace: if present, indicates that the item should be replaced |
| 831 | in the IFWI. Otherwise it is added. |
Simon Glass | 3da9ce8 | 2019-08-24 07:22:47 -0600 | [diff] [blame] | 832 | |
Simon Glass | e073d4e | 2019-07-08 13:18:56 -0600 | [diff] [blame] | 833 | See README.x86 for information about x86 binary blobs. |
| 834 | |
| 835 | |
| 836 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 837 | Entry: intel-me: Intel Management Engine (ME) file |
| 838 | -------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 839 | |
| 840 | Properties / Entry arguments: |
| 841 | - filename: Filename of file to read into entry |
| 842 | |
| 843 | This file contains code used by the SoC that is required to make it work. |
| 844 | The Management Engine is like a background task that runs things that are |
Thomas Hebb | 32f2ca2 | 2019-11-13 18:18:03 -0800 | [diff] [blame] | 845 | not clearly documented, but may include keyboard, display and network |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 846 | access. For platform that use ME it is not possible to disable it. U-Boot |
| 847 | does not directly execute code in the ME binary. |
| 848 | |
| 849 | A typical filename is 'me.bin'. |
| 850 | |
Simon Glass | fa1c937 | 2019-07-08 13:18:38 -0600 | [diff] [blame] | 851 | The position of this entry is generally set by the intel-descriptor entry. |
| 852 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 853 | See README.x86 for information about x86 binary blobs. |
| 854 | |
| 855 | |
| 856 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 857 | Entry: intel-mrc: Intel Memory Reference Code (MRC) file |
| 858 | -------------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 859 | |
| 860 | Properties / Entry arguments: |
| 861 | - filename: Filename of file to read into entry |
| 862 | |
| 863 | This file contains code for setting up the SDRAM on some Intel systems. This |
| 864 | is executed by U-Boot when needed early during startup. A typical filename |
| 865 | is 'mrc.bin'. |
| 866 | |
| 867 | See README.x86 for information about x86 binary blobs. |
| 868 | |
| 869 | |
| 870 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 871 | Entry: intel-refcode: Intel Reference Code file |
| 872 | ----------------------------------------------- |
Simon Glass | 5385f5a | 2019-05-17 22:00:53 -0600 | [diff] [blame] | 873 | |
| 874 | Properties / Entry arguments: |
| 875 | - filename: Filename of file to read into entry |
| 876 | |
| 877 | This file contains code for setting up the platform on some Intel systems. |
| 878 | This is executed by U-Boot when needed early during startup. A typical |
| 879 | filename is 'refcode.bin'. |
| 880 | |
| 881 | See README.x86 for information about x86 binary blobs. |
| 882 | |
| 883 | |
| 884 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 885 | Entry: intel-vbt: Intel Video BIOS Table (VBT) file |
| 886 | --------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 887 | |
| 888 | Properties / Entry arguments: |
| 889 | - filename: Filename of file to read into entry |
| 890 | |
| 891 | This file contains code that sets up the integrated graphics subsystem on |
| 892 | some Intel SoCs. U-Boot executes this when the display is started up. |
| 893 | |
| 894 | See README.x86 for information about Intel binary blobs. |
| 895 | |
| 896 | |
| 897 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 898 | Entry: intel-vga: Intel Video Graphics Adaptor (VGA) file |
| 899 | --------------------------------------------------------- |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 900 | |
| 901 | Properties / Entry arguments: |
| 902 | - filename: Filename of file to read into entry |
| 903 | |
| 904 | This file contains code that sets up the integrated graphics subsystem on |
| 905 | some Intel SoCs. U-Boot executes this when the display is started up. |
| 906 | |
| 907 | This is similar to the VBT file but in a different format. |
| 908 | |
| 909 | See README.x86 for information about Intel binary blobs. |
| 910 | |
| 911 | |
| 912 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 913 | Entry: mkimage: Binary produced by mkimage |
| 914 | ------------------------------------------ |
Simon Glass | 0dc706f | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 915 | |
| 916 | Properties / Entry arguments: |
| 917 | - datafile: Filename for -d argument |
| 918 | - args: Other arguments to pass |
| 919 | |
| 920 | The data passed to mkimage is collected from subnodes of the mkimage node, |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 921 | e.g.:: |
Simon Glass | 0dc706f | 2020-07-09 18:39:31 -0600 | [diff] [blame] | 922 | |
| 923 | mkimage { |
| 924 | args = "-n test -T imximage"; |
| 925 | |
| 926 | u-boot-spl { |
| 927 | }; |
| 928 | }; |
| 929 | |
| 930 | This calls mkimage to create an imximage with u-boot-spl.bin as the input |
| 931 | file. The output from mkimage then becomes part of the image produced by |
| 932 | binman. |
| 933 | |
| 934 | |
| 935 | |
Bin Meng | 4c4d607 | 2021-05-10 20:23:33 +0800 | [diff] [blame] | 936 | Entry: opensbi: RISC-V OpenSBI fw_dynamic blob |
| 937 | ---------------------------------------------- |
| 938 | |
| 939 | Properties / Entry arguments: |
| 940 | - opensbi-path: Filename of file to read into entry. This is typically |
| 941 | called fw_dynamic.bin |
| 942 | |
| 943 | This entry holds the run-time firmware, typically started by U-Boot SPL. |
| 944 | See the U-Boot README for your architecture or board for how to use it. See |
| 945 | https://github.com/riscv/opensbi for more information about OpenSBI. |
| 946 | |
| 947 | |
| 948 | |
Jagdish Gediya | 9d368f3 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 949 | Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot |
| 950 | ----------------------------------------------------------------------------------------- |
| 951 | |
| 952 | Properties / Entry arguments: |
| 953 | - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin') |
| 954 | |
Thomas Hebb | 32f2ca2 | 2019-11-13 18:18:03 -0800 | [diff] [blame] | 955 | This entry is valid for PowerPC mpc85xx cpus. This entry holds |
Jagdish Gediya | 9d368f3 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 956 | 'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be |
| 957 | placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'. |
| 958 | |
| 959 | |
| 960 | |
Simon Glass | 96d340e | 2021-03-18 20:25:16 +1300 | [diff] [blame] | 961 | Entry: scp: System Control Processor (SCP) firmware blob |
| 962 | -------------------------------------------------------- |
Simon Glass | f324330 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 963 | |
| 964 | Properties / Entry arguments: |
| 965 | - scp-path: Filename of file to read into the entry, typically scp.bin |
| 966 | |
| 967 | This entry holds firmware for an external platform-specific coprocessor. |
| 968 | |
| 969 | |
| 970 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 971 | Entry: section: Entry that contains other entries |
| 972 | ------------------------------------------------- |
| 973 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 974 | A section is an entry which can contain other entries, thus allowing |
| 975 | hierarchical images to be created. See 'Sections and hierarchical images' |
| 976 | in the binman README for more information. |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 977 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 978 | The base implementation simply joins the various entries together, using |
| 979 | various rules about alignment, etc. |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 980 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 981 | Subclassing |
| 982 | ~~~~~~~~~~~ |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 983 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 984 | This class can be subclassed to support other file formats which hold |
| 985 | multiple entries, such as CBFS. To do this, override the following |
| 986 | functions. The documentation here describes what your function should do. |
| 987 | For example code, see etypes which subclass `Entry_section`, or `cbfs.py` |
| 988 | for a more involved example:: |
Simon Glass | 3decfa3 | 2020-09-01 05:13:54 -0600 | [diff] [blame] | 989 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 990 | $ grep -l \(Entry_section tools/binman/etype/*.py |
| 991 | |
| 992 | ReadNode() |
| 993 | Call `super().ReadNode()`, then read any special properties for the |
| 994 | section. Then call `self.ReadEntries()` to read the entries. |
| 995 | |
| 996 | Binman calls this at the start when reading the image description. |
| 997 | |
| 998 | ReadEntries() |
| 999 | Read in the subnodes of the section. This may involve creating entries |
| 1000 | of a particular etype automatically, as well as reading any special |
| 1001 | properties in the entries. For each entry, entry.ReadNode() should be |
| 1002 | called, to read the basic entry properties. The properties should be |
| 1003 | added to `self._entries[]`, in the correct order, with a suitable name. |
| 1004 | |
| 1005 | Binman calls this at the start when reading the image description. |
| 1006 | |
| 1007 | BuildSectionData(required) |
| 1008 | Create the custom file format that you want and return it as bytes. |
| 1009 | This likely sets up a file header, then loops through the entries, |
| 1010 | adding them to the file. For each entry, call `entry.GetData()` to |
| 1011 | obtain the data. If that returns None, and `required` is False, then |
| 1012 | this method must give up and return None. But if `required` is True then |
| 1013 | it should assume that all data is valid. |
| 1014 | |
| 1015 | Binman calls this when packing the image, to find out the size of |
| 1016 | everything. It is called again at the end when building the final image. |
| 1017 | |
| 1018 | SetImagePos(image_pos): |
| 1019 | Call `super().SetImagePos(image_pos)`, then set the `image_pos` values |
| 1020 | for each of the entries. This should use the custom file format to find |
| 1021 | the `start offset` (and `image_pos`) of each entry. If the file format |
| 1022 | uses compression in such a way that there is no offset available (other |
| 1023 | than reading the whole file and decompressing it), then the offsets for |
| 1024 | affected entries can remain unset (`None`). The size should also be set |
| 1025 | if possible. |
| 1026 | |
| 1027 | Binman calls this after the image has been packed, to update the |
| 1028 | location that all the entries ended up at. |
| 1029 | |
Simon Glass | 943bf78 | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 1030 | ReadChildData(child, decomp, alt_format): |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1031 | The default version of this may be good enough, if you are able to |
| 1032 | implement SetImagePos() correctly. But that is a bit of a bypass, so |
| 1033 | you can override this method to read from your custom file format. It |
| 1034 | should read the entire entry containing the custom file using |
| 1035 | `super().ReadData(True)`, then parse the file to get the data for the |
| 1036 | given child, then return that data. |
| 1037 | |
| 1038 | If your file format supports compression, the `decomp` argument tells |
| 1039 | you whether to return the compressed data (`decomp` is False) or to |
| 1040 | uncompress it first, then return the uncompressed data (`decomp` is |
| 1041 | True). This is used by the `binman extract -U` option. |
| 1042 | |
Simon Glass | 943bf78 | 2021-11-23 21:09:50 -0700 | [diff] [blame] | 1043 | If your entry supports alternative formats, the alt_format provides the |
| 1044 | alternative format that the user has selected. Your function should |
| 1045 | return data in that format. This is used by the 'binman extract -l' |
| 1046 | option. |
| 1047 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1048 | Binman calls this when reading in an image, in order to populate all the |
| 1049 | entries with the data from that image (`binman ls`). |
| 1050 | |
| 1051 | WriteChildData(child): |
| 1052 | Binman calls this after `child.data` is updated, to inform the custom |
| 1053 | file format about this, in case it needs to do updates. |
| 1054 | |
| 1055 | The default version of this does nothing and probably needs to be |
| 1056 | overridden for the 'binman replace' command to work. Your version should |
| 1057 | use `child.data` to update the data for that child in the custom file |
| 1058 | format. |
| 1059 | |
| 1060 | Binman calls this when updating an image that has been read in and in |
| 1061 | particular to update the data for a particular entry (`binman replace`) |
| 1062 | |
| 1063 | Properties / Entry arguments |
| 1064 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1065 | |
| 1066 | See :ref:`develop/package/binman:Image description format` for more |
| 1067 | information. |
| 1068 | |
| 1069 | align-default |
| 1070 | Default alignment for this section, if no alignment is given in the |
| 1071 | entry |
| 1072 | |
| 1073 | pad-byte |
| 1074 | Pad byte to use when padding |
| 1075 | |
| 1076 | sort-by-offset |
| 1077 | True if entries should be sorted by offset, False if they must be |
| 1078 | in-order in the device tree description |
| 1079 | |
| 1080 | end-at-4gb |
| 1081 | Used to build an x86 ROM which ends at 4GB (2^32) |
| 1082 | |
| 1083 | name-prefix |
| 1084 | Adds a prefix to the name of every entry in the section when writing out |
| 1085 | the map |
| 1086 | |
| 1087 | skip-at-start |
| 1088 | Number of bytes before the first entry starts. These effectively adjust |
| 1089 | the starting offset of entries. For example, if this is 16, then the |
| 1090 | first entry would start at 16. An entry with offset = 20 would in fact |
| 1091 | be written at offset 4 in the image file, since the first 16 bytes are |
| 1092 | skipped when writing. |
Simon Glass | 1736575 | 2021-04-03 11:05:10 +1300 | [diff] [blame] | 1093 | |
Simon Glass | 8beb11e | 2019-07-08 14:25:47 -0600 | [diff] [blame] | 1094 | Since a section is also an entry, it inherits all the properies of entries |
| 1095 | too. |
| 1096 | |
Simon Glass | 3f495f1 | 2021-11-23 11:03:49 -0700 | [diff] [blame] | 1097 | Note that the `allow_missing` member controls whether this section permits |
| 1098 | external blobs to be missing their contents. The option will produce an |
| 1099 | image but of course it will not work. It is useful to make sure that |
| 1100 | Continuous Integration systems can build without the binaries being |
| 1101 | available. This is set by the `SetAllowMissing()` method, if |
| 1102 | `--allow-missing` is passed to binman. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1103 | |
| 1104 | |
| 1105 | |
| 1106 | Entry: text: An entry which contains text |
| 1107 | ----------------------------------------- |
| 1108 | |
| 1109 | The text can be provided either in the node itself or by a command-line |
| 1110 | argument. There is a level of indirection to allow multiple text strings |
| 1111 | and sharing of text. |
| 1112 | |
| 1113 | Properties / Entry arguments: |
| 1114 | text-label: The value of this string indicates the property / entry-arg |
| 1115 | that contains the string to place in the entry |
| 1116 | <xxx> (actual name is the value of text-label): contains the string to |
| 1117 | place in the entry. |
Simon Glass | aa88b50 | 2019-07-08 13:18:40 -0600 | [diff] [blame] | 1118 | <text>: The text to place in the entry (overrides the above mechanism). |
| 1119 | This is useful when the text is constant. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1120 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1121 | Example node:: |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1122 | |
| 1123 | text { |
| 1124 | size = <50>; |
| 1125 | text-label = "message"; |
| 1126 | }; |
| 1127 | |
| 1128 | You can then use: |
| 1129 | |
| 1130 | binman -amessage="this is my message" |
| 1131 | |
| 1132 | and binman will insert that string into the entry. |
| 1133 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1134 | It is also possible to put the string directly in the node:: |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1135 | |
| 1136 | text { |
| 1137 | size = <8>; |
| 1138 | text-label = "message"; |
| 1139 | message = "a message directly in the node" |
| 1140 | }; |
| 1141 | |
Simon Glass | 6bc4309 | 2021-03-18 20:25:15 +1300 | [diff] [blame] | 1142 | or just:: |
Simon Glass | aa88b50 | 2019-07-08 13:18:40 -0600 | [diff] [blame] | 1143 | |
| 1144 | text { |
| 1145 | size = <8>; |
| 1146 | text = "some text directly in the node" |
| 1147 | }; |
| 1148 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1149 | The text is not itself nul-terminated. This can be achieved, if required, |
| 1150 | by setting the size of the entry to something larger than the text. |
| 1151 | |
| 1152 | |
| 1153 | |
| 1154 | Entry: u-boot: U-Boot flat binary |
| 1155 | --------------------------------- |
| 1156 | |
| 1157 | Properties / Entry arguments: |
| 1158 | - filename: Filename of u-boot.bin (default 'u-boot.bin') |
| 1159 | |
| 1160 | This is the U-Boot binary, containing relocation information to allow it |
| 1161 | to relocate itself at runtime. The binary typically includes a device tree |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1162 | blob at the end of it. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1163 | |
| 1164 | U-Boot can access binman symbols at runtime. See: |
| 1165 | |
| 1166 | 'Access to binman entry offsets at run time (fdt)' |
| 1167 | |
| 1168 | in the binman README for more information. |
| 1169 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1170 | Note that this entry is automatically replaced with u-boot-expanded unless |
Simon Glass | 3d43338 | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1171 | --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1172 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1173 | |
| 1174 | |
| 1175 | Entry: u-boot-dtb: U-Boot device tree |
| 1176 | ------------------------------------- |
| 1177 | |
| 1178 | Properties / Entry arguments: |
| 1179 | - filename: Filename of u-boot.dtb (default 'u-boot.dtb') |
| 1180 | |
| 1181 | This is the U-Boot device tree, containing configuration information for |
| 1182 | U-Boot. U-Boot needs this to know what devices are present and which drivers |
| 1183 | to activate. |
| 1184 | |
Simon Glass | 6ed45ba | 2018-09-14 04:57:24 -0600 | [diff] [blame] | 1185 | Note: This is mostly an internal entry type, used by others. This allows |
| 1186 | binman to know which entries contain a device tree. |
| 1187 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1188 | |
| 1189 | |
| 1190 | Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed |
| 1191 | ----------------------------------------------------------------------------------- |
| 1192 | |
| 1193 | Properties / Entry arguments: |
| 1194 | - filename: Filename of u-boot.dtb (default 'u-boot.dtb') |
| 1195 | |
| 1196 | See Entry_u_boot_ucode for full details of the three entries involved in |
| 1197 | this process. This entry provides the U-Boot device-tree file, which |
| 1198 | contains the microcode. If the microcode is not being collated into one |
| 1199 | place then the offset and size of the microcode is recorded by this entry, |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1200 | for use by u-boot-with-ucode_ptr. If it is being collated, then this |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1201 | entry deletes the microcode from the device tree (to save space) and makes |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1202 | it available to u-boot-ucode. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1203 | |
| 1204 | |
| 1205 | |
Simon Glass | fe1ae3e | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1206 | Entry: u-boot-elf: U-Boot ELF image |
| 1207 | ----------------------------------- |
| 1208 | |
| 1209 | Properties / Entry arguments: |
| 1210 | - filename: Filename of u-boot (default 'u-boot') |
| 1211 | |
| 1212 | This is the U-Boot ELF image. It does not include a device tree but can be |
| 1213 | relocated to any address for execution. |
| 1214 | |
| 1215 | |
| 1216 | |
Simon Glass | f324330 | 2020-10-26 17:39:59 -0600 | [diff] [blame] | 1217 | Entry: u-boot-env: An entry which contains a U-Boot environment |
| 1218 | --------------------------------------------------------------- |
| 1219 | |
| 1220 | Properties / Entry arguments: |
| 1221 | - filename: File containing the environment text, with each line in the |
| 1222 | form var=value |
| 1223 | |
| 1224 | |
| 1225 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1226 | Entry: u-boot-expanded: U-Boot flat binary broken out into its component parts |
| 1227 | ------------------------------------------------------------------------------ |
| 1228 | |
| 1229 | This is a section containing the U-Boot binary and a devicetree. Using this |
| 1230 | entry type automatically creates this section, with the following entries |
| 1231 | in it: |
| 1232 | |
| 1233 | u-boot-nodtb |
| 1234 | u-boot-dtb |
| 1235 | |
| 1236 | Having the devicetree separate allows binman to update it in the final |
| 1237 | image, so that the entries positions are provided to the running U-Boot. |
| 1238 | |
| 1239 | |
| 1240 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1241 | Entry: u-boot-img: U-Boot legacy image |
| 1242 | -------------------------------------- |
| 1243 | |
| 1244 | Properties / Entry arguments: |
| 1245 | - filename: Filename of u-boot.img (default 'u-boot.img') |
| 1246 | |
| 1247 | This is the U-Boot binary as a packaged image, in legacy format. It has a |
| 1248 | header which allows it to be loaded at the correct address for execution. |
| 1249 | |
| 1250 | You should use FIT (Flat Image Tree) instead of the legacy image for new |
| 1251 | applications. |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | Entry: u-boot-nodtb: U-Boot flat binary without device tree appended |
| 1256 | -------------------------------------------------------------------- |
| 1257 | |
| 1258 | Properties / Entry arguments: |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1259 | - filename: Filename to include (default 'u-boot-nodtb.bin') |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1260 | |
| 1261 | This is the U-Boot binary, containing relocation information to allow it |
| 1262 | to relocate itself at runtime. It does not include a device tree blob at |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1263 | the end of it so normally cannot work without it. You can add a u-boot-dtb |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1264 | entry after this one, or use a u-boot entry instead, normally expands to a |
| 1265 | section containing u-boot and u-boot-dtb |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1266 | |
| 1267 | |
| 1268 | |
| 1269 | Entry: u-boot-spl: U-Boot SPL binary |
| 1270 | ------------------------------------ |
| 1271 | |
| 1272 | Properties / Entry arguments: |
| 1273 | - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin') |
| 1274 | |
| 1275 | This is the U-Boot SPL (Secondary Program Loader) binary. This is a small |
| 1276 | binary which loads before U-Boot proper, typically into on-chip SRAM. It is |
| 1277 | responsible for locating, loading and jumping to U-Boot. Note that SPL is |
| 1278 | not relocatable so must be loaded to the correct address in SRAM, or written |
Simon Glass | b8ef5b6 | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1279 | to run from the correct address if direct flash execution is possible (e.g. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1280 | on x86 devices). |
| 1281 | |
| 1282 | SPL can access binman symbols at runtime. See: |
| 1283 | |
| 1284 | 'Access to binman entry offsets at run time (symbols)' |
| 1285 | |
| 1286 | in the binman README for more information. |
| 1287 | |
| 1288 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1289 | binman uses that to look up symbols to write into the SPL binary. |
| 1290 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1291 | Note that this entry is automatically replaced with u-boot-spl-expanded |
Simon Glass | 3d43338 | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1292 | unless --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1293 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1294 | |
| 1295 | |
| 1296 | Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region |
| 1297 | --------------------------------------------------------------------- |
| 1298 | |
| 1299 | Properties / Entry arguments: |
| 1300 | None |
| 1301 | |
Simon Glass | dccdc38 | 2021-03-18 20:24:55 +1300 | [diff] [blame] | 1302 | This holds the padding added after the SPL binary to cover the BSS (Block |
| 1303 | Started by Symbol) region. This region holds the various variables used by |
| 1304 | SPL. It is set to 0 by SPL when it starts up. If you want to append data to |
| 1305 | the SPL image (such as a device tree file), you must pad out the BSS region |
| 1306 | to avoid the data overlapping with U-Boot variables. This entry is useful in |
| 1307 | that case. It automatically pads out the entry size to cover both the code, |
| 1308 | data and BSS. |
| 1309 | |
| 1310 | The contents of this entry will a certain number of zero bytes, determined |
| 1311 | by __bss_size |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1312 | |
| 1313 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1314 | binman uses that to look up the BSS address. |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | Entry: u-boot-spl-dtb: U-Boot SPL device tree |
| 1319 | --------------------------------------------- |
| 1320 | |
| 1321 | Properties / Entry arguments: |
| 1322 | - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb') |
| 1323 | |
| 1324 | This is the SPL device tree, containing configuration information for |
| 1325 | SPL. SPL needs this to know what devices are present and which drivers |
| 1326 | to activate. |
| 1327 | |
| 1328 | |
| 1329 | |
Simon Glass | fe1ae3e | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1330 | Entry: u-boot-spl-elf: U-Boot SPL ELF image |
| 1331 | ------------------------------------------- |
| 1332 | |
| 1333 | Properties / Entry arguments: |
Simon Glass | a6a520e | 2019-07-08 13:18:45 -0600 | [diff] [blame] | 1334 | - filename: Filename of SPL u-boot (default 'spl/u-boot-spl') |
Simon Glass | fe1ae3e | 2018-09-14 04:57:35 -0600 | [diff] [blame] | 1335 | |
| 1336 | This is the U-Boot SPL ELF image. It does not include a device tree but can |
| 1337 | be relocated to any address for execution. |
| 1338 | |
| 1339 | |
| 1340 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1341 | Entry: u-boot-spl-expanded: U-Boot SPL flat binary broken out into its component parts |
| 1342 | -------------------------------------------------------------------------------------- |
| 1343 | |
| 1344 | Properties / Entry arguments: |
| 1345 | - spl-dtb: Controls whether this entry is selected (set to 'y' or '1' to |
| 1346 | select) |
| 1347 | |
| 1348 | This is a section containing the U-Boot binary, BSS padding if needed and a |
| 1349 | devicetree. Using this entry type automatically creates this section, with |
| 1350 | the following entries in it: |
| 1351 | |
| 1352 | u-boot-spl-nodtb |
| 1353 | u-boot-spl-bss-pad |
| 1354 | u-boot-dtb |
| 1355 | |
| 1356 | Having the devicetree separate allows binman to update it in the final |
| 1357 | image, so that the entries positions are provided to the running U-Boot. |
| 1358 | |
| 1359 | This entry is selected based on the value of the 'spl-dtb' entryarg. If |
| 1360 | this is non-empty (and not 'n' or '0') then this expanded entry is selected. |
| 1361 | |
| 1362 | |
| 1363 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1364 | Entry: u-boot-spl-nodtb: SPL binary without device tree appended |
| 1365 | ---------------------------------------------------------------- |
| 1366 | |
| 1367 | Properties / Entry arguments: |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1368 | - filename: Filename to include (default 'spl/u-boot-spl-nodtb.bin') |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1369 | |
| 1370 | This is the U-Boot SPL binary, It does not include a device tree blob at |
| 1371 | the end of it so may not be able to work without it, assuming SPL needs |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1372 | a device tree to operate on your platform. You can add a u-boot-spl-dtb |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1373 | entry after this one, or use a u-boot-spl entry instead' which normally |
| 1374 | expands to a section containing u-boot-spl-dtb, u-boot-spl-bss-pad and |
| 1375 | u-boot-spl-dtb |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1376 | |
Simon Glass | f589882 | 2021-03-18 20:24:56 +1300 | [diff] [blame] | 1377 | SPL can access binman symbols at runtime. See: |
| 1378 | |
| 1379 | 'Access to binman entry offsets at run time (symbols)' |
| 1380 | |
| 1381 | in the binman README for more information. |
| 1382 | |
| 1383 | The ELF file 'spl/u-boot-spl' must also be available for this to work, since |
| 1384 | binman uses that to look up symbols to write into the SPL binary. |
| 1385 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1386 | |
| 1387 | |
| 1388 | Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer |
| 1389 | ---------------------------------------------------------------------------- |
| 1390 | |
Simon Glass | f025363 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 1391 | This is used when SPL must set up the microcode for U-Boot. |
| 1392 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1393 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 1394 | process. |
| 1395 | |
| 1396 | |
| 1397 | |
Simon Glass | b8ef5b6 | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1398 | Entry: u-boot-tpl: U-Boot TPL binary |
| 1399 | ------------------------------------ |
| 1400 | |
| 1401 | Properties / Entry arguments: |
| 1402 | - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin') |
| 1403 | |
| 1404 | This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small |
| 1405 | binary which loads before SPL, typically into on-chip SRAM. It is |
| 1406 | responsible for locating, loading and jumping to SPL, the next-stage |
| 1407 | loader. Note that SPL is not relocatable so must be loaded to the correct |
| 1408 | address in SRAM, or written to run from the correct address if direct |
| 1409 | flash execution is possible (e.g. on x86 devices). |
| 1410 | |
| 1411 | SPL can access binman symbols at runtime. See: |
| 1412 | |
| 1413 | 'Access to binman entry offsets at run time (symbols)' |
| 1414 | |
| 1415 | in the binman README for more information. |
| 1416 | |
| 1417 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 1418 | binman uses that to look up symbols to write into the TPL binary. |
| 1419 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1420 | Note that this entry is automatically replaced with u-boot-tpl-expanded |
Simon Glass | 3d43338 | 2021-03-21 18:24:30 +1300 | [diff] [blame] | 1421 | unless --no-expanded is used or the node has a 'no-expanded' property. |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1422 | |
Simon Glass | b8ef5b6 | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1423 | |
| 1424 | |
Simon Glass | d26efc8 | 2021-03-18 20:24:58 +1300 | [diff] [blame] | 1425 | Entry: u-boot-tpl-bss-pad: U-Boot TPL binary padded with a BSS region |
| 1426 | --------------------------------------------------------------------- |
| 1427 | |
| 1428 | Properties / Entry arguments: |
| 1429 | None |
| 1430 | |
| 1431 | This holds the padding added after the TPL binary to cover the BSS (Block |
| 1432 | Started by Symbol) region. This region holds the various variables used by |
| 1433 | TPL. It is set to 0 by TPL when it starts up. If you want to append data to |
| 1434 | the TPL image (such as a device tree file), you must pad out the BSS region |
| 1435 | to avoid the data overlapping with U-Boot variables. This entry is useful in |
| 1436 | that case. It automatically pads out the entry size to cover both the code, |
| 1437 | data and BSS. |
| 1438 | |
| 1439 | The contents of this entry will a certain number of zero bytes, determined |
| 1440 | by __bss_size |
| 1441 | |
| 1442 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 1443 | binman uses that to look up the BSS address. |
| 1444 | |
| 1445 | |
| 1446 | |
Simon Glass | b8ef5b6 | 2018-07-17 13:25:48 -0600 | [diff] [blame] | 1447 | Entry: u-boot-tpl-dtb: U-Boot TPL device tree |
| 1448 | --------------------------------------------- |
| 1449 | |
| 1450 | Properties / Entry arguments: |
| 1451 | - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb') |
| 1452 | |
| 1453 | This is the TPL device tree, containing configuration information for |
| 1454 | TPL. TPL needs this to know what devices are present and which drivers |
| 1455 | to activate. |
| 1456 | |
| 1457 | |
| 1458 | |
Simon Glass | f025363 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 1459 | Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer |
| 1460 | ---------------------------------------------------------------------------- |
| 1461 | |
| 1462 | This is used when TPL must set up the microcode for U-Boot. |
| 1463 | |
| 1464 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 1465 | process. |
| 1466 | |
| 1467 | |
| 1468 | |
Simon Glass | 4c65025 | 2019-07-08 13:18:46 -0600 | [diff] [blame] | 1469 | Entry: u-boot-tpl-elf: U-Boot TPL ELF image |
| 1470 | ------------------------------------------- |
| 1471 | |
| 1472 | Properties / Entry arguments: |
| 1473 | - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl') |
| 1474 | |
| 1475 | This is the U-Boot TPL ELF image. It does not include a device tree but can |
| 1476 | be relocated to any address for execution. |
| 1477 | |
| 1478 | |
| 1479 | |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1480 | Entry: u-boot-tpl-expanded: U-Boot TPL flat binary broken out into its component parts |
| 1481 | -------------------------------------------------------------------------------------- |
| 1482 | |
| 1483 | Properties / Entry arguments: |
| 1484 | - tpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to |
| 1485 | select) |
| 1486 | |
| 1487 | This is a section containing the U-Boot binary, BSS padding if needed and a |
| 1488 | devicetree. Using this entry type automatically creates this section, with |
| 1489 | the following entries in it: |
| 1490 | |
| 1491 | u-boot-tpl-nodtb |
| 1492 | u-boot-tpl-bss-pad |
| 1493 | u-boot-dtb |
| 1494 | |
| 1495 | Having the devicetree separate allows binman to update it in the final |
| 1496 | image, so that the entries positions are provided to the running U-Boot. |
| 1497 | |
| 1498 | This entry is selected based on the value of the 'tpl-dtb' entryarg. If |
| 1499 | this is non-empty (and not 'n' or '0') then this expanded entry is selected. |
| 1500 | |
| 1501 | |
| 1502 | |
Simon Glass | 77a64e0 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 1503 | Entry: u-boot-tpl-nodtb: TPL binary without device tree appended |
| 1504 | ---------------------------------------------------------------- |
| 1505 | |
| 1506 | Properties / Entry arguments: |
| 1507 | - filename: Filename to include (default 'tpl/u-boot-tpl-nodtb.bin') |
| 1508 | |
| 1509 | This is the U-Boot TPL binary, It does not include a device tree blob at |
| 1510 | the end of it so may not be able to work without it, assuming TPL needs |
| 1511 | a device tree to operate on your platform. You can add a u-boot-tpl-dtb |
Simon Glass | 0668492 | 2021-03-18 20:25:07 +1300 | [diff] [blame] | 1512 | entry after this one, or use a u-boot-tpl entry instead, which normally |
| 1513 | expands to a section containing u-boot-tpl-dtb, u-boot-tpl-bss-pad and |
| 1514 | u-boot-tpl-dtb |
Simon Glass | 77a64e0 | 2021-03-18 20:24:57 +1300 | [diff] [blame] | 1515 | |
| 1516 | TPL can access binman symbols at runtime. See: |
| 1517 | |
| 1518 | 'Access to binman entry offsets at run time (symbols)' |
| 1519 | |
| 1520 | in the binman README for more information. |
| 1521 | |
| 1522 | The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
| 1523 | binman uses that to look up symbols to write into the TPL binary. |
| 1524 | |
| 1525 | |
| 1526 | |
Simon Glass | f025363 | 2018-09-14 04:57:32 -0600 | [diff] [blame] | 1527 | Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer |
| 1528 | ---------------------------------------------------------------------------- |
| 1529 | |
| 1530 | See Entry_u_boot_ucode for full details of the entries involved in this |
| 1531 | process. |
| 1532 | |
| 1533 | |
| 1534 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1535 | Entry: u-boot-ucode: U-Boot microcode block |
| 1536 | ------------------------------------------- |
| 1537 | |
| 1538 | Properties / Entry arguments: |
| 1539 | None |
| 1540 | |
| 1541 | The contents of this entry are filled in automatically by other entries |
| 1542 | which must also be in the image. |
| 1543 | |
| 1544 | U-Boot on x86 needs a single block of microcode. This is collected from |
| 1545 | the various microcode update nodes in the device tree. It is also unable |
| 1546 | to read the microcode from the device tree on platforms that use FSP |
| 1547 | (Firmware Support Package) binaries, because the API requires that the |
| 1548 | microcode is supplied before there is any SRAM available to use (i.e. |
| 1549 | the FSP sets up the SRAM / cache-as-RAM but does so in the call that |
| 1550 | requires the microcode!). To keep things simple, all x86 platforms handle |
| 1551 | microcode the same way in U-Boot (even non-FSP platforms). This is that |
| 1552 | a table is placed at _dt_ucode_base_size containing the base address and |
| 1553 | size of the microcode. This is either passed to the FSP (for FSP |
| 1554 | platforms), or used to set up the microcode (for non-FSP platforms). |
| 1555 | This all happens in the build system since it is the only way to get |
| 1556 | the microcode into a single blob and accessible without SRAM. |
| 1557 | |
| 1558 | There are two cases to handle. If there is only one microcode blob in |
| 1559 | the device tree, then the ucode pointer it set to point to that. This |
| 1560 | entry (u-boot-ucode) is empty. If there is more than one update, then |
| 1561 | this entry holds the concatenation of all updates, and the device tree |
| 1562 | entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This |
| 1563 | last step ensures that that the microcode appears in one contiguous |
| 1564 | block in the image and is not unnecessarily duplicated in the device |
| 1565 | tree. It is referred to as 'collation' here. |
| 1566 | |
| 1567 | Entry types that have a part to play in handling microcode: |
| 1568 | |
| 1569 | Entry_u_boot_with_ucode_ptr: |
| 1570 | Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree). |
| 1571 | It updates it with the address and size of the microcode so that |
| 1572 | U-Boot can find it early on start-up. |
| 1573 | Entry_u_boot_dtb_with_ucode: |
| 1574 | Contains u-boot.dtb. It stores the microcode in a |
| 1575 | 'self.ucode_data' property, which is then read by this class to |
| 1576 | obtain the microcode if needed. If collation is performed, it |
| 1577 | removes the microcode from the device tree. |
| 1578 | Entry_u_boot_ucode: |
| 1579 | This class. If collation is enabled it reads the microcode from |
| 1580 | the Entry_u_boot_dtb_with_ucode entry, and uses it as the |
| 1581 | contents of this entry. |
| 1582 | |
| 1583 | |
| 1584 | |
| 1585 | Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer |
| 1586 | -------------------------------------------------------------------- |
| 1587 | |
| 1588 | Properties / Entry arguments: |
Masahiro Yamada | f6a8c0f | 2019-12-14 13:47:26 +0900 | [diff] [blame] | 1589 | - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin') |
Simon Glass | f069303 | 2018-09-14 04:57:07 -0600 | [diff] [blame] | 1590 | - optional-ucode: boolean property to make microcode optional. If the |
| 1591 | u-boot.bin image does not include microcode, no error will |
| 1592 | be generated. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1593 | |
| 1594 | See Entry_u_boot_ucode for full details of the three entries involved in |
| 1595 | this process. This entry updates U-Boot with the offset and size of the |
| 1596 | microcode, to allow early x86 boot code to find it without doing anything |
Simon Glass | adc59ea | 2021-03-18 20:24:54 +1300 | [diff] [blame] | 1597 | complicated. Otherwise it is the same as the u-boot entry. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1598 | |
| 1599 | |
| 1600 | |
Simon Glass | 24d0d3c | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 1601 | Entry: vblock: An entry which contains a Chromium OS verified boot block |
| 1602 | ------------------------------------------------------------------------ |
| 1603 | |
| 1604 | Properties / Entry arguments: |
Simon Glass | 5385f5a | 2019-05-17 22:00:53 -0600 | [diff] [blame] | 1605 | - content: List of phandles to entries to sign |
Simon Glass | 24d0d3c | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 1606 | - keydir: Directory containing the public keys to use |
| 1607 | - keyblock: Name of the key file to use (inside keydir) |
| 1608 | - signprivate: Name of provide key file to use (inside keydir) |
| 1609 | - version: Version number of the vblock (typically 1) |
| 1610 | - kernelkey: Name of the kernel key to use (inside keydir) |
| 1611 | - preamble-flags: Value of the vboot preamble flags (typically 0) |
| 1612 | |
Simon Glass | a326b49 | 2018-09-14 04:57:11 -0600 | [diff] [blame] | 1613 | Output files: |
| 1614 | - input.<unique_name> - input file passed to futility |
| 1615 | - vblock.<unique_name> - output file generated by futility (which is |
| 1616 | used as the entry contents) |
| 1617 | |
Jagdish Gediya | 9d368f3 | 2018-09-03 21:35:08 +0530 | [diff] [blame] | 1618 | Chromium OS signs the read-write firmware and kernel, writing the signature |
Simon Glass | 24d0d3c | 2018-07-17 13:25:47 -0600 | [diff] [blame] | 1619 | in this block. This allows U-Boot to verify that the next firmware stage |
| 1620 | and kernel are genuine. |
| 1621 | |
| 1622 | |
| 1623 | |
Simon Glass | 2250ee6 | 2019-08-24 07:22:48 -0600 | [diff] [blame] | 1624 | Entry: x86-reset16: x86 16-bit reset code for U-Boot |
| 1625 | ---------------------------------------------------- |
| 1626 | |
| 1627 | Properties / Entry arguments: |
| 1628 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 1629 | 'u-boot-x86-reset16.bin') |
| 1630 | |
| 1631 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 1632 | must be placed at a particular address. This entry holds that code. It is |
| 1633 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 1634 | for jumping to the x86-start16 code, which continues execution. |
| 1635 | |
| 1636 | For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead. |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot |
| 1641 | -------------------------------------------------------- |
| 1642 | |
| 1643 | Properties / Entry arguments: |
| 1644 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 1645 | 'u-boot-x86-reset16.bin') |
| 1646 | |
| 1647 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 1648 | must be placed at a particular address. This entry holds that code. It is |
| 1649 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 1650 | for jumping to the x86-start16 code, which continues execution. |
| 1651 | |
| 1652 | For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead. |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot |
| 1657 | -------------------------------------------------------- |
| 1658 | |
| 1659 | Properties / Entry arguments: |
| 1660 | - filename: Filename of u-boot-x86-reset16.bin (default |
| 1661 | 'u-boot-x86-reset16.bin') |
| 1662 | |
| 1663 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 1664 | must be placed at a particular address. This entry holds that code. It is |
| 1665 | typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible |
| 1666 | for jumping to the x86-start16 code, which continues execution. |
| 1667 | |
| 1668 | For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead. |
| 1669 | |
| 1670 | |
| 1671 | |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1672 | Entry: x86-start16: x86 16-bit start-up code for U-Boot |
| 1673 | ------------------------------------------------------- |
| 1674 | |
| 1675 | Properties / Entry arguments: |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1676 | - filename: Filename of u-boot-x86-start16.bin (default |
| 1677 | 'u-boot-x86-start16.bin') |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1678 | |
| 1679 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1680 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 1681 | entry holds that code. It is typically placed at offset |
| 1682 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 1683 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 1684 | U-Boot). |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1685 | |
| 1686 | For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead. |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | Entry: x86-start16-spl: x86 16-bit start-up code for SPL |
| 1691 | -------------------------------------------------------- |
| 1692 | |
| 1693 | Properties / Entry arguments: |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1694 | - filename: Filename of spl/u-boot-x86-start16-spl.bin (default |
| 1695 | 'spl/u-boot-x86-start16-spl.bin') |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1696 | |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1697 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 1698 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 1699 | entry holds that code. It is typically placed at offset |
| 1700 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 1701 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 1702 | U-Boot). |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1703 | |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1704 | For 32-bit U-Boot, the 'x86-start16' entry type is used instead. |
Simon Glass | 5a5da7c | 2018-07-17 13:25:37 -0600 | [diff] [blame] | 1705 | |
| 1706 | |
| 1707 | |
Simon Glass | 35b384c | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 1708 | Entry: x86-start16-tpl: x86 16-bit start-up code for TPL |
| 1709 | -------------------------------------------------------- |
| 1710 | |
| 1711 | Properties / Entry arguments: |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1712 | - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default |
| 1713 | 'tpl/u-boot-x86-start16-tpl.bin') |
Simon Glass | 35b384c | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 1714 | |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1715 | x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code |
| 1716 | must be placed in the top 64KB of the ROM. The reset code jumps to it. This |
| 1717 | entry holds that code. It is typically placed at offset |
| 1718 | CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode |
| 1719 | and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit |
| 1720 | U-Boot). |
Simon Glass | 35b384c | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 1721 | |
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 1722 | If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types |
Simon Glass | 35b384c | 2018-09-14 04:57:10 -0600 | [diff] [blame] | 1723 | may be used instead. |
| 1724 | |
| 1725 | |
| 1726 | |