blob: 46f6ab189980fffce87d5efff326e21d0a84e128 [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
14Entry: blob: Entry containing an arbitrary binary blob
15------------------------------------------------------
16
17Note: This should not be used by itself. It is normally used as a parent
18class by other entry types.
19
20Properties / Entry arguments:
21 - filename: Filename of file to read into entry
Simon Glass7ba33592018-09-14 04:57:26 -060022 - compress: Compression algorithm to use:
23 none: No compression
24 lz4: Use lz4 compression (via 'lz4' command-line utility)
Simon Glass7a61c6b2018-07-17 13:25:37 -060025
26This entry reads data from a file and places it in the entry. The
27default filename is often specified specified by the subclass. See for
28example the 'u_boot' entry which provides the filename 'u-boot.bin'.
29
Simon Glass7ba33592018-09-14 04:57:26 -060030If compression is enabled, an extra 'uncomp-size' property is written to
31the node (if enabled with -u) which provides the uncompressed size of the
32data.
Simon Glass7a61c6b2018-07-17 13:25:37 -060033
34
Simon Glass7a61c6b2018-07-17 13:25:37 -060035
Simon Glasse219aa42018-09-14 04:57:24 -060036Entry: blob-dtb: A blob that holds a device tree
37------------------------------------------------
38
39This is a blob containing a device tree. The contents of the blob are
40obtained from the list of available device-tree files, managed by the
41'state' module.
42
43
44
Simon Glass5e560182020-07-09 18:39:36 -060045Entry: blob-ext: Entry containing an externally built binary blob
46-----------------------------------------------------------------
47
48Note: This should not be used by itself. It is normally used as a parent
49class by other entry types.
50
51See 'blob' for Properties / Entry arguments.
52
53
54
Simon Glassdb168d42018-07-17 13:25:39 -060055Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
56-----------------------------------------------------------------------------------------
57
58Properties / Entry arguments:
59 - <xxx>-path: Filename containing the contents of this entry (optional,
60 defaults to 0)
61
62where <xxx> is the blob_fname argument to the constructor.
63
64This entry cannot be used directly. Instead, it is used as a parent class
65for another entry, which defined blob_fname. This parameter is used to
66set the entry-arg or property containing the filename. The entry-arg or
67property is in turn used to set the actual filename.
68
69See cros_ec_rw for an example of this.
70
71
72
Simon Glass1de34482019-07-08 13:18:53 -060073Entry: cbfs: Entry containing a Coreboot Filesystem (CBFS)
74----------------------------------------------------------
75
76A CBFS provides a way to group files into a group. It has a simple directory
77structure and allows the position of individual files to be set, since it is
78designed to support execute-in-place in an x86 SPI-flash device. Where XIP
79is not used, it supports compression and storing ELF files.
80
81CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
82
83The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:
84
85 cbfs {
86 size = <0x100000>;
87 u-boot {
88 cbfs-type = "raw";
89 };
90 u-boot-dtb {
91 cbfs-type = "raw";
92 };
93 };
94
95This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
96Note that the size is required since binman does not support calculating it.
97The contents of each entry is just what binman would normally provide if it
98were not a CBFS node. A blob type can be used to import arbitrary files as
99with the second subnode below:
100
101 cbfs {
102 size = <0x100000>;
103 u-boot {
104 cbfs-name = "BOOT";
105 cbfs-type = "raw";
106 };
107
108 dtb {
109 type = "blob";
110 filename = "u-boot.dtb";
111 cbfs-type = "raw";
112 cbfs-compress = "lz4";
Simon Glassc2f1aed2019-07-08 13:18:56 -0600113 cbfs-offset = <0x100000>;
Simon Glass1de34482019-07-08 13:18:53 -0600114 };
115 };
116
117This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
118u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
119
120
121Properties supported in the top-level CBFS node:
122
123cbfs-arch:
124 Defaults to "x86", but you can specify the architecture if needed.
125
126
127Properties supported in the CBFS entry subnodes:
128
129cbfs-name:
130 This is the name of the file created in CBFS. It defaults to the entry
131 name (which is the node name), but you can override it with this
132 property.
133
134cbfs-type:
135 This is the CBFS file type. The following are supported:
136
137 raw:
138 This is a 'raw' file, although compression is supported. It can be
139 used to store any file in CBFS.
140
141 stage:
142 This is an ELF file that has been loaded (i.e. mapped to memory), so
143 appears in the CBFS as a flat binary. The input file must be an ELF
144 image, for example this puts "u-boot" (the ELF image) into a 'stage'
145 entry:
146
147 cbfs {
148 size = <0x100000>;
149 u-boot-elf {
150 cbfs-name = "BOOT";
151 cbfs-type = "stage";
152 };
153 };
154
155 You can use your own ELF file with something like:
156
157 cbfs {
158 size = <0x100000>;
159 something {
160 type = "blob";
161 filename = "cbfs-stage.elf";
162 cbfs-type = "stage";
163 };
164 };
165
166 As mentioned, the file is converted to a flat binary, so it is
167 equivalent to adding "u-boot.bin", for example, but with the load and
168 start addresses specified by the ELF. At present there is no option
169 to add a flat binary with a load/start address, similar to the
170 'add-flat-binary' option in cbfstool.
171
Simon Glassc2f1aed2019-07-08 13:18:56 -0600172cbfs-offset:
173 This is the offset of the file's data within the CBFS. It is used to
174 specify where the file should be placed in cases where a fixed position
175 is needed. Typical uses are for code which is not relocatable and must
176 execute in-place from a particular address. This works because SPI flash
177 is generally mapped into memory on x86 devices. The file header is
178 placed before this offset so that the data start lines up exactly with
179 the chosen offset. If this property is not provided, then the file is
180 placed in the next available spot.
Simon Glass1de34482019-07-08 13:18:53 -0600181
182The current implementation supports only a subset of CBFS features. It does
183not support other file types (e.g. payload), adding multiple files (like the
184'files' entry with a pattern supported by binman), putting files at a
185particular offset in the CBFS and a few other things.
186
187Of course binman can create images containing multiple CBFSs, simply by
188defining these in the binman config:
189
190
191 binman {
192 size = <0x800000>;
193 cbfs {
194 offset = <0x100000>;
195 size = <0x100000>;
196 u-boot {
197 cbfs-type = "raw";
198 };
199 u-boot-dtb {
200 cbfs-type = "raw";
201 };
202 };
203
204 cbfs2 {
205 offset = <0x700000>;
206 size = <0x100000>;
207 u-boot {
208 cbfs-type = "raw";
209 };
210 u-boot-dtb {
211 cbfs-type = "raw";
212 };
213 image {
214 type = "blob";
215 filename = "image.jpg";
216 };
217 };
218 };
219
220This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
221both of size 1MB.
222
223
224
Simon Glassdb168d42018-07-17 13:25:39 -0600225Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
226--------------------------------------------------------------------------------
227
228Properties / Entry arguments:
229 - cros-ec-rw-path: Filename containing the EC image
230
231This entry holds a Chromium OS EC (embedded controller) image, for use in
232updating the EC on startup via software sync.
233
234
235
Simon Glass0f621332019-07-08 14:25:27 -0600236Entry: fdtmap: An entry which contains an FDT map
237-------------------------------------------------
238
239Properties / Entry arguments:
240 None
241
242An FDT map is just a header followed by an FDT containing a list of all the
Simon Glassfb30e292019-07-20 12:23:51 -0600243entries in the image. The root node corresponds to the image node in the
244original FDT, and an image-name property indicates the image name in that
245original tree.
Simon Glass0f621332019-07-08 14:25:27 -0600246
247The header is the string _FDTMAP_ followed by 8 unused bytes.
248
249When used, this entry will be populated with an FDT map which reflects the
250entries in the current image. Hierarchy is preserved, and all offsets and
251sizes are included.
252
253Note that the -u option must be provided to ensure that binman updates the
254FDT with the position of each entry.
255
256Example output for a simple image with U-Boot and an FDT map:
257
258/ {
Simon Glassfb30e292019-07-20 12:23:51 -0600259 image-name = "binman";
Simon Glass0f621332019-07-08 14:25:27 -0600260 size = <0x00000112>;
261 image-pos = <0x00000000>;
262 offset = <0x00000000>;
263 u-boot {
264 size = <0x00000004>;
265 image-pos = <0x00000000>;
266 offset = <0x00000000>;
267 };
268 fdtmap {
269 size = <0x0000010e>;
270 image-pos = <0x00000004>;
271 offset = <0x00000004>;
272 };
273};
274
Simon Glassfb30e292019-07-20 12:23:51 -0600275If allow-repack is used then 'orig-offset' and 'orig-size' properties are
276added as necessary. See the binman README.
277
Simon Glass0f621332019-07-08 14:25:27 -0600278
279
Simon Glassac6328c2018-09-14 04:57:28 -0600280Entry: files: Entry containing a set of files
281---------------------------------------------
282
283Properties / Entry arguments:
284 - pattern: Filename pattern to match the files to include
285 - compress: Compression algorithm to use:
286 none: No compression
287 lz4: Use lz4 compression (via 'lz4' command-line utility)
288
289This entry reads a number of files and places each in a separate sub-entry
290within this entry. To access these you need to enable device-tree updates
291at run-time so you can obtain the file positions.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600292
293
Simon Glassac6328c2018-09-14 04:57:28 -0600294
Simon Glass53f53992018-07-17 13:25:40 -0600295Entry: fill: An entry which is filled to a particular byte value
296----------------------------------------------------------------
297
298Properties / Entry arguments:
299 - fill-byte: Byte to use to fill the entry
300
301Note that the size property must be set since otherwise this entry does not
302know how large it should be.
303
304You can often achieve the same effect using the pad-byte property of the
305overall image, in that the space between entries will then be padded with
306that byte. But this entry is sometimes useful for explicitly setting the
307byte value of a region.
308
309
Simon Glassc7b010d2020-07-09 18:39:45 -0600310
Simon Glass7a61c6b2018-07-17 13:25:37 -0600311Entry: fmap: An entry which contains an Fmap section
312----------------------------------------------------
313
314Properties / Entry arguments:
315 None
316
317FMAP is a simple format used by flashrom, an open-source utility for
318reading and writing the SPI flash, typically on x86 CPUs. The format
319provides flashrom with a list of areas, so it knows what it in the flash.
320It can then read or write just a single area, instead of the whole flash.
321
322The format is defined by the flashrom project, in the file lib/fmap.h -
323see www.flashrom.org/Flashrom for more information.
324
325When used, this entry will be populated with an FMAP which reflects the
326entries in the current image. Note that any hierarchy is squashed, since
Simon Glasscf0b21c2019-07-20 12:24:00 -0600327FMAP does not support this. Also, CBFS entries appear as a single entry -
328the sub-entries are ignored.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600329
330
331
Simon Glassc1ae83c2018-07-17 13:25:44 -0600332Entry: gbb: An entry which contains a Chromium OS Google Binary Block
333---------------------------------------------------------------------
334
335Properties / Entry arguments:
336 - hardware-id: Hardware ID to use for this build (a string)
337 - keydir: Directory containing the public keys to use
338 - bmpblk: Filename containing images used by recovery
339
340Chromium OS uses a GBB to store various pieces of information, in particular
341the root and recovery keys that are used to verify the boot process. Some
342more details are here:
343
344 https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
345
346but note that the page dates from 2013 so is quite out of date. See
347README.chromium for how to obtain the required keys and tools.
348
349
350
Simon Glasscec34ba2019-07-08 14:25:28 -0600351Entry: image-header: An entry which contains a pointer to the FDT map
352---------------------------------------------------------------------
353
354Properties / Entry arguments:
355 location: Location of header ("start" or "end" of image). This is
356 optional. If omitted then the entry must have an offset property.
357
358This adds an 8-byte entry to the start or end of the image, pointing to the
359location of the FDT map. The format is a magic number followed by an offset
360from the start or end of the image, in twos-compliment format.
361
362This entry must be in the top-level part of the image.
363
364NOTE: If the location is at the start/end, you will probably need to specify
365sort-by-offset for the image, unless you actually put the image header
366first/last in the entry list.
367
368
369
Simon Glass7a61c6b2018-07-17 13:25:37 -0600370Entry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
371-------------------------------------------------------------------------
372
373Properties / Entry arguments:
374 - filename: Filename of file to read into entry
375
376This file contains microcode for some devices in a special format. An
377example filename is 'Microcode/C0_22211.BIN'.
378
379See README.x86 for information about x86 binary blobs.
380
381
382
383Entry: intel-descriptor: Intel flash descriptor block (4KB)
384-----------------------------------------------------------
385
386Properties / Entry arguments:
387 filename: Filename of file containing the descriptor. This is typically
388 a 4KB binary file, sometimes called 'descriptor.bin'
389
390This entry is placed at the start of flash and provides information about
391the SPI flash regions. In particular it provides the base address and
392size of the ME (Management Engine) region, allowing us to place the ME
393binary in the right place.
394
395With this entry in your image, the position of the 'intel-me' entry will be
396fixed in the image, which avoids you needed to specify an offset for that
397region. This is useful, because it is not possible to change the position
398of the ME region without updating the descriptor.
399
400See README.x86 for information about x86 binary blobs.
401
402
403
Simon Glass232f90c2019-08-24 07:22:50 -0600404Entry: intel-fit: Intel Firmware Image Table (FIT)
405--------------------------------------------------
406
407This entry contains a dummy FIT as required by recent Intel CPUs. The FIT
408contains information about the firmware and microcode available in the
409image.
410
411At present binman only supports a basic FIT with no microcode.
412
413
414
415Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer
416--------------------------------------------------------------
417
418This entry contains a pointer to the FIT. It is required to be at address
4190xffffffc0 in the image.
420
421
422
Simon Glass7a61c6b2018-07-17 13:25:37 -0600423Entry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
424-------------------------------------------------------------------------------
425
426Properties / Entry arguments:
427 - filename: Filename of file to read into entry
428
429This file contains binary blobs which are used on some devices to make the
430platform work. U-Boot executes this code since it is not possible to set up
431the hardware using U-Boot open-source code. Documentation is typically not
432available in sufficient detail to allow this.
433
434An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
435
436See README.x86 for information about x86 binary blobs.
437
438
439
Simon Glassba7985d2019-08-24 07:23:07 -0600440Entry: intel-fsp-m: Entry containing Intel Firmware Support Package (FSP) memory init
441-------------------------------------------------------------------------------------
442
443Properties / Entry arguments:
444 - filename: Filename of file to read into entry
445
446This file contains a binary blob which is used on some devices to set up
447SDRAM. U-Boot executes this code in SPL so that it can make full use of
448memory. Documentation is typically not available in sufficient detail to
449allow U-Boot do this this itself..
450
451An example filename is 'fsp_m.bin'
452
453See README.x86 for information about x86 binary blobs.
454
455
456
Simon Glass4d9086d2019-10-20 21:31:35 -0600457Entry: intel-fsp-s: Entry containing Intel Firmware Support Package (FSP) silicon init
458--------------------------------------------------------------------------------------
459
460Properties / Entry arguments:
461 - filename: Filename of file to read into entry
462
463This file contains a binary blob which is used on some devices to set up
464the silicon. U-Boot executes this code in U-Boot proper after SDRAM is
465running, so that it can make full use of memory. Documentation is typically
466not available in sufficient detail to allow U-Boot do this this itself.
467
468An example filename is 'fsp_s.bin'
469
470See README.x86 for information about x86 binary blobs.
471
472
473
Simon Glass9ea87b22019-10-20 21:31:36 -0600474Entry: intel-fsp-t: Entry containing Intel Firmware Support Package (FSP) temp ram init
475---------------------------------------------------------------------------------------
476
477Properties / Entry arguments:
478 - filename: Filename of file to read into entry
479
480This file contains a binary blob which is used on some devices to set up
481temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so
482that it has access to memory for its stack and initial storage.
483
484An example filename is 'fsp_t.bin'
485
486See README.x86 for information about x86 binary blobs.
487
488
489
Simon Glassc2f1aed2019-07-08 13:18:56 -0600490Entry: intel-ifwi: Entry containing an Intel Integrated Firmware Image (IFWI) file
491----------------------------------------------------------------------------------
492
493Properties / Entry arguments:
494 - filename: Filename of file to read into entry. This is either the
495 IFWI file itself, or a file that can be converted into one using a
496 tool
497 - convert-fit: If present this indicates that the ifwitool should be
498 used to convert the provided file into a IFWI.
499
500This file contains code and data used by the SoC that is required to make
501it work. It includes U-Boot TPL, microcode, things related to the CSE
502(Converged Security Engine, the microcontroller that loads all the firmware)
503and other items beyond the wit of man.
504
505A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a
506file that will be converted to an IFWI.
507
508The position of this entry is generally set by the intel-descriptor entry.
509
510The contents of the IFWI are specified by the subnodes of the IFWI node.
511Each subnode describes an entry which is placed into the IFWFI with a given
512sub-partition (and optional entry name).
513
Simon Glass8a5e2492019-08-24 07:22:47 -0600514Properties for subnodes:
515 ifwi-subpart - sub-parition to put this entry into, e.g. "IBBP"
516 ifwi-entry - entry name t use, e.g. "IBBL"
517 ifwi-replace - if present, indicates that the item should be replaced
518 in the IFWI. Otherwise it is added.
519
Simon Glassc2f1aed2019-07-08 13:18:56 -0600520See README.x86 for information about x86 binary blobs.
521
522
523
Simon Glass7a61c6b2018-07-17 13:25:37 -0600524Entry: intel-me: Entry containing an Intel Management Engine (ME) file
525----------------------------------------------------------------------
526
527Properties / Entry arguments:
528 - filename: Filename of file to read into entry
529
530This file contains code used by the SoC that is required to make it work.
531The Management Engine is like a background task that runs things that are
Thomas Hebbfd37f242019-11-13 18:18:03 -0800532not clearly documented, but may include keyboard, display and network
Simon Glass7a61c6b2018-07-17 13:25:37 -0600533access. For platform that use ME it is not possible to disable it. U-Boot
534does not directly execute code in the ME binary.
535
536A typical filename is 'me.bin'.
537
Simon Glassc4056b82019-07-08 13:18:38 -0600538The position of this entry is generally set by the intel-descriptor entry.
539
Simon Glass7a61c6b2018-07-17 13:25:37 -0600540See README.x86 for information about x86 binary blobs.
541
542
543
544Entry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
545----------------------------------------------------------------------------
546
547Properties / Entry arguments:
548 - filename: Filename of file to read into entry
549
550This file contains code for setting up the SDRAM on some Intel systems. This
551is executed by U-Boot when needed early during startup. A typical filename
552is 'mrc.bin'.
553
554See README.x86 for information about x86 binary blobs.
555
556
557
Simon Glass17b84eb2019-05-17 22:00:53 -0600558Entry: intel-refcode: Entry containing an Intel Reference Code file
559-------------------------------------------------------------------
560
561Properties / Entry arguments:
562 - filename: Filename of file to read into entry
563
564This file contains code for setting up the platform on some Intel systems.
565This is executed by U-Boot when needed early during startup. A typical
566filename is 'refcode.bin'.
567
568See README.x86 for information about x86 binary blobs.
569
570
571
Simon Glass7a61c6b2018-07-17 13:25:37 -0600572Entry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
573-----------------------------------------------------------------------
574
575Properties / Entry arguments:
576 - filename: Filename of file to read into entry
577
578This file contains code that sets up the integrated graphics subsystem on
579some Intel SoCs. U-Boot executes this when the display is started up.
580
581See README.x86 for information about Intel binary blobs.
582
583
584
585Entry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
586-----------------------------------------------------------------------------
587
588Properties / Entry arguments:
589 - filename: Filename of file to read into entry
590
591This file contains code that sets up the integrated graphics subsystem on
592some Intel SoCs. U-Boot executes this when the display is started up.
593
594This is similar to the VBT file but in a different format.
595
596See README.x86 for information about Intel binary blobs.
597
598
599
Simon Glass48f3aad2020-07-09 18:39:31 -0600600Entry: mkimage: Entry containing a binary produced by mkimage
601-------------------------------------------------------------
602
603Properties / Entry arguments:
604 - datafile: Filename for -d argument
605 - args: Other arguments to pass
606
607The data passed to mkimage is collected from subnodes of the mkimage node,
608e.g.:
609
610 mkimage {
611 args = "-n test -T imximage";
612
613 u-boot-spl {
614 };
615 };
616
617This calls mkimage to create an imximage with u-boot-spl.bin as the input
618file. The output from mkimage then becomes part of the image produced by
619binman.
620
621
622
Jagdish Gediya311d4842018-09-03 21:35:08 +0530623Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
624-----------------------------------------------------------------------------------------
625
626Properties / Entry arguments:
627 - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
628
Thomas Hebbfd37f242019-11-13 18:18:03 -0800629This entry is valid for PowerPC mpc85xx cpus. This entry holds
Jagdish Gediya311d4842018-09-03 21:35:08 +0530630'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
631placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
632
633
634
Simon Glass7a61c6b2018-07-17 13:25:37 -0600635Entry: section: Entry that contains other entries
636-------------------------------------------------
637
638Properties / Entry arguments: (see binman README for more information)
Simon Glass39dd2152019-07-08 14:25:47 -0600639 pad-byte: Pad byte to use when padding
640 sort-by-offset: True if entries should be sorted by offset, False if
641 they must be in-order in the device tree description
642 end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
643 skip-at-start: Number of bytes before the first entry starts. These
644 effectively adjust the starting offset of entries. For example,
645 if this is 16, then the first entry would start at 16. An entry
646 with offset = 20 would in fact be written at offset 4 in the image
647 file, since the first 16 bytes are skipped when writing.
648 name-prefix: Adds a prefix to the name of every entry in the section
Simon Glass7a61c6b2018-07-17 13:25:37 -0600649 when writing out the map
650
Simon Glass39dd2152019-07-08 14:25:47 -0600651Since a section is also an entry, it inherits all the properies of entries
652too.
653
Simon Glass7a61c6b2018-07-17 13:25:37 -0600654A section is an entry which can contain other entries, thus allowing
655hierarchical images to be created. See 'Sections and hierarchical images'
656in the binman README for more information.
657
658
659
660Entry: text: An entry which contains text
661-----------------------------------------
662
663The text can be provided either in the node itself or by a command-line
664argument. There is a level of indirection to allow multiple text strings
665and sharing of text.
666
667Properties / Entry arguments:
668 text-label: The value of this string indicates the property / entry-arg
669 that contains the string to place in the entry
670 <xxx> (actual name is the value of text-label): contains the string to
671 place in the entry.
Simon Glass47f6a622019-07-08 13:18:40 -0600672 <text>: The text to place in the entry (overrides the above mechanism).
673 This is useful when the text is constant.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600674
675Example node:
676
677 text {
678 size = <50>;
679 text-label = "message";
680 };
681
682You can then use:
683
684 binman -amessage="this is my message"
685
686and binman will insert that string into the entry.
687
688It is also possible to put the string directly in the node:
689
690 text {
691 size = <8>;
692 text-label = "message";
693 message = "a message directly in the node"
694 };
695
Simon Glass47f6a622019-07-08 13:18:40 -0600696or just:
697
698 text {
699 size = <8>;
700 text = "some text directly in the node"
701 };
702
Simon Glass7a61c6b2018-07-17 13:25:37 -0600703The text is not itself nul-terminated. This can be achieved, if required,
704by setting the size of the entry to something larger than the text.
705
706
707
708Entry: u-boot: U-Boot flat binary
709---------------------------------
710
711Properties / Entry arguments:
712 - filename: Filename of u-boot.bin (default 'u-boot.bin')
713
714This is the U-Boot binary, containing relocation information to allow it
715to relocate itself at runtime. The binary typically includes a device tree
716blob at the end of it. Use u_boot_nodtb if you want to package the device
717tree separately.
718
719U-Boot can access binman symbols at runtime. See:
720
721 'Access to binman entry offsets at run time (fdt)'
722
723in the binman README for more information.
724
725
726
727Entry: u-boot-dtb: U-Boot device tree
728-------------------------------------
729
730Properties / Entry arguments:
731 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
732
733This is the U-Boot device tree, containing configuration information for
734U-Boot. U-Boot needs this to know what devices are present and which drivers
735to activate.
736
Simon Glasse219aa42018-09-14 04:57:24 -0600737Note: This is mostly an internal entry type, used by others. This allows
738binman to know which entries contain a device tree.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600739
740
Simon Glass7a61c6b2018-07-17 13:25:37 -0600741
742Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
743-----------------------------------------------------------------------------------
744
745Properties / Entry arguments:
746 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
747
748See Entry_u_boot_ucode for full details of the three entries involved in
749this process. This entry provides the U-Boot device-tree file, which
750contains the microcode. If the microcode is not being collated into one
751place then the offset and size of the microcode is recorded by this entry,
752for use by u_boot_with_ucode_ptr. If it is being collated, then this
753entry deletes the microcode from the device tree (to save space) and makes
754it available to u_boot_ucode.
755
756
757
Simon Glassb1714232018-09-14 04:57:35 -0600758Entry: u-boot-elf: U-Boot ELF image
759-----------------------------------
760
761Properties / Entry arguments:
762 - filename: Filename of u-boot (default 'u-boot')
763
764This is the U-Boot ELF image. It does not include a device tree but can be
765relocated to any address for execution.
766
767
768
Simon Glass7a61c6b2018-07-17 13:25:37 -0600769Entry: u-boot-img: U-Boot legacy image
770--------------------------------------
771
772Properties / Entry arguments:
773 - filename: Filename of u-boot.img (default 'u-boot.img')
774
775This is the U-Boot binary as a packaged image, in legacy format. It has a
776header which allows it to be loaded at the correct address for execution.
777
778You should use FIT (Flat Image Tree) instead of the legacy image for new
779applications.
780
781
782
783Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
784--------------------------------------------------------------------
785
786Properties / Entry arguments:
787 - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
788
789This is the U-Boot binary, containing relocation information to allow it
790to relocate itself at runtime. It does not include a device tree blob at
791the end of it so normally cannot work without it. You can add a u_boot_dtb
792entry after this one, or use a u_boot entry instead (which contains both
793U-Boot and the device tree).
794
795
796
797Entry: u-boot-spl: U-Boot SPL binary
798------------------------------------
799
800Properties / Entry arguments:
801 - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
802
803This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
804binary which loads before U-Boot proper, typically into on-chip SRAM. It is
805responsible for locating, loading and jumping to U-Boot. Note that SPL is
806not relocatable so must be loaded to the correct address in SRAM, or written
Simon Glass8425a1f2018-07-17 13:25:48 -0600807to run from the correct address if direct flash execution is possible (e.g.
Simon Glass7a61c6b2018-07-17 13:25:37 -0600808on x86 devices).
809
810SPL can access binman symbols at runtime. See:
811
812 'Access to binman entry offsets at run time (symbols)'
813
814in the binman README for more information.
815
816The ELF file 'spl/u-boot-spl' must also be available for this to work, since
817binman uses that to look up symbols to write into the SPL binary.
818
819
820
821Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
822---------------------------------------------------------------------
823
824Properties / Entry arguments:
825 None
826
827This is similar to u_boot_spl except that padding is added after the SPL
828binary to cover the BSS (Block Started by Symbol) region. This region holds
829the various used by SPL. It is set to 0 by SPL when it starts up. If you
830want to append data to the SPL image (such as a device tree file), you must
831pad out the BSS region to avoid the data overlapping with U-Boot variables.
832This entry is useful in that case. It automatically pads out the entry size
833to cover both the code, data and BSS.
834
835The ELF file 'spl/u-boot-spl' must also be available for this to work, since
836binman uses that to look up the BSS address.
837
838
839
840Entry: u-boot-spl-dtb: U-Boot SPL device tree
841---------------------------------------------
842
843Properties / Entry arguments:
844 - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
845
846This is the SPL device tree, containing configuration information for
847SPL. SPL needs this to know what devices are present and which drivers
848to activate.
849
850
851
Simon Glassb1714232018-09-14 04:57:35 -0600852Entry: u-boot-spl-elf: U-Boot SPL ELF image
853-------------------------------------------
854
855Properties / Entry arguments:
Simon Glass5dcc21d2019-07-08 13:18:45 -0600856 - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
Simon Glassb1714232018-09-14 04:57:35 -0600857
858This is the U-Boot SPL ELF image. It does not include a device tree but can
859be relocated to any address for execution.
860
861
862
Simon Glass7a61c6b2018-07-17 13:25:37 -0600863Entry: u-boot-spl-nodtb: SPL binary without device tree appended
864----------------------------------------------------------------
865
866Properties / Entry arguments:
867 - filename: Filename of spl/u-boot-spl-nodtb.bin (default
868 'spl/u-boot-spl-nodtb.bin')
869
870This is the U-Boot SPL binary, It does not include a device tree blob at
871the end of it so may not be able to work without it, assuming SPL needs
872a device tree to operation on your platform. You can add a u_boot_spl_dtb
873entry after this one, or use a u_boot_spl entry instead (which contains
874both SPL and the device tree).
875
876
877
878Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
879----------------------------------------------------------------------------
880
Simon Glass3fb4f422018-09-14 04:57:32 -0600881This is used when SPL must set up the microcode for U-Boot.
882
Simon Glass7a61c6b2018-07-17 13:25:37 -0600883See Entry_u_boot_ucode for full details of the entries involved in this
884process.
885
886
887
Simon Glass8425a1f2018-07-17 13:25:48 -0600888Entry: u-boot-tpl: U-Boot TPL binary
889------------------------------------
890
891Properties / Entry arguments:
892 - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
893
894This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
895binary which loads before SPL, typically into on-chip SRAM. It is
896responsible for locating, loading and jumping to SPL, the next-stage
897loader. Note that SPL is not relocatable so must be loaded to the correct
898address in SRAM, or written to run from the correct address if direct
899flash execution is possible (e.g. on x86 devices).
900
901SPL can access binman symbols at runtime. See:
902
903 'Access to binman entry offsets at run time (symbols)'
904
905in the binman README for more information.
906
907The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
908binman uses that to look up symbols to write into the TPL binary.
909
910
911
912Entry: u-boot-tpl-dtb: U-Boot TPL device tree
913---------------------------------------------
914
915Properties / Entry arguments:
916 - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
917
918This is the TPL device tree, containing configuration information for
919TPL. TPL needs this to know what devices are present and which drivers
920to activate.
921
922
923
Simon Glass3fb4f422018-09-14 04:57:32 -0600924Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
925----------------------------------------------------------------------------
926
927This is used when TPL must set up the microcode for U-Boot.
928
929See Entry_u_boot_ucode for full details of the entries involved in this
930process.
931
932
933
Simon Glassa899f712019-07-08 13:18:46 -0600934Entry: u-boot-tpl-elf: U-Boot TPL ELF image
935-------------------------------------------
936
937Properties / Entry arguments:
938 - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
939
940This is the U-Boot TPL ELF image. It does not include a device tree but can
941be relocated to any address for execution.
942
943
944
Simon Glass3fb4f422018-09-14 04:57:32 -0600945Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
946----------------------------------------------------------------------------
947
948See Entry_u_boot_ucode for full details of the entries involved in this
949process.
950
951
952
Simon Glass7a61c6b2018-07-17 13:25:37 -0600953Entry: u-boot-ucode: U-Boot microcode block
954-------------------------------------------
955
956Properties / Entry arguments:
957 None
958
959The contents of this entry are filled in automatically by other entries
960which must also be in the image.
961
962U-Boot on x86 needs a single block of microcode. This is collected from
963the various microcode update nodes in the device tree. It is also unable
964to read the microcode from the device tree on platforms that use FSP
965(Firmware Support Package) binaries, because the API requires that the
966microcode is supplied before there is any SRAM available to use (i.e.
967the FSP sets up the SRAM / cache-as-RAM but does so in the call that
968requires the microcode!). To keep things simple, all x86 platforms handle
969microcode the same way in U-Boot (even non-FSP platforms). This is that
970a table is placed at _dt_ucode_base_size containing the base address and
971size of the microcode. This is either passed to the FSP (for FSP
972platforms), or used to set up the microcode (for non-FSP platforms).
973This all happens in the build system since it is the only way to get
974the microcode into a single blob and accessible without SRAM.
975
976There are two cases to handle. If there is only one microcode blob in
977the device tree, then the ucode pointer it set to point to that. This
978entry (u-boot-ucode) is empty. If there is more than one update, then
979this entry holds the concatenation of all updates, and the device tree
980entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
981last step ensures that that the microcode appears in one contiguous
982block in the image and is not unnecessarily duplicated in the device
983tree. It is referred to as 'collation' here.
984
985Entry types that have a part to play in handling microcode:
986
987 Entry_u_boot_with_ucode_ptr:
988 Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
989 It updates it with the address and size of the microcode so that
990 U-Boot can find it early on start-up.
991 Entry_u_boot_dtb_with_ucode:
992 Contains u-boot.dtb. It stores the microcode in a
993 'self.ucode_data' property, which is then read by this class to
994 obtain the microcode if needed. If collation is performed, it
995 removes the microcode from the device tree.
996 Entry_u_boot_ucode:
997 This class. If collation is enabled it reads the microcode from
998 the Entry_u_boot_dtb_with_ucode entry, and uses it as the
999 contents of this entry.
1000
1001
1002
1003Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
1004--------------------------------------------------------------------
1005
1006Properties / Entry arguments:
Masahiro Yamadaa7a0ca42019-12-14 13:47:26 +09001007 - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin')
Simon Glassee21d3a2018-09-14 04:57:07 -06001008 - optional-ucode: boolean property to make microcode optional. If the
1009 u-boot.bin image does not include microcode, no error will
1010 be generated.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001011
1012See Entry_u_boot_ucode for full details of the three entries involved in
1013this process. This entry updates U-Boot with the offset and size of the
1014microcode, to allow early x86 boot code to find it without doing anything
1015complicated. Otherwise it is the same as the u_boot entry.
1016
1017
1018
Simon Glass5c350162018-07-17 13:25:47 -06001019Entry: vblock: An entry which contains a Chromium OS verified boot block
1020------------------------------------------------------------------------
1021
1022Properties / Entry arguments:
Simon Glass17b84eb2019-05-17 22:00:53 -06001023 - content: List of phandles to entries to sign
Simon Glass5c350162018-07-17 13:25:47 -06001024 - keydir: Directory containing the public keys to use
1025 - keyblock: Name of the key file to use (inside keydir)
1026 - signprivate: Name of provide key file to use (inside keydir)
1027 - version: Version number of the vblock (typically 1)
1028 - kernelkey: Name of the kernel key to use (inside keydir)
1029 - preamble-flags: Value of the vboot preamble flags (typically 0)
1030
Simon Glass639505b2018-09-14 04:57:11 -06001031Output files:
1032 - input.<unique_name> - input file passed to futility
1033 - vblock.<unique_name> - output file generated by futility (which is
1034 used as the entry contents)
1035
Jagdish Gediya311d4842018-09-03 21:35:08 +05301036Chromium OS signs the read-write firmware and kernel, writing the signature
Simon Glass5c350162018-07-17 13:25:47 -06001037in this block. This allows U-Boot to verify that the next firmware stage
1038and kernel are genuine.
1039
1040
1041
Simon Glass0b074d62019-08-24 07:22:48 -06001042Entry: x86-reset16: x86 16-bit reset code for U-Boot
1043----------------------------------------------------
1044
1045Properties / Entry arguments:
1046 - filename: Filename of u-boot-x86-reset16.bin (default
1047 'u-boot-x86-reset16.bin')
1048
1049x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1050must be placed at a particular address. This entry holds that code. It is
1051typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1052for jumping to the x86-start16 code, which continues execution.
1053
1054For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead.
1055
1056
1057
1058Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot
1059--------------------------------------------------------
1060
1061Properties / Entry arguments:
1062 - filename: Filename of u-boot-x86-reset16.bin (default
1063 'u-boot-x86-reset16.bin')
1064
1065x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1066must be placed at a particular address. This entry holds that code. It is
1067typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1068for jumping to the x86-start16 code, which continues execution.
1069
1070For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead.
1071
1072
1073
1074Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot
1075--------------------------------------------------------
1076
1077Properties / Entry arguments:
1078 - filename: Filename of u-boot-x86-reset16.bin (default
1079 'u-boot-x86-reset16.bin')
1080
1081x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1082must be placed at a particular address. This entry holds that code. It is
1083typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1084for jumping to the x86-start16 code, which continues execution.
1085
1086For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead.
1087
1088
1089
Simon Glass7a61c6b2018-07-17 13:25:37 -06001090Entry: x86-start16: x86 16-bit start-up code for U-Boot
1091-------------------------------------------------------
1092
1093Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06001094 - filename: Filename of u-boot-x86-start16.bin (default
1095 'u-boot-x86-start16.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06001096
1097x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
Simon Glassabab18c2019-08-24 07:22:49 -06001098must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1099entry holds that code. It is typically placed at offset
1100CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1101and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1102U-Boot).
Simon Glass7a61c6b2018-07-17 13:25:37 -06001103
1104For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
1105
1106
1107
1108Entry: x86-start16-spl: x86 16-bit start-up code for SPL
1109--------------------------------------------------------
1110
1111Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06001112 - filename: Filename of spl/u-boot-x86-start16-spl.bin (default
1113 'spl/u-boot-x86-start16-spl.bin')
Simon Glass7a61c6b2018-07-17 13:25:37 -06001114
Simon Glassabab18c2019-08-24 07:22:49 -06001115x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1116must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1117entry holds that code. It is typically placed at offset
1118CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1119and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1120U-Boot).
Simon Glass7a61c6b2018-07-17 13:25:37 -06001121
Simon Glassabab18c2019-08-24 07:22:49 -06001122For 32-bit U-Boot, the 'x86-start16' entry type is used instead.
Simon Glass7a61c6b2018-07-17 13:25:37 -06001123
1124
1125
Simon Glassed40e962018-09-14 04:57:10 -06001126Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
1127--------------------------------------------------------
1128
1129Properties / Entry arguments:
Simon Glassabab18c2019-08-24 07:22:49 -06001130 - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default
1131 'tpl/u-boot-x86-start16-tpl.bin')
Simon Glassed40e962018-09-14 04:57:10 -06001132
Simon Glassabab18c2019-08-24 07:22:49 -06001133x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1134must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1135entry holds that code. It is typically placed at offset
1136CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1137and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1138U-Boot).
Simon Glassed40e962018-09-14 04:57:10 -06001139
Simon Glassabab18c2019-08-24 07:22:49 -06001140If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types
Simon Glassed40e962018-09-14 04:57:10 -06001141may be used instead.
1142
1143
1144