blob: 78f95dae1a4e916828dae2393d55e624ee264c58 [file] [log] [blame]
Simon Glass7a61c6b2018-07-17 13:25:37 -06001Binman Entry Documentation
2===========================
3
4This file describes the entry types supported by binman. These entry types can
5be placed in an image one by one to build up a final firmware image. It is
6fairly easy to create new entry types. Just add a new file to the 'etype'
7directory. You can use the existing entries as examples.
8
9Note that some entries are subclasses of others, using and extending their
10features to produce new behaviours.
11
12
13
Simon Glassa7c97782022-08-07 16:33:25 -060014.. _etype_atf_bl31:
15
Simon Glass8911fa12021-03-18 20:25:16 +130016Entry: atf-bl31: ARM Trusted Firmware (ATF) BL31 blob
17-----------------------------------------------------
Simon Glass559c4de2020-09-01 05:13:58 -060018
19Properties / Entry arguments:
20 - atf-bl31-path: Filename of file to read into entry. This is typically
21 called bl31.bin or bl31.elf
22
23This entry holds the run-time firmware, typically started by U-Boot SPL.
24See the U-Boot README for your architecture or board for how to use it. See
25https://github.com/ARM-software/arm-trusted-firmware for more information
26about ATF.
27
28
29
Simon Glassa7c97782022-08-07 16:33:25 -060030.. _etype_atf_fip:
31
Simon Glass3efb2972021-11-23 21:08:59 -070032Entry: atf-fip: ARM Trusted Firmware's Firmware Image Package (FIP)
33-------------------------------------------------------------------
34
35A FIP_ provides a way to group binaries in a firmware image, used by ARM's
36Trusted Firmware A (TF-A) code. It is a simple format consisting of a
37table of contents with information about the type, offset and size of the
38binaries in the FIP. It is quite similar to FMAP, with the major difference
39that it uses UUIDs to indicate the type of each entry.
40
41Note: It is recommended to always add an fdtmap to every image, as well as
42any FIPs so that binman and other tools can access the entire image
43correctly.
44
45The UUIDs correspond to useful names in `fiptool`, provided by ATF to
46operate on FIPs. Binman uses these names to make it easier to understand
47what is going on, although it is possible to provide a UUID if needed.
48
49The 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
65This describes a FIP with three entries: soc-fw, scp-fwu-cfg and nt-fw.
66You can use normal (non-external) binaries like U-Boot simply by adding a
67FIP type, with the `fip-type` property, as above.
68
69Since FIP exists to bring blobs together, Binman assumes that all FIP
70entries 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,
72even though it will not actually work.
73
74The size of the FIP depends on the size of the binaries. There is currently
75no way to specify a fixed size. If the `atf-fip` node has a `size` entry,
76this affects the space taken up by the `atf-fip` entry, but the FIP itself
77does not expand to use that space.
78
79Some other FIP features are available with Binman. The header and the
80entries have 64-bit flag works. The flag flags do not seem to be defined
81anywhere, but you can use `fip-hdr-flags` and fip-flags` to set the values
82of the header and entries respectively.
83
84FIP entries can be aligned to a particular power-of-two boundary. Use
85fip-align for this.
86
87Binman only understands the entry types that are included in its
88implementation. It is possible to specify a 16-byte UUID instead, using the
89fip-uuid property. In this case Binman doesn't know what its type is, so
90just 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
114Binman allows reading and updating FIP entries after the image is created,
115provided that an FDPMAP is present too. Updates which change the size of a
116FIP entry will cause it to be expanded or contracted as needed.
117
118Properties for top-level atf-fip node
119~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120
121fip-hdr-flags (64 bits)
122 Sets the flags for the FIP header.
123
124Properties for subnodes
125~~~~~~~~~~~~~~~~~~~~~~~
126
127fip-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
132fip-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
137fip-flags (64 bits)
138 Set the flags for a FIP entry. Use in one of the subnodes of the
139 7atf-fip entry.
140
141fip-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
145Adding new FIP-entry types
146~~~~~~~~~~~~~~~~~~~~~~~~~~
147
148When 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
150new types, then `send a patch`_ to the U-Boot mailing list. There are two
151source 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
156To 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
162If it shows there is an update, it writes a new version of `fip_util.py`
163to `fip_util.py.out`. You can change the output file using the `-i` flag.
164If you have a problem, use `-D` to enable traceback debugging.
165
166FIP commentary
167~~~~~~~~~~~~~~
168
169As a side effect of use of UUIDs, FIP does not support multiple
170entries of the same type, such as might be used to store fonts or graphics
171icons, for example. For verified boot it could be used for each part of the
172image (e.g. separate FIPs for A and B) but cannot describe the whole
173firmware image. As with FMAP there is no hierarchy defined, although FMAP
174works around this by having 'section' areas which encompass others. A
175similar workaround would be possible with FIP but is not currently defined.
176
177It is recommended to always add an fdtmap to every image, as well as any
178FIPs 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 Glassa7c97782022-08-07 16:33:25 -0600186.. _etype_blob:
187
Simon Glass8911fa12021-03-18 20:25:16 +1300188Entry: blob: Arbitrary binary blob
189----------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -0600190
191Note: This should not be used by itself. It is normally used as a parent
192class by other entry types.
193
194Properties / Entry arguments:
195 - filename: Filename of file to read into entry
Simon Glass7ba33592018-09-14 04:57:26 -0600196 - compress: Compression algorithm to use:
197 none: No compression
198 lz4: Use lz4 compression (via 'lz4' command-line utility)
Simon Glass7a61c6b2018-07-17 13:25:37 -0600199
200This entry reads data from a file and places it in the entry. The
201default filename is often specified specified by the subclass. See for
Simon Glass537e0062021-03-18 20:24:54 +1300202example the 'u-boot' entry which provides the filename 'u-boot.bin'.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600203
Simon Glass7ba33592018-09-14 04:57:26 -0600204If compression is enabled, an extra 'uncomp-size' property is written to
205the node (if enabled with -u) which provides the uncompressed size of the
206data.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600207
208
Simon Glass7a61c6b2018-07-17 13:25:37 -0600209
Simon Glassa7c97782022-08-07 16:33:25 -0600210.. _etype_blob_dtb:
211
Simon Glasse219aa42018-09-14 04:57:24 -0600212Entry: blob-dtb: A blob that holds a device tree
213------------------------------------------------
214
215This is a blob containing a device tree. The contents of the blob are
216obtained from the list of available device-tree files, managed by the
217'state' module.
218
Simon Glassda6a9082023-01-07 14:07:10 -0700219Additional attributes:
220 prepend: Header used (e.g. 'length')
Simon Glasse219aa42018-09-14 04:57:24 -0600221
222
Simon Glassda6a9082023-01-07 14:07:10 -0700223
Simon Glassa7c97782022-08-07 16:33:25 -0600224.. _etype_blob_ext:
225
Simon Glass8911fa12021-03-18 20:25:16 +1300226Entry: blob-ext: Externally built binary blob
227---------------------------------------------
Simon Glass5e560182020-07-09 18:39:36 -0600228
229Note: This should not be used by itself. It is normally used as a parent
230class by other entry types.
231
Simon Glass5d94cc62020-07-09 18:39:38 -0600232If the file providing this blob is missing, binman can optionally ignore it
233and produce a broken image with a warning.
234
Simon Glass5e560182020-07-09 18:39:36 -0600235See 'blob' for Properties / Entry arguments.
236
237
238
Simon Glassa7c97782022-08-07 16:33:25 -0600239.. _etype_blob_ext_list:
240
Simon Glass0b00ae62021-11-23 21:09:52 -0700241Entry: blob-ext-list: List of externally built binary blobs
242-----------------------------------------------------------
243
244This is like blob-ext except that a number of blobs can be provided,
245typically with some sort of relationship, e.g. all are DDC parameters.
246
247If any of the external files needed by this llist is missing, binman can
248optionally ignore it and produce a broken image with a warning.
249
250Args:
251 filenames: List of filenames to read and include
252
253
Simon Glassa7c97782022-08-07 16:33:25 -0600254
255.. _etype_blob_named_by_arg:
Simon Glass0b00ae62021-11-23 21:09:52 -0700256
Simon Glassdb168d42018-07-17 13:25:39 -0600257Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
258-----------------------------------------------------------------------------------------
259
260Properties / Entry arguments:
261 - <xxx>-path: Filename containing the contents of this entry (optional,
Simon Glass21db0ff2020-09-01 05:13:54 -0600262 defaults to None)
Simon Glassdb168d42018-07-17 13:25:39 -0600263
264where <xxx> is the blob_fname argument to the constructor.
265
266This entry cannot be used directly. Instead, it is used as a parent class
267for another entry, which defined blob_fname. This parameter is used to
268set the entry-arg or property containing the filename. The entry-arg or
269property is in turn used to set the actual filename.
270
271See cros_ec_rw for an example of this.
272
273
274
Simon Glassa7c97782022-08-07 16:33:25 -0600275.. _etype_blob_phase:
276
Simon Glass718b5292021-03-18 20:25:07 +1300277Entry: blob-phase: Section that holds a phase binary
278----------------------------------------------------
279
280This is a base class that should not normally be used directly. It is used
281when converting a 'u-boot' entry automatically into a 'u-boot-expanded'
282entry; similarly for SPL.
283
284
Simon Glassa7c97782022-08-07 16:33:25 -0600285
286.. _etype_cbfs:
Simon Glass718b5292021-03-18 20:25:07 +1300287
Simon Glass8911fa12021-03-18 20:25:16 +1300288Entry: cbfs: Coreboot Filesystem (CBFS)
289---------------------------------------
Simon Glass1de34482019-07-08 13:18:53 -0600290
291A CBFS provides a way to group files into a group. It has a simple directory
292structure and allows the position of individual files to be set, since it is
293designed to support execute-in-place in an x86 SPI-flash device. Where XIP
294is not used, it supports compression and storing ELF files.
295
296CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
297
Simon Glass0ac96b62021-03-18 20:25:15 +1300298The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.::
Simon Glass1de34482019-07-08 13:18:53 -0600299
300 cbfs {
301 size = <0x100000>;
302 u-boot {
303 cbfs-type = "raw";
304 };
305 u-boot-dtb {
306 cbfs-type = "raw";
307 };
308 };
309
310This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
311Note that the size is required since binman does not support calculating it.
312The contents of each entry is just what binman would normally provide if it
313were not a CBFS node. A blob type can be used to import arbitrary files as
Simon Glass0ac96b62021-03-18 20:25:15 +1300314with the second subnode below::
Simon Glass1de34482019-07-08 13:18:53 -0600315
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 Glassc2f1aed2019-07-08 13:18:56 -0600328 cbfs-offset = <0x100000>;
Simon Glass1de34482019-07-08 13:18:53 -0600329 };
330 };
331
332This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
333u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
334
335
336Properties supported in the top-level CBFS node:
337
338cbfs-arch:
339 Defaults to "x86", but you can specify the architecture if needed.
340
341
342Properties supported in the CBFS entry subnodes:
343
344cbfs-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
349cbfs-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 Glass0ac96b62021-03-18 20:25:15 +1300360 entry::
Simon Glass1de34482019-07-08 13:18:53 -0600361
362 cbfs {
363 size = <0x100000>;
364 u-boot-elf {
365 cbfs-name = "BOOT";
366 cbfs-type = "stage";
367 };
368 };
369
Simon Glass0ac96b62021-03-18 20:25:15 +1300370 You can use your own ELF file with something like::
Simon Glass1de34482019-07-08 13:18:53 -0600371
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 Glassc2f1aed2019-07-08 13:18:56 -0600387cbfs-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 Glass1de34482019-07-08 13:18:53 -0600396
397The current implementation supports only a subset of CBFS features. It does
398not 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
400particular offset in the CBFS and a few other things.
401
402Of course binman can create images containing multiple CBFSs, simply by
Simon Glass0ac96b62021-03-18 20:25:15 +1300403defining these in the binman config::
Simon Glass1de34482019-07-08 13:18:53 -0600404
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
435This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
436both of size 1MB.
437
438
439
Simon Glassa7c97782022-08-07 16:33:25 -0600440.. _etype_collection:
441
Simon Glasse1915782021-03-21 18:24:31 +1300442Entry: collection: An entry which contains a collection of other entries
443------------------------------------------------------------------------
444
445Properties / Entry arguments:
446 - content: List of phandles to entries to include
447
448This allows reusing the contents of other entries. The contents of the
449listed entries are combined to form this entry. This serves as a useful
450base class for entry types which need to process data from elsewhere in
451the image, not necessarily child entries.
452
Simon Glassbd5cd882022-08-13 11:40:50 -0600453The entries can generally be anywhere in the same image, even if they are in
454a different section from this entry.
455
Simon Glasse1915782021-03-21 18:24:31 +1300456
457
Simon Glassa7c97782022-08-07 16:33:25 -0600458.. _etype_cros_ec_rw:
459
Simon Glassdb168d42018-07-17 13:25:39 -0600460Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
461--------------------------------------------------------------------------------
462
463Properties / Entry arguments:
464 - cros-ec-rw-path: Filename containing the EC image
465
466This entry holds a Chromium OS EC (embedded controller) image, for use in
467updating the EC on startup via software sync.
468
469
470
Simon Glassa7c97782022-08-07 16:33:25 -0600471.. _etype_fdtmap:
472
Simon Glass0f621332019-07-08 14:25:27 -0600473Entry: fdtmap: An entry which contains an FDT map
474-------------------------------------------------
475
476Properties / Entry arguments:
477 None
478
479An FDT map is just a header followed by an FDT containing a list of all the
Simon Glassfb30e292019-07-20 12:23:51 -0600480entries in the image. The root node corresponds to the image node in the
481original FDT, and an image-name property indicates the image name in that
482original tree.
Simon Glass0f621332019-07-08 14:25:27 -0600483
484The header is the string _FDTMAP_ followed by 8 unused bytes.
485
486When used, this entry will be populated with an FDT map which reflects the
487entries in the current image. Hierarchy is preserved, and all offsets and
488sizes are included.
489
490Note that the -u option must be provided to ensure that binman updates the
491FDT with the position of each entry.
492
Simon Glass0ac96b62021-03-18 20:25:15 +1300493Example output for a simple image with U-Boot and an FDT map::
Simon Glass0f621332019-07-08 14:25:27 -0600494
Simon Glass0ac96b62021-03-18 20:25:15 +1300495 / {
496 image-name = "binman";
497 size = <0x00000112>;
Simon Glass0f621332019-07-08 14:25:27 -0600498 image-pos = <0x00000000>;
499 offset = <0x00000000>;
Simon Glass0ac96b62021-03-18 20:25:15 +1300500 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 Glass0f621332019-07-08 14:25:27 -0600510 };
Simon Glass0f621332019-07-08 14:25:27 -0600511
Simon Glassfb30e292019-07-20 12:23:51 -0600512If allow-repack is used then 'orig-offset' and 'orig-size' properties are
513added as necessary. See the binman README.
514
Simon Glass637958f2021-11-23 21:09:50 -0700515When extracting files, an alternative 'fdt' format is available for fdtmaps.
516Use `binman extract -F fdt ...` to use this. It will export a devicetree,
517without the fdtmap header, so it can be viewed with `fdtdump`.
Simon Glass0f621332019-07-08 14:25:27 -0600518
519
Simon Glass637958f2021-11-23 21:09:50 -0700520
Simon Glassa7c97782022-08-07 16:33:25 -0600521.. _etype_files:
522
Simon Glass8911fa12021-03-18 20:25:16 +1300523Entry: files: A set of files arranged in a section
524--------------------------------------------------
Simon Glassac6328c2018-09-14 04:57:28 -0600525
526Properties / Entry arguments:
527 - pattern: Filename pattern to match the files to include
Simon Glass51d02ad2020-10-26 17:40:07 -0600528 - files-compress: Compression algorithm to use:
Simon Glassac6328c2018-09-14 04:57:28 -0600529 none: No compression
530 lz4: Use lz4 compression (via 'lz4' command-line utility)
Simon Glass3f093a32021-03-18 20:24:53 +1300531 - files-align: Align each file to the given alignment
Simon Glassac6328c2018-09-14 04:57:28 -0600532
533This entry reads a number of files and places each in a separate sub-entry
534within this entry. To access these you need to enable device-tree updates
535at run-time so you can obtain the file positions.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600536
537
Simon Glassac6328c2018-09-14 04:57:28 -0600538
Simon Glassa7c97782022-08-07 16:33:25 -0600539.. _etype_fill:
540
Simon Glass53f53992018-07-17 13:25:40 -0600541Entry: fill: An entry which is filled to a particular byte value
542----------------------------------------------------------------
543
544Properties / Entry arguments:
545 - fill-byte: Byte to use to fill the entry
546
547Note that the size property must be set since otherwise this entry does not
548know how large it should be.
549
550You can often achieve the same effect using the pad-byte property of the
551overall image, in that the space between entries will then be padded with
552that byte. But this entry is sometimes useful for explicitly setting the
553byte value of a region.
554
555
Simon Glassc7b010d2020-07-09 18:39:45 -0600556
Simon Glassa7c97782022-08-07 16:33:25 -0600557.. _etype_fit:
558
Simon Glass8911fa12021-03-18 20:25:16 +1300559Entry: fit: Flat Image Tree (FIT)
560---------------------------------
Simon Glass45d556d2020-07-09 18:39:45 -0600561
562This calls mkimage to create a FIT (U-Boot Flat Image Tree) based on the
563input provided.
564
565Nodes for the FIT should be written out in the binman configuration just as
566they would be in a file passed to mkimage.
567
Simon Glass0ac96b62021-03-18 20:25:15 +1300568For example, this creates an image containing a FIT with U-Boot SPL::
Simon Glass45d556d2020-07-09 18:39:45 -0600569
570 binman {
571 fit {
572 description = "Test FIT";
Simon Glassa435cd12020-09-01 05:13:59 -0600573 fit,fdt-list = "of-list";
Simon Glass45d556d2020-07-09 18:39:45 -0600574
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 Glass912339f2022-02-08 11:50:03 -0700592More complex setups can be created, with generated nodes, as described
593below.
594
595Properties (in the 'fit' node itself)
596~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
597
598Special properties have a `fit,` prefix, indicating that they should be
599processed but not included in the final FIT.
600
601The 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 Karlmanc59ea892023-01-21 19:01:39 +0000607 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 Glass912339f2022-02-08 11:50:03 -0700612 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
618Substitutions
619~~~~~~~~~~~~~
620
621Node names and property values support a basic string-substitution feature.
622Available substitutions for '@' nodes (and property values) are:
623
624SEQ:
625 Sequence number of the generated fdt (1, 2, ...)
626NAME
627 Name of the dtb as provided (i.e. without adding '.dtb')
628
629The `default` property, if present, will be automatically set to the name
630if of configuration whose devicetree matches the `default-dt` entry
631argument, e.g. with `-a default-dt=sun50i-a64-pine64-lts`.
632
633Available substitutions for property values in these nodes are:
634
635DEFAULT-SEQ:
636 Sequence number of the default fdt, as provided by the 'default-dt'
637 entry argument
638
639Available operations
640~~~~~~~~~~~~~~~~~~~~
641
642You can add an operation to an '@' node to indicate which operation is
643required::
644
645 @fdt-SEQ {
646 fit,operation = "gen-fdt-nodes";
647 ...
648 };
649
650Available operations are:
651
652gen-fdt-nodes
653 Generate FDT nodes as above. This is the default if there is no
654 `fit,operation` property.
655
Simon Glass5f423422022-03-05 20:19:12 -0700656split-elf
657 Split an ELF file into a separate node for each segment.
658
Simon Glass912339f2022-02-08 11:50:03 -0700659Generating nodes from an FDT list (gen-fdt-nodes)
660~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
661
Simon Glassa435cd12020-09-01 05:13:59 -0600662U-Boot supports creating fdt and config nodes automatically. To do this,
Simon Glass9f1c6b92022-02-08 11:50:02 -0700663pass an `of-list` property (e.g. `-a of-list=file1 file2`). This tells
664binman that you want to generates nodes for two files: `file1.dtb` and
665`file2.dtb`. The `fit,fdt-list` property (see above) indicates that
666`of-list` should be used. If the property is missing you will get an error.
Simon Glassa435cd12020-09-01 05:13:59 -0600667
Simon Glass0ac96b62021-03-18 20:25:15 +1300668Then add a 'generator node', a node with a name starting with '@'::
Simon Glassa435cd12020-09-01 05:13:59 -0600669
670 images {
671 @fdt-SEQ {
672 description = "fdt-NAME";
673 type = "flat_dt";
674 compression = "none";
675 };
676 };
677
Simon Glass9f1c6b92022-02-08 11:50:02 -0700678This tells binman to create nodes `fdt-1` and `fdt-2` for each of your two
Simon Glassa435cd12020-09-01 05:13:59 -0600679files. All the properties you specify will be included in the node. This
680node acts like a template to generate the nodes. The generator node itself
681does not appear in the output - it is replaced with what binman generates.
Simon Glass9f1c6b92022-02-08 11:50:02 -0700682A 'data' property is created with the contents of the FDT file.
Simon Glassa435cd12020-09-01 05:13:59 -0600683
Simon Glass0ac96b62021-03-18 20:25:15 +1300684You can create config nodes in a similar way::
Simon Glassa435cd12020-09-01 05:13:59 -0600685
686 configurations {
687 default = "@config-DEFAULT-SEQ";
688 @config-SEQ {
689 description = "NAME";
Samuel Holland91079ac2020-10-21 21:12:14 -0500690 firmware = "atf";
691 loadables = "uboot";
Simon Glassa435cd12020-09-01 05:13:59 -0600692 fdt = "fdt-SEQ";
693 };
694 };
695
Simon Glass9f1c6b92022-02-08 11:50:02 -0700696This tells binman to create nodes `config-1` and `config-2`, i.e. a config
697for each of your two files.
Simon Glassa435cd12020-09-01 05:13:59 -0600698
Simon Glassa435cd12020-09-01 05:13:59 -0600699Note that if no devicetree files are provided (with '-a of-list' as above)
700then no nodes will be generated.
701
Simon Glass5f423422022-03-05 20:19:12 -0700702Generating nodes from an ELF file (split-elf)
703~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
704
705This uses the node as a template to generate multiple nodes. The following
706special properties are available:
707
708split-elf
709 Split an ELF file into a separate node for each segment. This uses the
710 node as a template to generate multiple nodes. The following special
711 properties are available:
712
713 fit,load
714 Generates a `load = <...>` property with the load address of the
715 segment
716
717 fit,entry
718 Generates a `entry = <...>` property with the entry address of the
719 ELF. This is only produced for the first entry
720
721 fit,data
722 Generates a `data = <...>` property with the contents of the segment
723
724 fit,loadables
725 Generates a `loadable = <...>` property with a list of the generated
726 nodes (including all nodes if this operation is used multiple times)
727
728
729Here is an example showing ATF, TEE and a device tree all combined::
730
731 fit {
732 description = "test-desc";
733 #address-cells = <1>;
734 fit,fdt-list = "of-list";
735
736 images {
737 u-boot {
738 description = "U-Boot (64-bit)";
739 type = "standalone";
740 os = "U-Boot";
741 arch = "arm64";
742 compression = "none";
Simon Glass72cc5382022-10-20 18:22:39 -0600743 load = <CONFIG_TEXT_BASE>;
Simon Glass5f423422022-03-05 20:19:12 -0700744 u-boot-nodtb {
745 };
746 };
747 @fdt-SEQ {
748 description = "fdt-NAME.dtb";
749 type = "flat_dt";
750 compression = "none";
751 };
752 @atf-SEQ {
753 fit,operation = "split-elf";
754 description = "ARM Trusted Firmware";
755 type = "firmware";
756 arch = "arm64";
757 os = "arm-trusted-firmware";
758 compression = "none";
759 fit,load;
760 fit,entry;
761 fit,data;
762
763 atf-bl31 {
764 };
Jonas Karlmand2c7d902023-01-21 19:01:48 +0000765 hash {
766 algo = "sha256";
767 };
Simon Glass5f423422022-03-05 20:19:12 -0700768 };
769
770 @tee-SEQ {
771 fit,operation = "split-elf";
772 description = "TEE";
773 type = "tee";
774 arch = "arm64";
775 os = "tee";
776 compression = "none";
777 fit,load;
778 fit,entry;
779 fit,data;
780
781 tee-os {
782 };
Jonas Karlmand2c7d902023-01-21 19:01:48 +0000783 hash {
784 algo = "sha256";
785 };
Simon Glass5f423422022-03-05 20:19:12 -0700786 };
787 };
788
789 configurations {
790 default = "@config-DEFAULT-SEQ";
791 @config-SEQ {
792 description = "conf-NAME.dtb";
793 fdt = "fdt-SEQ";
794 firmware = "u-boot";
795 fit,loadables;
796 };
797 };
798 };
799
800If ATF-BL31 is available, this generates a node for each segment in the
801ELF file, for example::
802
803 images {
804 atf-1 {
805 data = <...contents of first segment...>;
806 data-offset = <0x00000000>;
807 entry = <0x00040000>;
808 load = <0x00040000>;
809 compression = "none";
810 os = "arm-trusted-firmware";
811 arch = "arm64";
812 type = "firmware";
813 description = "ARM Trusted Firmware";
Jonas Karlmand2c7d902023-01-21 19:01:48 +0000814 hash {
815 algo = "sha256";
816 value = <...hash of first segment...>;
817 };
Simon Glass5f423422022-03-05 20:19:12 -0700818 };
819 atf-2 {
820 data = <...contents of second segment...>;
821 load = <0xff3b0000>;
822 compression = "none";
823 os = "arm-trusted-firmware";
824 arch = "arm64";
825 type = "firmware";
826 description = "ARM Trusted Firmware";
Jonas Karlmand2c7d902023-01-21 19:01:48 +0000827 hash {
828 algo = "sha256";
829 value = <...hash of second segment...>;
830 };
Simon Glass5f423422022-03-05 20:19:12 -0700831 };
832 };
833
834The same applies for OP-TEE if that is available.
835
836If each binary is not available, the relevant template node (@atf-SEQ or
837@tee-SEQ) is removed from the output.
838
839This also generates a `config-xxx` node for each device tree in `of-list`.
840Note that the U-Boot build system uses `-a of-list=$(CONFIG_OF_LIST)`
841so you can use `CONFIG_OF_LIST` to define that list. In this example it is
842set up for `firefly-rk3399` with a single device tree and the default set
843with `-a default-dt=$(CONFIG_DEFAULT_DEVICE_TREE)`, so the resulting output
844is::
845
846 configurations {
847 default = "config-1";
848 config-1 {
849 loadables = "atf-1", "atf-2", "atf-3", "tee-1", "tee-2";
850 description = "rk3399-firefly.dtb";
851 fdt = "fdt-1";
852 firmware = "u-boot";
853 };
854 };
855
856U-Boot SPL can then load the firmware (U-Boot proper) and all the loadables
857(ATF and TEE), then proceed with the boot.
858
Simon Glass45d556d2020-07-09 18:39:45 -0600859
Simon Glassa7c97782022-08-07 16:33:25 -0600860
861.. _etype_fmap:
Simon Glass45d556d2020-07-09 18:39:45 -0600862
Simon Glass7a61c6b2018-07-17 13:25:37 -0600863Entry: fmap: An entry which contains an Fmap section
864----------------------------------------------------
865
866Properties / Entry arguments:
867 None
868
869FMAP is a simple format used by flashrom, an open-source utility for
870reading and writing the SPI flash, typically on x86 CPUs. The format
871provides flashrom with a list of areas, so it knows what it in the flash.
872It can then read or write just a single area, instead of the whole flash.
873
874The format is defined by the flashrom project, in the file lib/fmap.h -
875see www.flashrom.org/Flashrom for more information.
876
877When used, this entry will be populated with an FMAP which reflects the
878entries in the current image. Note that any hierarchy is squashed, since
Simon Glassb1d414c2021-04-03 11:05:10 +1300879FMAP does not support this. Sections are represented as an area appearing
880before its contents, so that it is possible to reconstruct the hierarchy
881from the FMAP by using the offset information. This convention does not
882seem to be documented, but is used in Chromium OS.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600883
Simon Glassb1d414c2021-04-03 11:05:10 +1300884CBFS entries appear as a single entry, i.e. the sub-entries are ignored.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600885
886
Simon Glassb1d414c2021-04-03 11:05:10 +1300887
Simon Glassa7c97782022-08-07 16:33:25 -0600888.. _etype_gbb:
889
Simon Glassc1ae83c2018-07-17 13:25:44 -0600890Entry: gbb: An entry which contains a Chromium OS Google Binary Block
891---------------------------------------------------------------------
892
893Properties / Entry arguments:
894 - hardware-id: Hardware ID to use for this build (a string)
895 - keydir: Directory containing the public keys to use
896 - bmpblk: Filename containing images used by recovery
897
898Chromium OS uses a GBB to store various pieces of information, in particular
899the root and recovery keys that are used to verify the boot process. Some
900more details are here:
901
902 https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
903
904but note that the page dates from 2013 so is quite out of date. See
905README.chromium for how to obtain the required keys and tools.
906
907
Simon Glassa7c97782022-08-07 16:33:25 -0600908
909.. _etype_image_header:
Simon Glassc1ae83c2018-07-17 13:25:44 -0600910
Simon Glasscec34ba2019-07-08 14:25:28 -0600911Entry: image-header: An entry which contains a pointer to the FDT map
912---------------------------------------------------------------------
913
914Properties / Entry arguments:
915 location: Location of header ("start" or "end" of image). This is
916 optional. If omitted then the entry must have an offset property.
917
918This adds an 8-byte entry to the start or end of the image, pointing to the
919location of the FDT map. The format is a magic number followed by an offset
920from the start or end of the image, in twos-compliment format.
921
922This entry must be in the top-level part of the image.
923
924NOTE: If the location is at the start/end, you will probably need to specify
925sort-by-offset for the image, unless you actually put the image header
926first/last in the entry list.
927
928
929
Simon Glassa7c97782022-08-07 16:33:25 -0600930.. _etype_intel_cmc:
931
Simon Glass8911fa12021-03-18 20:25:16 +1300932Entry: intel-cmc: Intel Chipset Micro Code (CMC) file
933-----------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -0600934
935Properties / Entry arguments:
936 - filename: Filename of file to read into entry
937
938This file contains microcode for some devices in a special format. An
939example filename is 'Microcode/C0_22211.BIN'.
940
941See README.x86 for information about x86 binary blobs.
942
943
944
Simon Glassa7c97782022-08-07 16:33:25 -0600945.. _etype_intel_descriptor:
946
Simon Glass7a61c6b2018-07-17 13:25:37 -0600947Entry: intel-descriptor: Intel flash descriptor block (4KB)
948-----------------------------------------------------------
949
950Properties / Entry arguments:
951 filename: Filename of file containing the descriptor. This is typically
952 a 4KB binary file, sometimes called 'descriptor.bin'
953
954This entry is placed at the start of flash and provides information about
955the SPI flash regions. In particular it provides the base address and
956size of the ME (Management Engine) region, allowing us to place the ME
957binary in the right place.
958
959With this entry in your image, the position of the 'intel-me' entry will be
960fixed in the image, which avoids you needed to specify an offset for that
961region. This is useful, because it is not possible to change the position
962of the ME region without updating the descriptor.
963
964See README.x86 for information about x86 binary blobs.
965
966
967
Simon Glassa7c97782022-08-07 16:33:25 -0600968.. _etype_intel_fit:
969
Simon Glass232f90c2019-08-24 07:22:50 -0600970Entry: intel-fit: Intel Firmware Image Table (FIT)
971--------------------------------------------------
972
973This entry contains a dummy FIT as required by recent Intel CPUs. The FIT
974contains information about the firmware and microcode available in the
975image.
976
977At present binman only supports a basic FIT with no microcode.
978
979
980
Simon Glassa7c97782022-08-07 16:33:25 -0600981.. _etype_intel_fit_ptr:
982
Simon Glass232f90c2019-08-24 07:22:50 -0600983Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer
984--------------------------------------------------------------
985
986This entry contains a pointer to the FIT. It is required to be at address
9870xffffffc0 in the image.
988
989
990
Simon Glassa7c97782022-08-07 16:33:25 -0600991.. _etype_intel_fsp:
992
Simon Glass8911fa12021-03-18 20:25:16 +1300993Entry: intel-fsp: Intel Firmware Support Package (FSP) file
994-----------------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -0600995
996Properties / Entry arguments:
997 - filename: Filename of file to read into entry
998
999This file contains binary blobs which are used on some devices to make the
1000platform work. U-Boot executes this code since it is not possible to set up
1001the hardware using U-Boot open-source code. Documentation is typically not
1002available in sufficient detail to allow this.
1003
1004An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
1005
1006See README.x86 for information about x86 binary blobs.
1007
1008
1009
Simon Glassa7c97782022-08-07 16:33:25 -06001010.. _etype_intel_fsp_m:
1011
Simon Glass8911fa12021-03-18 20:25:16 +13001012Entry: intel-fsp-m: Intel Firmware Support Package (FSP) memory init
1013--------------------------------------------------------------------
Simon Glassba7985d2019-08-24 07:23:07 -06001014
1015Properties / Entry arguments:
1016 - filename: Filename of file to read into entry
1017
1018This file contains a binary blob which is used on some devices to set up
1019SDRAM. U-Boot executes this code in SPL so that it can make full use of
1020memory. Documentation is typically not available in sufficient detail to
1021allow U-Boot do this this itself..
1022
1023An example filename is 'fsp_m.bin'
1024
1025See README.x86 for information about x86 binary blobs.
1026
1027
Simon Glassa7c97782022-08-07 16:33:25 -06001028
1029.. _etype_intel_fsp_s:
Simon Glassba7985d2019-08-24 07:23:07 -06001030
Simon Glass8911fa12021-03-18 20:25:16 +13001031Entry: intel-fsp-s: Intel Firmware Support Package (FSP) silicon init
1032---------------------------------------------------------------------
Simon Glass4d9086d2019-10-20 21:31:35 -06001033
1034Properties / Entry arguments:
1035 - filename: Filename of file to read into entry
1036
1037This file contains a binary blob which is used on some devices to set up
1038the silicon. U-Boot executes this code in U-Boot proper after SDRAM is
1039running, so that it can make full use of memory. Documentation is typically
1040not available in sufficient detail to allow U-Boot do this this itself.
1041
1042An example filename is 'fsp_s.bin'
1043
1044See README.x86 for information about x86 binary blobs.
1045
1046
1047
Simon Glassa7c97782022-08-07 16:33:25 -06001048.. _etype_intel_fsp_t:
1049
Simon Glass8911fa12021-03-18 20:25:16 +13001050Entry: intel-fsp-t: Intel Firmware Support Package (FSP) temp ram init
1051----------------------------------------------------------------------
Simon Glass9ea87b22019-10-20 21:31:36 -06001052
1053Properties / Entry arguments:
1054 - filename: Filename of file to read into entry
1055
1056This file contains a binary blob which is used on some devices to set up
1057temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so
1058that it has access to memory for its stack and initial storage.
1059
1060An example filename is 'fsp_t.bin'
1061
1062See README.x86 for information about x86 binary blobs.
1063
1064
Simon Glassa7c97782022-08-07 16:33:25 -06001065
1066.. _etype_intel_ifwi:
Simon Glass9ea87b22019-10-20 21:31:36 -06001067
Simon Glass8911fa12021-03-18 20:25:16 +13001068Entry: intel-ifwi: Intel Integrated Firmware Image (IFWI) file
1069--------------------------------------------------------------
Simon Glassc2f1aed2019-07-08 13:18:56 -06001070
1071Properties / Entry arguments:
1072 - filename: Filename of file to read into entry. This is either the
1073 IFWI file itself, or a file that can be converted into one using a
1074 tool
1075 - convert-fit: If present this indicates that the ifwitool should be
1076 used to convert the provided file into a IFWI.
1077
1078This file contains code and data used by the SoC that is required to make
1079it work. It includes U-Boot TPL, microcode, things related to the CSE
1080(Converged Security Engine, the microcontroller that loads all the firmware)
1081and other items beyond the wit of man.
1082
1083A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a
1084file that will be converted to an IFWI.
1085
1086The position of this entry is generally set by the intel-descriptor entry.
1087
1088The contents of the IFWI are specified by the subnodes of the IFWI node.
1089Each subnode describes an entry which is placed into the IFWFI with a given
1090sub-partition (and optional entry name).
1091
Simon Glass8a5e2492019-08-24 07:22:47 -06001092Properties for subnodes:
Simon Glass0ac96b62021-03-18 20:25:15 +13001093 - ifwi-subpart: sub-parition to put this entry into, e.g. "IBBP"
1094 - ifwi-entry: entry name t use, e.g. "IBBL"
1095 - ifwi-replace: if present, indicates that the item should be replaced
1096 in the IFWI. Otherwise it is added.
Simon Glass8a5e2492019-08-24 07:22:47 -06001097
Simon Glassc2f1aed2019-07-08 13:18:56 -06001098See README.x86 for information about x86 binary blobs.
1099
1100
1101
Simon Glassa7c97782022-08-07 16:33:25 -06001102.. _etype_intel_me:
1103
Simon Glass8911fa12021-03-18 20:25:16 +13001104Entry: intel-me: Intel Management Engine (ME) file
1105--------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -06001106
1107Properties / Entry arguments:
1108 - filename: Filename of file to read into entry
1109
1110This file contains code used by the SoC that is required to make it work.
1111The Management Engine is like a background task that runs things that are
Thomas Hebbfd37f242019-11-13 18:18:03 -08001112not clearly documented, but may include keyboard, display and network
Simon Glass7a61c6b2018-07-17 13:25:37 -06001113access. For platform that use ME it is not possible to disable it. U-Boot
1114does not directly execute code in the ME binary.
1115
1116A typical filename is 'me.bin'.
1117
Simon Glassc4056b82019-07-08 13:18:38 -06001118The position of this entry is generally set by the intel-descriptor entry.
1119
Simon Glass7a61c6b2018-07-17 13:25:37 -06001120See README.x86 for information about x86 binary blobs.
1121
1122
1123
Simon Glassa7c97782022-08-07 16:33:25 -06001124.. _etype_intel_mrc:
1125
Simon Glass8911fa12021-03-18 20:25:16 +13001126Entry: intel-mrc: Intel Memory Reference Code (MRC) file
1127--------------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -06001128
1129Properties / Entry arguments:
1130 - filename: Filename of file to read into entry
1131
1132This file contains code for setting up the SDRAM on some Intel systems. This
1133is executed by U-Boot when needed early during startup. A typical filename
1134is 'mrc.bin'.
1135
1136See README.x86 for information about x86 binary blobs.
1137
1138
1139
Simon Glassa7c97782022-08-07 16:33:25 -06001140.. _etype_intel_refcode:
1141
Simon Glass8911fa12021-03-18 20:25:16 +13001142Entry: intel-refcode: Intel Reference Code file
1143-----------------------------------------------
Simon Glass17b84eb2019-05-17 22:00:53 -06001144
1145Properties / Entry arguments:
1146 - filename: Filename of file to read into entry
1147
1148This file contains code for setting up the platform on some Intel systems.
1149This is executed by U-Boot when needed early during startup. A typical
1150filename is 'refcode.bin'.
1151
1152See README.x86 for information about x86 binary blobs.
1153
1154
1155
Simon Glassa7c97782022-08-07 16:33:25 -06001156.. _etype_intel_vbt:
1157
Simon Glass8911fa12021-03-18 20:25:16 +13001158Entry: intel-vbt: Intel Video BIOS Table (VBT) file
1159---------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -06001160
1161Properties / Entry arguments:
1162 - filename: Filename of file to read into entry
1163
1164This file contains code that sets up the integrated graphics subsystem on
1165some Intel SoCs. U-Boot executes this when the display is started up.
1166
1167See README.x86 for information about Intel binary blobs.
1168
1169
1170
Simon Glassa7c97782022-08-07 16:33:25 -06001171.. _etype_intel_vga:
1172
Simon Glass8911fa12021-03-18 20:25:16 +13001173Entry: intel-vga: Intel Video Graphics Adaptor (VGA) file
1174---------------------------------------------------------
Simon Glass7a61c6b2018-07-17 13:25:37 -06001175
1176Properties / Entry arguments:
1177 - filename: Filename of file to read into entry
1178
1179This file contains code that sets up the integrated graphics subsystem on
1180some Intel SoCs. U-Boot executes this when the display is started up.
1181
1182This is similar to the VBT file but in a different format.
1183
1184See README.x86 for information about Intel binary blobs.
1185
1186
1187
Simon Glassa7c97782022-08-07 16:33:25 -06001188.. _etype_mkimage:
1189
Simon Glass8911fa12021-03-18 20:25:16 +13001190Entry: mkimage: Binary produced by mkimage
1191------------------------------------------
Simon Glass48f3aad2020-07-09 18:39:31 -06001192
1193Properties / Entry arguments:
Simon Glass42074dc2022-08-13 11:40:47 -06001194 - args: Arguments to pass
Simon Glass8fbca772022-08-13 11:40:48 -06001195 - data-to-imagename: Indicates that the -d data should be passed in as
1196 the image name also (-n)
Quentin Schulz9b5c6482022-09-02 15:10:48 +02001197 - multiple-data-files: boolean to tell binman to pass all files as
1198 datafiles to mkimage instead of creating a temporary file the result
1199 of datafiles concatenation
Simon Glassda6a9082023-01-07 14:07:10 -07001200 - filename: filename of output binary generated by mkimage
Simon Glass48f3aad2020-07-09 18:39:31 -06001201
Simon Glass42074dc2022-08-13 11:40:47 -06001202The data passed to mkimage via the -d flag is collected from subnodes of the
1203mkimage node, e.g.::
Simon Glass48f3aad2020-07-09 18:39:31 -06001204
1205 mkimage {
Simon Glassda6a9082023-01-07 14:07:10 -07001206 filename = "imximage.bin";
Simon Glass48f3aad2020-07-09 18:39:31 -06001207 args = "-n test -T imximage";
1208
1209 u-boot-spl {
1210 };
1211 };
1212
Simon Glass42074dc2022-08-13 11:40:47 -06001213This calls mkimage to create an imximage with `u-boot-spl.bin` as the data
Simon Glassda6a9082023-01-07 14:07:10 -07001214file, with mkimage being called like this::
Simon Glass42074dc2022-08-13 11:40:47 -06001215
1216 mkimage -d <data_file> -n test -T imximage <output_file>
1217
1218The output from mkimage then becomes part of the image produced by
Simon Glassda6a9082023-01-07 14:07:10 -07001219binman but also is written into `imximage.bin` file. If you need to put
1220multiple things in the data file, you can use a section, or just multiple
1221subnodes like this::
Simon Glass42074dc2022-08-13 11:40:47 -06001222
1223 mkimage {
1224 args = "-n test -T imximage";
1225
1226 u-boot-spl {
1227 };
1228
1229 u-boot-tpl {
1230 };
1231 };
Simon Glass48f3aad2020-07-09 18:39:31 -06001232
Simon Glassda6a9082023-01-07 14:07:10 -07001233Note that binman places the contents (here SPL and TPL) into a single file
1234and passes that to mkimage using the -d option.
1235
Quentin Schulz9b5c6482022-09-02 15:10:48 +02001236To pass all datafiles untouched to mkimage::
1237
1238 mkimage {
Simon Glassda6a9082023-01-07 14:07:10 -07001239 args = "-n rk3399 -T rkspi";
1240 multiple-data-files;
Quentin Schulz9b5c6482022-09-02 15:10:48 +02001241
Simon Glassda6a9082023-01-07 14:07:10 -07001242 u-boot-tpl {
1243 };
Quentin Schulz9b5c6482022-09-02 15:10:48 +02001244
Simon Glassda6a9082023-01-07 14:07:10 -07001245 u-boot-spl {
1246 };
Quentin Schulz9b5c6482022-09-02 15:10:48 +02001247 };
1248
1249This calls mkimage to create a Rockchip RK3399-specific first stage
1250bootloader, made of TPL+SPL. Since this first stage bootloader requires to
1251align the TPL and SPL but also some weird hacks that is handled by mkimage
1252directly, binman is told to not perform the concatenation of datafiles prior
1253to passing the data to mkimage.
1254
Simon Glass948dd3a2022-02-08 11:49:58 -07001255To use CONFIG options in the arguments, use a string list instead, as in
1256this example which also produces four arguments::
1257
1258 mkimage {
1259 args = "-n", CONFIG_SYS_SOC, "-T imximage";
1260
1261 u-boot-spl {
1262 };
1263 };
1264
Simon Glass8fbca772022-08-13 11:40:48 -06001265If you need to pass the input data in with the -n argument as well, then use
1266the 'data-to-imagename' property::
1267
1268 mkimage {
1269 args = "-T imximage";
Simon Glassda6a9082023-01-07 14:07:10 -07001270 data-to-imagename;
Simon Glass8fbca772022-08-13 11:40:48 -06001271
1272 u-boot-spl {
1273 };
1274 };
1275
1276That will pass the data to mkimage both as the data file (with -d) and as
Simon Glassda6a9082023-01-07 14:07:10 -07001277the image name (with -n). In both cases, a filename is passed as the
1278argument, with the actual data being in that file.
Simon Glass948dd3a2022-02-08 11:49:58 -07001279
Simon Glassda6a9082023-01-07 14:07:10 -07001280If need to pass different data in with -n, then use an `imagename` subnode::
Simon Glassb1669752022-08-13 11:40:49 -06001281
1282 mkimage {
1283 args = "-T imximage";
1284
1285 imagename {
1286 blob {
1287 filename = "spl/u-boot-spl.cfgout"
1288 };
1289 };
1290
1291 u-boot-spl {
1292 };
1293 };
1294
1295This will pass in u-boot-spl as the input data and the .cfgout file as the
1296-n data.
1297
Simon Glassa7c97782022-08-07 16:33:25 -06001298
Simon Glassda6a9082023-01-07 14:07:10 -07001299
Simon Glassa4948b22023-01-11 16:10:14 -07001300.. _etype_null:
1301
1302Entry: null: An entry which has no contents of its own
1303------------------------------------------------------
1304
1305Note that the size property must be set since otherwise this entry does not
1306know how large it should be.
1307
1308The contents are set by the containing section, e.g. the section's pad
1309byte.
1310
1311
1312
Simon Glassa7c97782022-08-07 16:33:25 -06001313.. _etype_opensbi:
Simon Glass48f3aad2020-07-09 18:39:31 -06001314
Bin Mengc0b15742021-05-10 20:23:33 +08001315Entry: opensbi: RISC-V OpenSBI fw_dynamic blob
1316----------------------------------------------
1317
1318Properties / Entry arguments:
1319 - opensbi-path: Filename of file to read into entry. This is typically
1320 called fw_dynamic.bin
1321
1322This entry holds the run-time firmware, typically started by U-Boot SPL.
1323See the U-Boot README for your architecture or board for how to use it. See
1324https://github.com/riscv/opensbi for more information about OpenSBI.
1325
1326
1327
Simon Glassa7c97782022-08-07 16:33:25 -06001328.. _etype_powerpc_mpc85xx_bootpg_resetvec:
1329
Jagdish Gediya311d4842018-09-03 21:35:08 +05301330Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
1331-----------------------------------------------------------------------------------------
1332
1333Properties / Entry arguments:
1334 - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
1335
Thomas Hebbfd37f242019-11-13 18:18:03 -08001336This entry is valid for PowerPC mpc85xx cpus. This entry holds
Jagdish Gediya311d4842018-09-03 21:35:08 +05301337'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
1338placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
1339
Simon Glass136dd352020-10-26 17:39:59 -06001340
Simon Glassa7c97782022-08-07 16:33:25 -06001341
1342.. _etype_pre_load:
Simon Glass136dd352020-10-26 17:39:59 -06001343
Philippe Reynesebe96cb2022-03-28 22:57:04 +02001344Entry: pre-load: Pre load image header
1345--------------------------------------
1346
1347Properties / Entry arguments:
Simon Glass9f571582022-08-13 11:40:43 -06001348 - pre-load-key-path: Path of the directory that store key (provided by
1349 the environment variable PRE_LOAD_KEY_PATH)
Philippe Reynesebe96cb2022-03-28 22:57:04 +02001350 - content: List of phandles to entries to sign
1351 - algo-name: Hash and signature algo to use for the signature
1352 - padding-name: Name of the padding (pkcs-1.5 or pss)
1353 - key-name: Filename of the private key to sign
1354 - header-size: Total size of the header
1355 - version: Version of the header
1356
1357This entry creates a pre-load header that contains a global
1358image signature.
1359
1360For example, this creates an image with a pre-load header and a binary::
1361
1362 binman {
1363 image2 {
1364 filename = "sandbox.bin";
1365
1366 pre-load {
1367 content = <&image>;
1368 algo-name = "sha256,rsa2048";
1369 padding-name = "pss";
1370 key-name = "private.pem";
1371 header-size = <4096>;
1372 version = <1>;
1373 };
1374
1375 image: blob-ext {
1376 filename = "sandbox.itb";
1377 };
1378 };
1379 };
1380
1381
1382
Simon Glassa7c97782022-08-07 16:33:25 -06001383.. _etype_scp:
1384
Simon Glass8911fa12021-03-18 20:25:16 +13001385Entry: scp: System Control Processor (SCP) firmware blob
1386--------------------------------------------------------
Simon Glass136dd352020-10-26 17:39:59 -06001387
1388Properties / Entry arguments:
1389 - scp-path: Filename of file to read into the entry, typically scp.bin
1390
1391This entry holds firmware for an external platform-specific coprocessor.
Jagdish Gediya311d4842018-09-03 21:35:08 +05301392
1393
Simon Glass136dd352020-10-26 17:39:59 -06001394
Simon Glassa7c97782022-08-07 16:33:25 -06001395.. _etype_section:
1396
Simon Glass7a61c6b2018-07-17 13:25:37 -06001397Entry: section: Entry that contains other entries
1398-------------------------------------------------
1399
Simon Glasscc9a41c2021-11-23 11:03:49 -07001400A section is an entry which can contain other entries, thus allowing
1401hierarchical images to be created. See 'Sections and hierarchical images'
1402in the binman README for more information.
1403
1404The base implementation simply joins the various entries together, using
1405various rules about alignment, etc.
1406
1407Subclassing
1408~~~~~~~~~~~
1409
1410This class can be subclassed to support other file formats which hold
1411multiple entries, such as CBFS. To do this, override the following
1412functions. The documentation here describes what your function should do.
1413For example code, see etypes which subclass `Entry_section`, or `cbfs.py`
1414for a more involved example::
1415
1416 $ grep -l \(Entry_section tools/binman/etype/*.py
1417
1418ReadNode()
1419 Call `super().ReadNode()`, then read any special properties for the
1420 section. Then call `self.ReadEntries()` to read the entries.
1421
1422 Binman calls this at the start when reading the image description.
1423
1424ReadEntries()
1425 Read in the subnodes of the section. This may involve creating entries
1426 of a particular etype automatically, as well as reading any special
1427 properties in the entries. For each entry, entry.ReadNode() should be
1428 called, to read the basic entry properties. The properties should be
1429 added to `self._entries[]`, in the correct order, with a suitable name.
1430
1431 Binman calls this at the start when reading the image description.
1432
1433BuildSectionData(required)
1434 Create the custom file format that you want and return it as bytes.
1435 This likely sets up a file header, then loops through the entries,
1436 adding them to the file. For each entry, call `entry.GetData()` to
1437 obtain the data. If that returns None, and `required` is False, then
1438 this method must give up and return None. But if `required` is True then
1439 it should assume that all data is valid.
1440
1441 Binman calls this when packing the image, to find out the size of
1442 everything. It is called again at the end when building the final image.
1443
1444SetImagePos(image_pos):
1445 Call `super().SetImagePos(image_pos)`, then set the `image_pos` values
1446 for each of the entries. This should use the custom file format to find
1447 the `start offset` (and `image_pos`) of each entry. If the file format
1448 uses compression in such a way that there is no offset available (other
1449 than reading the whole file and decompressing it), then the offsets for
1450 affected entries can remain unset (`None`). The size should also be set
1451 if possible.
Simon Glass0ac96b62021-03-18 20:25:15 +13001452
Simon Glasscc9a41c2021-11-23 11:03:49 -07001453 Binman calls this after the image has been packed, to update the
1454 location that all the entries ended up at.
Simon Glass0ac96b62021-03-18 20:25:15 +13001455
Simon Glass637958f2021-11-23 21:09:50 -07001456ReadChildData(child, decomp, alt_format):
Simon Glasscc9a41c2021-11-23 11:03:49 -07001457 The default version of this may be good enough, if you are able to
1458 implement SetImagePos() correctly. But that is a bit of a bypass, so
1459 you can override this method to read from your custom file format. It
1460 should read the entire entry containing the custom file using
1461 `super().ReadData(True)`, then parse the file to get the data for the
1462 given child, then return that data.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001463
Simon Glasscc9a41c2021-11-23 11:03:49 -07001464 If your file format supports compression, the `decomp` argument tells
1465 you whether to return the compressed data (`decomp` is False) or to
1466 uncompress it first, then return the uncompressed data (`decomp` is
1467 True). This is used by the `binman extract -U` option.
Simon Glass21db0ff2020-09-01 05:13:54 -06001468
Simon Glass637958f2021-11-23 21:09:50 -07001469 If your entry supports alternative formats, the alt_format provides the
1470 alternative format that the user has selected. Your function should
1471 return data in that format. This is used by the 'binman extract -l'
1472 option.
1473
Simon Glasscc9a41c2021-11-23 11:03:49 -07001474 Binman calls this when reading in an image, in order to populate all the
1475 entries with the data from that image (`binman ls`).
1476
1477WriteChildData(child):
1478 Binman calls this after `child.data` is updated, to inform the custom
1479 file format about this, in case it needs to do updates.
1480
1481 The default version of this does nothing and probably needs to be
1482 overridden for the 'binman replace' command to work. Your version should
1483 use `child.data` to update the data for that child in the custom file
1484 format.
1485
1486 Binman calls this when updating an image that has been read in and in
1487 particular to update the data for a particular entry (`binman replace`)
1488
1489Properties / Entry arguments
1490~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1491
1492See :ref:`develop/package/binman:Image description format` for more
1493information.
1494
1495align-default
1496 Default alignment for this section, if no alignment is given in the
1497 entry
1498
1499pad-byte
1500 Pad byte to use when padding
1501
1502sort-by-offset
1503 True if entries should be sorted by offset, False if they must be
1504 in-order in the device tree description
1505
1506end-at-4gb
1507 Used to build an x86 ROM which ends at 4GB (2^32)
1508
1509name-prefix
1510 Adds a prefix to the name of every entry in the section when writing out
1511 the map
1512
1513skip-at-start
1514 Number of bytes before the first entry starts. These effectively adjust
1515 the starting offset of entries. For example, if this is 16, then the
1516 first entry would start at 16. An entry with offset = 20 would in fact
1517 be written at offset 4 in the image file, since the first 16 bytes are
1518 skipped when writing.
Simon Glassb1d414c2021-04-03 11:05:10 +13001519
Simon Glassda6a9082023-01-07 14:07:10 -07001520filename
1521 filename to write the unpadded section contents to within the output
1522 directory (None to skip this).
1523
Simon Glass39dd2152019-07-08 14:25:47 -06001524Since a section is also an entry, it inherits all the properies of entries
1525too.
1526
Simon Glasscc9a41c2021-11-23 11:03:49 -07001527Note that the `allow_missing` member controls whether this section permits
1528external blobs to be missing their contents. The option will produce an
1529image but of course it will not work. It is useful to make sure that
1530Continuous Integration systems can build without the binaries being
1531available. This is set by the `SetAllowMissing()` method, if
1532`--allow-missing` is passed to binman.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001533
1534
1535
Simon Glassa7c97782022-08-07 16:33:25 -06001536.. _etype_tee_os:
1537
Roger Quadros5cdcea02022-02-19 20:50:04 +02001538Entry: tee-os: Entry containing an OP-TEE Trusted OS (TEE) blob
1539---------------------------------------------------------------
1540
1541Properties / Entry arguments:
1542 - tee-os-path: Filename of file to read into entry. This is typically
Simon Glassad5cfe12023-01-07 14:07:14 -07001543 called tee.bin or tee.elf
Roger Quadros5cdcea02022-02-19 20:50:04 +02001544
1545This entry holds the run-time firmware, typically started by U-Boot SPL.
1546See the U-Boot README for your architecture or board for how to use it. See
1547https://github.com/OP-TEE/optee_os for more information about OP-TEE.
1548
Simon Glassad5cfe12023-01-07 14:07:14 -07001549Note that if the file is in ELF format, it must go in a FIT. In that case,
1550this entry will mark itself as absent, providing the data only through the
1551read_elf_segments() method.
1552
1553Marking this entry as absent means that it if is used in the wrong context
1554it can be automatically dropped. Thus it is possible to add an OP-TEE entry
1555like this::
1556
1557 binman {
1558 tee-os {
1559 };
1560 };
1561
1562and pass either an ELF or plain binary in with -a tee-os-path <filename>
1563and have binman do the right thing:
1564
1565 - include the entry if tee.bin is provided and it does NOT have the v1
1566 header
1567 - drop it otherwise
1568
1569When used within a FIT, we can do::
1570
1571 binman {
1572 fit {
1573 tee-os {
1574 };
1575 };
1576 };
1577
1578which will split the ELF into separate nodes for each segment, if an ELF
1579file is provided (see :ref:`etype_fit`), or produce a single node if the
1580OP-TEE binary v1 format is provided (see optee_doc_) .
1581
1582.. _optee_doc: https://optee.readthedocs.io/en/latest/architecture/core.html#partitioning-of-the-binary
1583
Roger Quadros5cdcea02022-02-19 20:50:04 +02001584
1585
Simon Glassa7c97782022-08-07 16:33:25 -06001586.. _etype_text:
1587
Simon Glass7a61c6b2018-07-17 13:25:37 -06001588Entry: text: An entry which contains text
1589-----------------------------------------
1590
1591The text can be provided either in the node itself or by a command-line
1592argument. There is a level of indirection to allow multiple text strings
1593and sharing of text.
1594
1595Properties / Entry arguments:
1596 text-label: The value of this string indicates the property / entry-arg
1597 that contains the string to place in the entry
1598 <xxx> (actual name is the value of text-label): contains the string to
1599 place in the entry.
Simon Glass47f6a622019-07-08 13:18:40 -06001600 <text>: The text to place in the entry (overrides the above mechanism).
1601 This is useful when the text is constant.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001602
Simon Glass0ac96b62021-03-18 20:25:15 +13001603Example node::
Simon Glass7a61c6b2018-07-17 13:25:37 -06001604
1605 text {
1606 size = <50>;
1607 text-label = "message";
1608 };
1609
1610You can then use:
1611
1612 binman -amessage="this is my message"
1613
1614and binman will insert that string into the entry.
1615
Simon Glass0ac96b62021-03-18 20:25:15 +13001616It is also possible to put the string directly in the node::
Simon Glass7a61c6b2018-07-17 13:25:37 -06001617
1618 text {
1619 size = <8>;
1620 text-label = "message";
1621 message = "a message directly in the node"
1622 };
1623
Simon Glass0ac96b62021-03-18 20:25:15 +13001624or just::
Simon Glass47f6a622019-07-08 13:18:40 -06001625
1626 text {
1627 size = <8>;
1628 text = "some text directly in the node"
1629 };
1630
Simon Glass7a61c6b2018-07-17 13:25:37 -06001631The text is not itself nul-terminated. This can be achieved, if required,
1632by setting the size of the entry to something larger than the text.
1633
1634
1635
Simon Glassa7c97782022-08-07 16:33:25 -06001636.. _etype_u_boot:
1637
Simon Glass7a61c6b2018-07-17 13:25:37 -06001638Entry: u-boot: U-Boot flat binary
1639---------------------------------
1640
1641Properties / Entry arguments:
1642 - filename: Filename of u-boot.bin (default 'u-boot.bin')
1643
1644This is the U-Boot binary, containing relocation information to allow it
1645to relocate itself at runtime. The binary typically includes a device tree
Simon Glass718b5292021-03-18 20:25:07 +13001646blob at the end of it.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001647
Simon Glass18ed9962023-01-07 14:07:11 -07001648U-Boot can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001649
Simon Glass718b5292021-03-18 20:25:07 +13001650Note that this entry is automatically replaced with u-boot-expanded unless
Simon Glass7098b7f2021-03-21 18:24:30 +13001651--no-expanded is used or the node has a 'no-expanded' property.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001652
1653
Simon Glass718b5292021-03-18 20:25:07 +13001654
Simon Glassa7c97782022-08-07 16:33:25 -06001655.. _etype_u_boot_dtb:
1656
Simon Glass7a61c6b2018-07-17 13:25:37 -06001657Entry: u-boot-dtb: U-Boot device tree
1658-------------------------------------
1659
1660Properties / Entry arguments:
1661 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
1662
1663This is the U-Boot device tree, containing configuration information for
1664U-Boot. U-Boot needs this to know what devices are present and which drivers
1665to activate.
1666
Simon Glasse219aa42018-09-14 04:57:24 -06001667Note: This is mostly an internal entry type, used by others. This allows
1668binman to know which entries contain a device tree.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001669
1670
Simon Glassa7c97782022-08-07 16:33:25 -06001671
1672.. _etype_u_boot_dtb_with_ucode:
Simon Glass7a61c6b2018-07-17 13:25:37 -06001673
1674Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
1675-----------------------------------------------------------------------------------
1676
1677Properties / Entry arguments:
1678 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
1679
1680See Entry_u_boot_ucode for full details of the three entries involved in
1681this process. This entry provides the U-Boot device-tree file, which
1682contains the microcode. If the microcode is not being collated into one
1683place then the offset and size of the microcode is recorded by this entry,
Simon Glass537e0062021-03-18 20:24:54 +13001684for use by u-boot-with-ucode_ptr. If it is being collated, then this
Simon Glass7a61c6b2018-07-17 13:25:37 -06001685entry deletes the microcode from the device tree (to save space) and makes
Simon Glass537e0062021-03-18 20:24:54 +13001686it available to u-boot-ucode.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001687
1688
1689
Simon Glassa7c97782022-08-07 16:33:25 -06001690.. _etype_u_boot_elf:
1691
Simon Glassb1714232018-09-14 04:57:35 -06001692Entry: u-boot-elf: U-Boot ELF image
1693-----------------------------------
1694
1695Properties / Entry arguments:
1696 - filename: Filename of u-boot (default 'u-boot')
1697
1698This is the U-Boot ELF image. It does not include a device tree but can be
1699relocated to any address for execution.
1700
1701
Simon Glassa7c97782022-08-07 16:33:25 -06001702
1703.. _etype_u_boot_env:
Simon Glassb1714232018-09-14 04:57:35 -06001704
Simon Glass136dd352020-10-26 17:39:59 -06001705Entry: u-boot-env: An entry which contains a U-Boot environment
1706---------------------------------------------------------------
1707
1708Properties / Entry arguments:
1709 - filename: File containing the environment text, with each line in the
1710 form var=value
1711
1712
Simon Glass718b5292021-03-18 20:25:07 +13001713
Simon Glassa7c97782022-08-07 16:33:25 -06001714.. _etype_u_boot_expanded:
1715
Simon Glass718b5292021-03-18 20:25:07 +13001716Entry: u-boot-expanded: U-Boot flat binary broken out into its component parts
1717------------------------------------------------------------------------------
1718
1719This is a section containing the U-Boot binary and a devicetree. Using this
1720entry type automatically creates this section, with the following entries
1721in it:
1722
1723 u-boot-nodtb
1724 u-boot-dtb
1725
1726Having the devicetree separate allows binman to update it in the final
1727image, so that the entries positions are provided to the running U-Boot.
1728
1729
Simon Glass136dd352020-10-26 17:39:59 -06001730
Simon Glassa7c97782022-08-07 16:33:25 -06001731.. _etype_u_boot_img:
1732
Simon Glass7a61c6b2018-07-17 13:25:37 -06001733Entry: u-boot-img: U-Boot legacy image
1734--------------------------------------
1735
1736Properties / Entry arguments:
1737 - filename: Filename of u-boot.img (default 'u-boot.img')
1738
1739This is the U-Boot binary as a packaged image, in legacy format. It has a
1740header which allows it to be loaded at the correct address for execution.
1741
1742You should use FIT (Flat Image Tree) instead of the legacy image for new
1743applications.
1744
1745
1746
Simon Glassa7c97782022-08-07 16:33:25 -06001747.. _etype_u_boot_nodtb:
1748
Simon Glass7a61c6b2018-07-17 13:25:37 -06001749Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
1750--------------------------------------------------------------------
1751
1752Properties / Entry arguments:
Simon Glass537e0062021-03-18 20:24:54 +13001753 - filename: Filename to include (default 'u-boot-nodtb.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06001754
1755This is the U-Boot binary, containing relocation information to allow it
1756to relocate itself at runtime. It does not include a device tree blob at
Simon Glass537e0062021-03-18 20:24:54 +13001757the end of it so normally cannot work without it. You can add a u-boot-dtb
Simon Glass718b5292021-03-18 20:25:07 +13001758entry after this one, or use a u-boot entry instead, normally expands to a
1759section containing u-boot and u-boot-dtb
Simon Glass7a61c6b2018-07-17 13:25:37 -06001760
1761
1762
Simon Glassa7c97782022-08-07 16:33:25 -06001763.. _etype_u_boot_spl:
1764
Simon Glass7a61c6b2018-07-17 13:25:37 -06001765Entry: u-boot-spl: U-Boot SPL binary
1766------------------------------------
1767
1768Properties / Entry arguments:
1769 - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
1770
1771This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
1772binary which loads before U-Boot proper, typically into on-chip SRAM. It is
1773responsible for locating, loading and jumping to U-Boot. Note that SPL is
1774not relocatable so must be loaded to the correct address in SRAM, or written
Simon Glass8425a1f2018-07-17 13:25:48 -06001775to run from the correct address if direct flash execution is possible (e.g.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001776on x86 devices).
1777
Simon Glass18ed9962023-01-07 14:07:11 -07001778SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001779
1780in the binman README for more information.
1781
1782The ELF file 'spl/u-boot-spl' must also be available for this to work, since
1783binman uses that to look up symbols to write into the SPL binary.
1784
Simon Glass718b5292021-03-18 20:25:07 +13001785Note that this entry is automatically replaced with u-boot-spl-expanded
Simon Glass7098b7f2021-03-21 18:24:30 +13001786unless --no-expanded is used or the node has a 'no-expanded' property.
Simon Glass718b5292021-03-18 20:25:07 +13001787
Simon Glass7a61c6b2018-07-17 13:25:37 -06001788
1789
Simon Glassa7c97782022-08-07 16:33:25 -06001790.. _etype_u_boot_spl_bss_pad:
1791
Simon Glass7a61c6b2018-07-17 13:25:37 -06001792Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
1793---------------------------------------------------------------------
1794
1795Properties / Entry arguments:
1796 None
1797
Simon Glass308939b2021-03-18 20:24:55 +13001798This holds the padding added after the SPL binary to cover the BSS (Block
1799Started by Symbol) region. This region holds the various variables used by
1800SPL. It is set to 0 by SPL when it starts up. If you want to append data to
1801the SPL image (such as a device tree file), you must pad out the BSS region
1802to avoid the data overlapping with U-Boot variables. This entry is useful in
1803that case. It automatically pads out the entry size to cover both the code,
1804data and BSS.
1805
1806The contents of this entry will a certain number of zero bytes, determined
1807by __bss_size
Simon Glass7a61c6b2018-07-17 13:25:37 -06001808
1809The ELF file 'spl/u-boot-spl' must also be available for this to work, since
1810binman uses that to look up the BSS address.
1811
1812
1813
Simon Glassa7c97782022-08-07 16:33:25 -06001814.. _etype_u_boot_spl_dtb:
1815
Simon Glass7a61c6b2018-07-17 13:25:37 -06001816Entry: u-boot-spl-dtb: U-Boot SPL device tree
1817---------------------------------------------
1818
1819Properties / Entry arguments:
1820 - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
1821
1822This is the SPL device tree, containing configuration information for
1823SPL. SPL needs this to know what devices are present and which drivers
1824to activate.
1825
1826
Simon Glassa7c97782022-08-07 16:33:25 -06001827
1828.. _etype_u_boot_spl_elf:
Simon Glass7a61c6b2018-07-17 13:25:37 -06001829
Simon Glassb1714232018-09-14 04:57:35 -06001830Entry: u-boot-spl-elf: U-Boot SPL ELF image
1831-------------------------------------------
1832
1833Properties / Entry arguments:
Simon Glass5dcc21d2019-07-08 13:18:45 -06001834 - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
Simon Glassb1714232018-09-14 04:57:35 -06001835
1836This is the U-Boot SPL ELF image. It does not include a device tree but can
1837be relocated to any address for execution.
1838
Simon Glass718b5292021-03-18 20:25:07 +13001839
1840
Simon Glassa7c97782022-08-07 16:33:25 -06001841.. _etype_u_boot_spl_expanded:
1842
Simon Glass718b5292021-03-18 20:25:07 +13001843Entry: u-boot-spl-expanded: U-Boot SPL flat binary broken out into its component parts
1844--------------------------------------------------------------------------------------
1845
1846Properties / Entry arguments:
1847 - spl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
1848 select)
1849
1850This is a section containing the U-Boot binary, BSS padding if needed and a
1851devicetree. Using this entry type automatically creates this section, with
1852the following entries in it:
1853
1854 u-boot-spl-nodtb
1855 u-boot-spl-bss-pad
1856 u-boot-dtb
1857
1858Having the devicetree separate allows binman to update it in the final
1859image, so that the entries positions are provided to the running U-Boot.
1860
1861This entry is selected based on the value of the 'spl-dtb' entryarg. If
1862this is non-empty (and not 'n' or '0') then this expanded entry is selected.
Simon Glassb1714232018-09-14 04:57:35 -06001863
1864
Simon Glassa7c97782022-08-07 16:33:25 -06001865
1866.. _etype_u_boot_spl_nodtb:
Simon Glass718b5292021-03-18 20:25:07 +13001867
Simon Glass7a61c6b2018-07-17 13:25:37 -06001868Entry: u-boot-spl-nodtb: SPL binary without device tree appended
1869----------------------------------------------------------------
1870
1871Properties / Entry arguments:
Simon Glass537e0062021-03-18 20:24:54 +13001872 - filename: Filename to include (default 'spl/u-boot-spl-nodtb.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06001873
1874This is the U-Boot SPL binary, It does not include a device tree blob at
1875the end of it so may not be able to work without it, assuming SPL needs
Simon Glass537e0062021-03-18 20:24:54 +13001876a device tree to operate on your platform. You can add a u-boot-spl-dtb
Simon Glass718b5292021-03-18 20:25:07 +13001877entry after this one, or use a u-boot-spl entry instead' which normally
1878expands to a section containing u-boot-spl-dtb, u-boot-spl-bss-pad and
1879u-boot-spl-dtb
Simon Glass7a61c6b2018-07-17 13:25:37 -06001880
Simon Glass18ed9962023-01-07 14:07:11 -07001881SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glass31e04cb2021-03-18 20:24:56 +13001882
1883in the binman README for more information.
1884
1885The ELF file 'spl/u-boot-spl' must also be available for this to work, since
1886binman uses that to look up symbols to write into the SPL binary.
1887
Simon Glass7a61c6b2018-07-17 13:25:37 -06001888
1889
Simon Glassa7c97782022-08-07 16:33:25 -06001890.. _etype_u_boot_spl_with_ucode_ptr:
1891
Simon Glass7a61c6b2018-07-17 13:25:37 -06001892Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
1893----------------------------------------------------------------------------
1894
Simon Glass3fb4f422018-09-14 04:57:32 -06001895This is used when SPL must set up the microcode for U-Boot.
1896
Simon Glass7a61c6b2018-07-17 13:25:37 -06001897See Entry_u_boot_ucode for full details of the entries involved in this
1898process.
1899
1900
1901
Simon Glassa7c97782022-08-07 16:33:25 -06001902.. _etype_u_boot_tpl:
1903
Simon Glass8425a1f2018-07-17 13:25:48 -06001904Entry: u-boot-tpl: U-Boot TPL binary
1905------------------------------------
1906
1907Properties / Entry arguments:
1908 - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
1909
1910This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
1911binary which loads before SPL, typically into on-chip SRAM. It is
1912responsible for locating, loading and jumping to SPL, the next-stage
1913loader. Note that SPL is not relocatable so must be loaded to the correct
1914address in SRAM, or written to run from the correct address if direct
1915flash execution is possible (e.g. on x86 devices).
1916
Simon Glass18ed9962023-01-07 14:07:11 -07001917SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glass8425a1f2018-07-17 13:25:48 -06001918
1919in the binman README for more information.
1920
1921The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
1922binman uses that to look up symbols to write into the TPL binary.
1923
Simon Glass718b5292021-03-18 20:25:07 +13001924Note that this entry is automatically replaced with u-boot-tpl-expanded
Simon Glass7098b7f2021-03-21 18:24:30 +13001925unless --no-expanded is used or the node has a 'no-expanded' property.
Simon Glass718b5292021-03-18 20:25:07 +13001926
Simon Glass8425a1f2018-07-17 13:25:48 -06001927
1928
Simon Glassa7c97782022-08-07 16:33:25 -06001929.. _etype_u_boot_tpl_bss_pad:
1930
Simon Glass63f41d42021-03-18 20:24:58 +13001931Entry: u-boot-tpl-bss-pad: U-Boot TPL binary padded with a BSS region
1932---------------------------------------------------------------------
1933
1934Properties / Entry arguments:
1935 None
1936
1937This holds the padding added after the TPL binary to cover the BSS (Block
1938Started by Symbol) region. This region holds the various variables used by
1939TPL. It is set to 0 by TPL when it starts up. If you want to append data to
1940the TPL image (such as a device tree file), you must pad out the BSS region
1941to avoid the data overlapping with U-Boot variables. This entry is useful in
1942that case. It automatically pads out the entry size to cover both the code,
1943data and BSS.
1944
1945The contents of this entry will a certain number of zero bytes, determined
1946by __bss_size
1947
1948The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
1949binman uses that to look up the BSS address.
1950
1951
1952
Simon Glassa7c97782022-08-07 16:33:25 -06001953.. _etype_u_boot_tpl_dtb:
1954
Simon Glass8425a1f2018-07-17 13:25:48 -06001955Entry: u-boot-tpl-dtb: U-Boot TPL device tree
1956---------------------------------------------
1957
1958Properties / Entry arguments:
1959 - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
1960
1961This is the TPL device tree, containing configuration information for
1962TPL. TPL needs this to know what devices are present and which drivers
1963to activate.
1964
1965
1966
Simon Glassa7c97782022-08-07 16:33:25 -06001967.. _etype_u_boot_tpl_dtb_with_ucode:
1968
Simon Glass3fb4f422018-09-14 04:57:32 -06001969Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
1970----------------------------------------------------------------------------
1971
1972This is used when TPL must set up the microcode for U-Boot.
1973
1974See Entry_u_boot_ucode for full details of the entries involved in this
1975process.
1976
1977
1978
Simon Glassa7c97782022-08-07 16:33:25 -06001979.. _etype_u_boot_tpl_elf:
1980
Simon Glassa899f712019-07-08 13:18:46 -06001981Entry: u-boot-tpl-elf: U-Boot TPL ELF image
1982-------------------------------------------
1983
1984Properties / Entry arguments:
1985 - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
1986
1987This is the U-Boot TPL ELF image. It does not include a device tree but can
1988be relocated to any address for execution.
1989
1990
Simon Glassa7c97782022-08-07 16:33:25 -06001991
1992.. _etype_u_boot_tpl_expanded:
Simon Glassa899f712019-07-08 13:18:46 -06001993
Simon Glass718b5292021-03-18 20:25:07 +13001994Entry: u-boot-tpl-expanded: U-Boot TPL flat binary broken out into its component parts
1995--------------------------------------------------------------------------------------
1996
1997Properties / Entry arguments:
1998 - tpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
1999 select)
2000
2001This is a section containing the U-Boot binary, BSS padding if needed and a
2002devicetree. Using this entry type automatically creates this section, with
2003the following entries in it:
2004
2005 u-boot-tpl-nodtb
2006 u-boot-tpl-bss-pad
2007 u-boot-dtb
2008
2009Having the devicetree separate allows binman to update it in the final
2010image, so that the entries positions are provided to the running U-Boot.
2011
2012This entry is selected based on the value of the 'tpl-dtb' entryarg. If
2013this is non-empty (and not 'n' or '0') then this expanded entry is selected.
2014
2015
2016
Simon Glassa7c97782022-08-07 16:33:25 -06002017.. _etype_u_boot_tpl_nodtb:
2018
Simon Glassc98de972021-03-18 20:24:57 +13002019Entry: u-boot-tpl-nodtb: TPL binary without device tree appended
2020----------------------------------------------------------------
2021
2022Properties / Entry arguments:
2023 - filename: Filename to include (default 'tpl/u-boot-tpl-nodtb.bin')
2024
2025This is the U-Boot TPL binary, It does not include a device tree blob at
2026the end of it so may not be able to work without it, assuming TPL needs
2027a device tree to operate on your platform. You can add a u-boot-tpl-dtb
Simon Glass718b5292021-03-18 20:25:07 +13002028entry after this one, or use a u-boot-tpl entry instead, which normally
2029expands to a section containing u-boot-tpl-dtb, u-boot-tpl-bss-pad and
2030u-boot-tpl-dtb
Simon Glassc98de972021-03-18 20:24:57 +13002031
Simon Glass18ed9962023-01-07 14:07:11 -07002032TPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glassc98de972021-03-18 20:24:57 +13002033
2034in the binman README for more information.
2035
2036The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
2037binman uses that to look up symbols to write into the TPL binary.
2038
2039
Simon Glassa7c97782022-08-07 16:33:25 -06002040
2041.. _etype_u_boot_tpl_with_ucode_ptr:
Simon Glassc98de972021-03-18 20:24:57 +13002042
Simon Glass3fb4f422018-09-14 04:57:32 -06002043Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
2044----------------------------------------------------------------------------
2045
2046See Entry_u_boot_ucode for full details of the entries involved in this
2047process.
2048
2049
2050
Simon Glassa7c97782022-08-07 16:33:25 -06002051.. _etype_u_boot_ucode:
2052
Simon Glass7a61c6b2018-07-17 13:25:37 -06002053Entry: u-boot-ucode: U-Boot microcode block
2054-------------------------------------------
2055
2056Properties / Entry arguments:
2057 None
2058
2059The contents of this entry are filled in automatically by other entries
2060which must also be in the image.
2061
2062U-Boot on x86 needs a single block of microcode. This is collected from
2063the various microcode update nodes in the device tree. It is also unable
2064to read the microcode from the device tree on platforms that use FSP
2065(Firmware Support Package) binaries, because the API requires that the
2066microcode is supplied before there is any SRAM available to use (i.e.
2067the FSP sets up the SRAM / cache-as-RAM but does so in the call that
2068requires the microcode!). To keep things simple, all x86 platforms handle
2069microcode the same way in U-Boot (even non-FSP platforms). This is that
2070a table is placed at _dt_ucode_base_size containing the base address and
2071size of the microcode. This is either passed to the FSP (for FSP
2072platforms), or used to set up the microcode (for non-FSP platforms).
2073This all happens in the build system since it is the only way to get
2074the microcode into a single blob and accessible without SRAM.
2075
2076There are two cases to handle. If there is only one microcode blob in
2077the device tree, then the ucode pointer it set to point to that. This
2078entry (u-boot-ucode) is empty. If there is more than one update, then
2079this entry holds the concatenation of all updates, and the device tree
2080entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
2081last step ensures that that the microcode appears in one contiguous
2082block in the image and is not unnecessarily duplicated in the device
2083tree. It is referred to as 'collation' here.
2084
2085Entry types that have a part to play in handling microcode:
2086
2087 Entry_u_boot_with_ucode_ptr:
2088 Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
2089 It updates it with the address and size of the microcode so that
2090 U-Boot can find it early on start-up.
2091 Entry_u_boot_dtb_with_ucode:
2092 Contains u-boot.dtb. It stores the microcode in a
2093 'self.ucode_data' property, which is then read by this class to
2094 obtain the microcode if needed. If collation is performed, it
2095 removes the microcode from the device tree.
2096 Entry_u_boot_ucode:
2097 This class. If collation is enabled it reads the microcode from
2098 the Entry_u_boot_dtb_with_ucode entry, and uses it as the
2099 contents of this entry.
2100
2101
2102
Simon Glassda6a9082023-01-07 14:07:10 -07002103.. _etype_u_boot_vpl:
2104
2105Entry: u-boot-vpl: U-Boot VPL binary
2106------------------------------------
2107
2108Properties / Entry arguments:
2109 - filename: Filename of u-boot-vpl.bin (default 'vpl/u-boot-vpl.bin')
2110
2111This is the U-Boot VPL (Verifying Program Loader) binary. This is a small
2112binary which loads before SPL, typically into on-chip SRAM. It is
2113responsible for locating, loading and jumping to SPL, the next-stage
2114loader. Note that VPL is not relocatable so must be loaded to the correct
2115address in SRAM, or written to run from the correct address if direct
2116flash execution is possible (e.g. on x86 devices).
2117
Simon Glass18ed9962023-01-07 14:07:11 -07002118SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glassda6a9082023-01-07 14:07:10 -07002119
2120in the binman README for more information.
2121
2122The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
2123binman uses that to look up symbols to write into the VPL binary.
2124
2125
2126
2127.. _etype_u_boot_vpl_bss_pad:
2128
2129Entry: u-boot-vpl-bss-pad: U-Boot VPL binary padded with a BSS region
2130---------------------------------------------------------------------
2131
2132Properties / Entry arguments:
2133 None
2134
2135This holds the padding added after the VPL binary to cover the BSS (Block
2136Started by Symbol) region. This region holds the various variables used by
2137VPL. It is set to 0 by VPL when it starts up. If you want to append data to
2138the VPL image (such as a device tree file), you must pad out the BSS region
2139to avoid the data overlapping with U-Boot variables. This entry is useful in
2140that case. It automatically pads out the entry size to cover both the code,
2141data and BSS.
2142
2143The contents of this entry will a certain number of zero bytes, determined
2144by __bss_size
2145
2146The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
2147binman uses that to look up the BSS address.
2148
2149
2150
2151.. _etype_u_boot_vpl_dtb:
2152
2153Entry: u-boot-vpl-dtb: U-Boot VPL device tree
2154---------------------------------------------
2155
2156Properties / Entry arguments:
2157 - filename: Filename of u-boot.dtb (default 'vpl/u-boot-vpl.dtb')
2158
2159This is the VPL device tree, containing configuration information for
2160VPL. VPL needs this to know what devices are present and which drivers
2161to activate.
2162
2163
2164
2165.. _etype_u_boot_vpl_elf:
2166
2167Entry: u-boot-vpl-elf: U-Boot VPL ELF image
2168-------------------------------------------
2169
2170Properties / Entry arguments:
2171 - filename: Filename of VPL u-boot (default 'vpl/u-boot-vpl')
2172
2173This is the U-Boot VPL ELF image. It does not include a device tree but can
2174be relocated to any address for execution.
2175
2176
2177
2178.. _etype_u_boot_vpl_expanded:
2179
2180Entry: u-boot-vpl-expanded: U-Boot VPL flat binary broken out into its component parts
2181--------------------------------------------------------------------------------------
2182
2183Properties / Entry arguments:
2184 - vpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
2185 select)
2186
2187This is a section containing the U-Boot binary, BSS padding if needed and a
2188devicetree. Using this entry type automatically creates this section, with
2189the following entries in it:
2190
2191 u-boot-vpl-nodtb
2192 u-boot-vpl-bss-pad
2193 u-boot-dtb
2194
2195Having the devicetree separate allows binman to update it in the final
2196image, so that the entries positions are provided to the running U-Boot.
2197
2198This entry is selected based on the value of the 'vpl-dtb' entryarg. If
2199this is non-empty (and not 'n' or '0') then this expanded entry is selected.
2200
2201
2202
2203.. _etype_u_boot_vpl_nodtb:
2204
2205Entry: u-boot-vpl-nodtb: VPL binary without device tree appended
2206----------------------------------------------------------------
2207
2208Properties / Entry arguments:
2209 - filename: Filename to include (default 'vpl/u-boot-vpl-nodtb.bin')
2210
2211This is the U-Boot VPL binary, It does not include a device tree blob at
2212the end of it so may not be able to work without it, assuming VPL needs
2213a device tree to operate on your platform. You can add a u_boot_vpl_dtb
2214entry after this one, or use a u_boot_vpl entry instead, which normally
2215expands to a section containing u-boot-vpl-dtb, u-boot-vpl-bss-pad and
2216u-boot-vpl-dtb
2217
Simon Glass18ed9962023-01-07 14:07:11 -07002218VPL can access binman symbols at runtime. See :ref:`binman_fdt`.
Simon Glassda6a9082023-01-07 14:07:10 -07002219
2220The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
2221binman uses that to look up symbols to write into the VPL binary.
2222
2223
2224
Simon Glassa7c97782022-08-07 16:33:25 -06002225.. _etype_u_boot_with_ucode_ptr:
2226
Simon Glass7a61c6b2018-07-17 13:25:37 -06002227Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
2228--------------------------------------------------------------------
2229
2230Properties / Entry arguments:
Masahiro Yamadaa7a0ca42019-12-14 13:47:26 +09002231 - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin')
Simon Glassee21d3a2018-09-14 04:57:07 -06002232 - optional-ucode: boolean property to make microcode optional. If the
2233 u-boot.bin image does not include microcode, no error will
2234 be generated.
Simon Glass7a61c6b2018-07-17 13:25:37 -06002235
2236See Entry_u_boot_ucode for full details of the three entries involved in
2237this process. This entry updates U-Boot with the offset and size of the
2238microcode, to allow early x86 boot code to find it without doing anything
Simon Glass537e0062021-03-18 20:24:54 +13002239complicated. Otherwise it is the same as the u-boot entry.
Simon Glass7a61c6b2018-07-17 13:25:37 -06002240
2241
2242
Simon Glassa7c97782022-08-07 16:33:25 -06002243.. _etype_vblock:
2244
Simon Glass5c350162018-07-17 13:25:47 -06002245Entry: vblock: An entry which contains a Chromium OS verified boot block
2246------------------------------------------------------------------------
2247
2248Properties / Entry arguments:
Simon Glass17b84eb2019-05-17 22:00:53 -06002249 - content: List of phandles to entries to sign
Simon Glass5c350162018-07-17 13:25:47 -06002250 - keydir: Directory containing the public keys to use
2251 - keyblock: Name of the key file to use (inside keydir)
2252 - signprivate: Name of provide key file to use (inside keydir)
2253 - version: Version number of the vblock (typically 1)
2254 - kernelkey: Name of the kernel key to use (inside keydir)
2255 - preamble-flags: Value of the vboot preamble flags (typically 0)
2256
Simon Glass639505b2018-09-14 04:57:11 -06002257Output files:
2258 - input.<unique_name> - input file passed to futility
2259 - vblock.<unique_name> - output file generated by futility (which is
2260 used as the entry contents)
2261
Jagdish Gediya311d4842018-09-03 21:35:08 +05302262Chromium OS signs the read-write firmware and kernel, writing the signature
Simon Glass5c350162018-07-17 13:25:47 -06002263in this block. This allows U-Boot to verify that the next firmware stage
2264and kernel are genuine.
2265
2266
2267
Simon Glassa7c97782022-08-07 16:33:25 -06002268.. _etype_x86_reset16:
2269
Simon Glass0b074d62019-08-24 07:22:48 -06002270Entry: x86-reset16: x86 16-bit reset code for U-Boot
2271----------------------------------------------------
2272
2273Properties / Entry arguments:
2274 - filename: Filename of u-boot-x86-reset16.bin (default
2275 'u-boot-x86-reset16.bin')
2276
2277x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
2278must be placed at a particular address. This entry holds that code. It is
2279typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
2280for jumping to the x86-start16 code, which continues execution.
2281
2282For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead.
2283
2284
2285
Simon Glassa7c97782022-08-07 16:33:25 -06002286.. _etype_x86_reset16_spl:
2287
Simon Glass0b074d62019-08-24 07:22:48 -06002288Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot
2289--------------------------------------------------------
2290
2291Properties / Entry arguments:
2292 - filename: Filename of u-boot-x86-reset16.bin (default
2293 'u-boot-x86-reset16.bin')
2294
2295x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
2296must be placed at a particular address. This entry holds that code. It is
2297typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
2298for jumping to the x86-start16 code, which continues execution.
2299
2300For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead.
2301
2302
2303
Simon Glassa7c97782022-08-07 16:33:25 -06002304.. _etype_x86_reset16_tpl:
2305
Simon Glass0b074d62019-08-24 07:22:48 -06002306Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot
2307--------------------------------------------------------
2308
2309Properties / Entry arguments:
2310 - filename: Filename of u-boot-x86-reset16.bin (default
2311 'u-boot-x86-reset16.bin')
2312
2313x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
2314must be placed at a particular address. This entry holds that code. It is
2315typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
2316for jumping to the x86-start16 code, which continues execution.
2317
2318For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead.
2319
2320
Simon Glassa7c97782022-08-07 16:33:25 -06002321
2322.. _etype_x86_start16:
Simon Glass0b074d62019-08-24 07:22:48 -06002323
Simon Glass7a61c6b2018-07-17 13:25:37 -06002324Entry: x86-start16: x86 16-bit start-up code for U-Boot
2325-------------------------------------------------------
2326
2327Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06002328 - filename: Filename of u-boot-x86-start16.bin (default
2329 'u-boot-x86-start16.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06002330
2331x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
Simon Glassabab18c2019-08-24 07:22:49 -06002332must be placed in the top 64KB of the ROM. The reset code jumps to it. This
2333entry holds that code. It is typically placed at offset
2334CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
2335and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
2336U-Boot).
Simon Glass7a61c6b2018-07-17 13:25:37 -06002337
2338For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
2339
2340
2341
Simon Glassa7c97782022-08-07 16:33:25 -06002342.. _etype_x86_start16_spl:
2343
Simon Glass7a61c6b2018-07-17 13:25:37 -06002344Entry: x86-start16-spl: x86 16-bit start-up code for SPL
2345--------------------------------------------------------
2346
2347Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06002348 - filename: Filename of spl/u-boot-x86-start16-spl.bin (default
2349 'spl/u-boot-x86-start16-spl.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06002350
Simon Glassabab18c2019-08-24 07:22:49 -06002351x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
2352must be placed in the top 64KB of the ROM. The reset code jumps to it. This
2353entry holds that code. It is typically placed at offset
2354CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
2355and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
2356U-Boot).
Simon Glass7a61c6b2018-07-17 13:25:37 -06002357
Simon Glassabab18c2019-08-24 07:22:49 -06002358For 32-bit U-Boot, the 'x86-start16' entry type is used instead.
Simon Glass7a61c6b2018-07-17 13:25:37 -06002359
2360
2361
Simon Glassa7c97782022-08-07 16:33:25 -06002362.. _etype_x86_start16_tpl:
2363
Simon Glassed40e962018-09-14 04:57:10 -06002364Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
2365--------------------------------------------------------
2366
2367Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06002368 - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default
2369 'tpl/u-boot-x86-start16-tpl.bin')
Simon Glassed40e962018-09-14 04:57:10 -06002370
Simon Glassabab18c2019-08-24 07:22:49 -06002371x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
2372must be placed in the top 64KB of the ROM. The reset code jumps to it. This
2373entry holds that code. It is typically placed at offset
2374CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
2375and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
2376U-Boot).
Simon Glassed40e962018-09-14 04:57:10 -06002377
Simon Glassabab18c2019-08-24 07:22:49 -06002378If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types
Simon Glassed40e962018-09-14 04:57:10 -06002379may be used instead.
2380
2381
2382