blob: f45f51428ada6aaf182dd1eaf1785824ca27c158 [file] [log] [blame]
Simon Glass5a5da7c2018-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 Glass83d73c22018-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 Glass5a5da7c2018-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 Glass83d73c22018-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.
33
Simon Glass5a5da7c2018-07-17 13:25:37 -060034
35
Simon Glass6ed45ba2018-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
Simon Glass5a5da7c2018-07-17 13:25:37 -060043
44
Simon Glassce867ad2020-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
Simon Glass4f9f1052020-07-09 18:39:38 -060051If the file providing this blob is missing, binman can optionally ignore it
52and produce a broken image with a warning.
53
Simon Glassce867ad2020-07-09 18:39:36 -060054See 'blob' for Properties / Entry arguments.
55
56
57
Simon Glassec127af2018-07-17 13:25:39 -060058Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
59-----------------------------------------------------------------------------------------
60
61Properties / Entry arguments:
62 - <xxx>-path: Filename containing the contents of this entry (optional,
63 defaults to 0)
64
65where <xxx> is the blob_fname argument to the constructor.
66
67This entry cannot be used directly. Instead, it is used as a parent class
68for another entry, which defined blob_fname. This parameter is used to
69set the entry-arg or property containing the filename. The entry-arg or
70property is in turn used to set the actual filename.
71
72See cros_ec_rw for an example of this.
73
74
75
Simon Glassac62fba2019-07-08 13:18:53 -060076Entry: cbfs: Entry containing a Coreboot Filesystem (CBFS)
77----------------------------------------------------------
78
79A CBFS provides a way to group files into a group. It has a simple directory
80structure and allows the position of individual files to be set, since it is
81designed to support execute-in-place in an x86 SPI-flash device. Where XIP
82is not used, it supports compression and storing ELF files.
83
84CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
85
86The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:
87
88 cbfs {
89 size = <0x100000>;
90 u-boot {
91 cbfs-type = "raw";
92 };
93 u-boot-dtb {
94 cbfs-type = "raw";
95 };
96 };
97
98This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
99Note that the size is required since binman does not support calculating it.
100The contents of each entry is just what binman would normally provide if it
101were not a CBFS node. A blob type can be used to import arbitrary files as
102with the second subnode below:
103
104 cbfs {
105 size = <0x100000>;
106 u-boot {
107 cbfs-name = "BOOT";
108 cbfs-type = "raw";
109 };
110
111 dtb {
112 type = "blob";
113 filename = "u-boot.dtb";
114 cbfs-type = "raw";
115 cbfs-compress = "lz4";
Simon Glasse073d4e2019-07-08 13:18:56 -0600116 cbfs-offset = <0x100000>;
Simon Glassac62fba2019-07-08 13:18:53 -0600117 };
118 };
119
120This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
121u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
122
123
124Properties supported in the top-level CBFS node:
125
126cbfs-arch:
127 Defaults to "x86", but you can specify the architecture if needed.
128
129
130Properties supported in the CBFS entry subnodes:
131
132cbfs-name:
133 This is the name of the file created in CBFS. It defaults to the entry
134 name (which is the node name), but you can override it with this
135 property.
136
137cbfs-type:
138 This is the CBFS file type. The following are supported:
139
140 raw:
141 This is a 'raw' file, although compression is supported. It can be
142 used to store any file in CBFS.
143
144 stage:
145 This is an ELF file that has been loaded (i.e. mapped to memory), so
146 appears in the CBFS as a flat binary. The input file must be an ELF
147 image, for example this puts "u-boot" (the ELF image) into a 'stage'
148 entry:
149
150 cbfs {
151 size = <0x100000>;
152 u-boot-elf {
153 cbfs-name = "BOOT";
154 cbfs-type = "stage";
155 };
156 };
157
158 You can use your own ELF file with something like:
159
160 cbfs {
161 size = <0x100000>;
162 something {
163 type = "blob";
164 filename = "cbfs-stage.elf";
165 cbfs-type = "stage";
166 };
167 };
168
169 As mentioned, the file is converted to a flat binary, so it is
170 equivalent to adding "u-boot.bin", for example, but with the load and
171 start addresses specified by the ELF. At present there is no option
172 to add a flat binary with a load/start address, similar to the
173 'add-flat-binary' option in cbfstool.
174
Simon Glasse073d4e2019-07-08 13:18:56 -0600175cbfs-offset:
176 This is the offset of the file's data within the CBFS. It is used to
177 specify where the file should be placed in cases where a fixed position
178 is needed. Typical uses are for code which is not relocatable and must
179 execute in-place from a particular address. This works because SPI flash
180 is generally mapped into memory on x86 devices. The file header is
181 placed before this offset so that the data start lines up exactly with
182 the chosen offset. If this property is not provided, then the file is
183 placed in the next available spot.
Simon Glassac62fba2019-07-08 13:18:53 -0600184
185The current implementation supports only a subset of CBFS features. It does
186not support other file types (e.g. payload), adding multiple files (like the
187'files' entry with a pattern supported by binman), putting files at a
188particular offset in the CBFS and a few other things.
189
190Of course binman can create images containing multiple CBFSs, simply by
191defining these in the binman config:
192
193
194 binman {
195 size = <0x800000>;
196 cbfs {
197 offset = <0x100000>;
198 size = <0x100000>;
199 u-boot {
200 cbfs-type = "raw";
201 };
202 u-boot-dtb {
203 cbfs-type = "raw";
204 };
205 };
206
207 cbfs2 {
208 offset = <0x700000>;
209 size = <0x100000>;
210 u-boot {
211 cbfs-type = "raw";
212 };
213 u-boot-dtb {
214 cbfs-type = "raw";
215 };
216 image {
217 type = "blob";
218 filename = "image.jpg";
219 };
220 };
221 };
222
223This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
224both of size 1MB.
225
226
227
Simon Glassec127af2018-07-17 13:25:39 -0600228Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
229--------------------------------------------------------------------------------
230
231Properties / Entry arguments:
232 - cros-ec-rw-path: Filename containing the EC image
233
234This entry holds a Chromium OS EC (embedded controller) image, for use in
235updating the EC on startup via software sync.
236
237
238
Simon Glass086cec92019-07-08 14:25:27 -0600239Entry: fdtmap: An entry which contains an FDT map
240-------------------------------------------------
241
242Properties / Entry arguments:
243 None
244
245An FDT map is just a header followed by an FDT containing a list of all the
Simon Glass12bb1a92019-07-20 12:23:51 -0600246entries in the image. The root node corresponds to the image node in the
247original FDT, and an image-name property indicates the image name in that
248original tree.
Simon Glass086cec92019-07-08 14:25:27 -0600249
250The header is the string _FDTMAP_ followed by 8 unused bytes.
251
252When used, this entry will be populated with an FDT map which reflects the
253entries in the current image. Hierarchy is preserved, and all offsets and
254sizes are included.
255
256Note that the -u option must be provided to ensure that binman updates the
257FDT with the position of each entry.
258
259Example output for a simple image with U-Boot and an FDT map:
260
261/ {
Simon Glass12bb1a92019-07-20 12:23:51 -0600262 image-name = "binman";
Simon Glass086cec92019-07-08 14:25:27 -0600263 size = <0x00000112>;
264 image-pos = <0x00000000>;
265 offset = <0x00000000>;
266 u-boot {
267 size = <0x00000004>;
268 image-pos = <0x00000000>;
269 offset = <0x00000000>;
270 };
271 fdtmap {
272 size = <0x0000010e>;
273 image-pos = <0x00000004>;
274 offset = <0x00000004>;
275 };
276};
277
Simon Glass12bb1a92019-07-20 12:23:51 -0600278If allow-repack is used then 'orig-offset' and 'orig-size' properties are
279added as necessary. See the binman README.
280
Simon Glass086cec92019-07-08 14:25:27 -0600281
282
Simon Glass0a98b282018-09-14 04:57:28 -0600283Entry: files: Entry containing a set of files
284---------------------------------------------
285
286Properties / Entry arguments:
287 - pattern: Filename pattern to match the files to include
288 - compress: Compression algorithm to use:
289 none: No compression
290 lz4: Use lz4 compression (via 'lz4' command-line utility)
291
292This entry reads a number of files and places each in a separate sub-entry
293within this entry. To access these you need to enable device-tree updates
294at run-time so you can obtain the file positions.
295
296
297
Simon Glass3af8e492018-07-17 13:25:40 -0600298Entry: fill: An entry which is filled to a particular byte value
299----------------------------------------------------------------
300
301Properties / Entry arguments:
302 - fill-byte: Byte to use to fill the entry
303
304Note that the size property must be set since otherwise this entry does not
305know how large it should be.
306
307You can often achieve the same effect using the pad-byte property of the
308overall image, in that the space between entries will then be padded with
309that byte. But this entry is sometimes useful for explicitly setting the
310byte value of a region.
311
312
313
Simon Glass11e36cc2018-07-17 13:25:38 -0600314Entry: fmap: An entry which contains an Fmap section
315----------------------------------------------------
316
317Properties / Entry arguments:
318 None
319
320FMAP is a simple format used by flashrom, an open-source utility for
321reading and writing the SPI flash, typically on x86 CPUs. The format
322provides flashrom with a list of areas, so it knows what it in the flash.
323It can then read or write just a single area, instead of the whole flash.
324
325The format is defined by the flashrom project, in the file lib/fmap.h -
326see www.flashrom.org/Flashrom for more information.
327
328When used, this entry will be populated with an FMAP which reflects the
329entries in the current image. Note that any hierarchy is squashed, since
Simon Glass95a0f3c2019-07-20 12:24:00 -0600330FMAP does not support this. Also, CBFS entries appear as a single entry -
331the sub-entries are ignored.
Simon Glass11e36cc2018-07-17 13:25:38 -0600332
333
334
Simon Glass0ef87aa2018-07-17 13:25:44 -0600335Entry: gbb: An entry which contains a Chromium OS Google Binary Block
336---------------------------------------------------------------------
337
338Properties / Entry arguments:
339 - hardware-id: Hardware ID to use for this build (a string)
340 - keydir: Directory containing the public keys to use
341 - bmpblk: Filename containing images used by recovery
342
343Chromium OS uses a GBB to store various pieces of information, in particular
344the root and recovery keys that are used to verify the boot process. Some
345more details are here:
346
347 https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
348
349but note that the page dates from 2013 so is quite out of date. See
350README.chromium for how to obtain the required keys and tools.
351
352
353
Simon Glasscf228942019-07-08 14:25:28 -0600354Entry: image-header: An entry which contains a pointer to the FDT map
355---------------------------------------------------------------------
356
357Properties / Entry arguments:
358 location: Location of header ("start" or "end" of image). This is
359 optional. If omitted then the entry must have an offset property.
360
361This adds an 8-byte entry to the start or end of the image, pointing to the
362location of the FDT map. The format is a magic number followed by an offset
363from the start or end of the image, in twos-compliment format.
364
365This entry must be in the top-level part of the image.
366
367NOTE: If the location is at the start/end, you will probably need to specify
368sort-by-offset for the image, unless you actually put the image header
369first/last in the entry list.
370
371
372
Simon Glass5a5da7c2018-07-17 13:25:37 -0600373Entry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
374-------------------------------------------------------------------------
375
376Properties / Entry arguments:
377 - filename: Filename of file to read into entry
378
379This file contains microcode for some devices in a special format. An
380example filename is 'Microcode/C0_22211.BIN'.
381
382See README.x86 for information about x86 binary blobs.
383
384
385
386Entry: intel-descriptor: Intel flash descriptor block (4KB)
387-----------------------------------------------------------
388
389Properties / Entry arguments:
390 filename: Filename of file containing the descriptor. This is typically
391 a 4KB binary file, sometimes called 'descriptor.bin'
392
393This entry is placed at the start of flash and provides information about
394the SPI flash regions. In particular it provides the base address and
395size of the ME (Management Engine) region, allowing us to place the ME
396binary in the right place.
397
398With this entry in your image, the position of the 'intel-me' entry will be
399fixed in the image, which avoids you needed to specify an offset for that
400region. This is useful, because it is not possible to change the position
401of the ME region without updating the descriptor.
402
403See README.x86 for information about x86 binary blobs.
404
405
406
Simon Glass5af12072019-08-24 07:22:50 -0600407Entry: intel-fit: Intel Firmware Image Table (FIT)
408--------------------------------------------------
409
410This entry contains a dummy FIT as required by recent Intel CPUs. The FIT
411contains information about the firmware and microcode available in the
412image.
413
414At present binman only supports a basic FIT with no microcode.
415
416
417
418Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer
419--------------------------------------------------------------
420
421This entry contains a pointer to the FIT. It is required to be at address
4220xffffffc0 in the image.
423
424
425
Simon Glass5a5da7c2018-07-17 13:25:37 -0600426Entry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
427-------------------------------------------------------------------------------
428
429Properties / Entry arguments:
430 - filename: Filename of file to read into entry
431
432This file contains binary blobs which are used on some devices to make the
433platform work. U-Boot executes this code since it is not possible to set up
434the hardware using U-Boot open-source code. Documentation is typically not
435available in sufficient detail to allow this.
436
437An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
438
439See README.x86 for information about x86 binary blobs.
440
441
442
Simon Glassea0fff92019-08-24 07:23:07 -0600443Entry: intel-fsp-m: Entry containing Intel Firmware Support Package (FSP) memory init
444-------------------------------------------------------------------------------------
445
446Properties / Entry arguments:
447 - filename: Filename of file to read into entry
448
449This file contains a binary blob which is used on some devices to set up
450SDRAM. U-Boot executes this code in SPL so that it can make full use of
451memory. Documentation is typically not available in sufficient detail to
452allow U-Boot do this this itself..
453
454An example filename is 'fsp_m.bin'
455
456See README.x86 for information about x86 binary blobs.
457
458
459
Simon Glassbc6a88f2019-10-20 21:31:35 -0600460Entry: intel-fsp-s: Entry containing Intel Firmware Support Package (FSP) silicon init
461--------------------------------------------------------------------------------------
462
463Properties / Entry arguments:
464 - filename: Filename of file to read into entry
465
466This file contains a binary blob which is used on some devices to set up
467the silicon. U-Boot executes this code in U-Boot proper after SDRAM is
468running, so that it can make full use of memory. Documentation is typically
469not available in sufficient detail to allow U-Boot do this this itself.
470
471An example filename is 'fsp_s.bin'
472
473See README.x86 for information about x86 binary blobs.
474
475
476
Simon Glass998d1482019-10-20 21:31:36 -0600477Entry: intel-fsp-t: Entry containing Intel Firmware Support Package (FSP) temp ram init
478---------------------------------------------------------------------------------------
479
480Properties / Entry arguments:
481 - filename: Filename of file to read into entry
482
483This file contains a binary blob which is used on some devices to set up
484temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so
485that it has access to memory for its stack and initial storage.
486
487An example filename is 'fsp_t.bin'
488
489See README.x86 for information about x86 binary blobs.
490
491
492
Simon Glasse073d4e2019-07-08 13:18:56 -0600493Entry: intel-ifwi: Entry containing an Intel Integrated Firmware Image (IFWI) file
494----------------------------------------------------------------------------------
495
496Properties / Entry arguments:
497 - filename: Filename of file to read into entry. This is either the
498 IFWI file itself, or a file that can be converted into one using a
499 tool
500 - convert-fit: If present this indicates that the ifwitool should be
501 used to convert the provided file into a IFWI.
502
503This file contains code and data used by the SoC that is required to make
504it work. It includes U-Boot TPL, microcode, things related to the CSE
505(Converged Security Engine, the microcontroller that loads all the firmware)
506and other items beyond the wit of man.
507
508A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a
509file that will be converted to an IFWI.
510
511The position of this entry is generally set by the intel-descriptor entry.
512
513The contents of the IFWI are specified by the subnodes of the IFWI node.
514Each subnode describes an entry which is placed into the IFWFI with a given
515sub-partition (and optional entry name).
516
Simon Glass3da9ce82019-08-24 07:22:47 -0600517Properties for subnodes:
518 ifwi-subpart - sub-parition to put this entry into, e.g. "IBBP"
519 ifwi-entry - entry name t use, e.g. "IBBL"
520 ifwi-replace - if present, indicates that the item should be replaced
521 in the IFWI. Otherwise it is added.
522
Simon Glasse073d4e2019-07-08 13:18:56 -0600523See README.x86 for information about x86 binary blobs.
524
525
526
Simon Glass5a5da7c2018-07-17 13:25:37 -0600527Entry: intel-me: Entry containing an Intel Management Engine (ME) file
528----------------------------------------------------------------------
529
530Properties / Entry arguments:
531 - filename: Filename of file to read into entry
532
533This file contains code used by the SoC that is required to make it work.
534The Management Engine is like a background task that runs things that are
Thomas Hebb32f2ca22019-11-13 18:18:03 -0800535not clearly documented, but may include keyboard, display and network
Simon Glass5a5da7c2018-07-17 13:25:37 -0600536access. For platform that use ME it is not possible to disable it. U-Boot
537does not directly execute code in the ME binary.
538
539A typical filename is 'me.bin'.
540
Simon Glassfa1c9372019-07-08 13:18:38 -0600541The position of this entry is generally set by the intel-descriptor entry.
542
Simon Glass5a5da7c2018-07-17 13:25:37 -0600543See README.x86 for information about x86 binary blobs.
544
545
546
547Entry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
548----------------------------------------------------------------------------
549
550Properties / Entry arguments:
551 - filename: Filename of file to read into entry
552
553This file contains code for setting up the SDRAM on some Intel systems. This
554is executed by U-Boot when needed early during startup. A typical filename
555is 'mrc.bin'.
556
557See README.x86 for information about x86 binary blobs.
558
559
560
Simon Glass5385f5a2019-05-17 22:00:53 -0600561Entry: intel-refcode: Entry containing an Intel Reference Code file
562-------------------------------------------------------------------
563
564Properties / Entry arguments:
565 - filename: Filename of file to read into entry
566
567This file contains code for setting up the platform on some Intel systems.
568This is executed by U-Boot when needed early during startup. A typical
569filename is 'refcode.bin'.
570
571See README.x86 for information about x86 binary blobs.
572
573
574
Simon Glass5a5da7c2018-07-17 13:25:37 -0600575Entry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
576-----------------------------------------------------------------------
577
578Properties / Entry arguments:
579 - filename: Filename of file to read into entry
580
581This file contains code that sets up the integrated graphics subsystem on
582some Intel SoCs. U-Boot executes this when the display is started up.
583
584See README.x86 for information about Intel binary blobs.
585
586
587
588Entry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
589-----------------------------------------------------------------------------
590
591Properties / Entry arguments:
592 - filename: Filename of file to read into entry
593
594This file contains code that sets up the integrated graphics subsystem on
595some Intel SoCs. U-Boot executes this when the display is started up.
596
597This is similar to the VBT file but in a different format.
598
599See README.x86 for information about Intel binary blobs.
600
601
602
Simon Glass0dc706f2020-07-09 18:39:31 -0600603Entry: mkimage: Entry containing a binary produced by mkimage
604-------------------------------------------------------------
605
606Properties / Entry arguments:
607 - datafile: Filename for -d argument
608 - args: Other arguments to pass
609
610The data passed to mkimage is collected from subnodes of the mkimage node,
611e.g.:
612
613 mkimage {
614 args = "-n test -T imximage";
615
616 u-boot-spl {
617 };
618 };
619
620This calls mkimage to create an imximage with u-boot-spl.bin as the input
621file. The output from mkimage then becomes part of the image produced by
622binman.
623
624
625
Jagdish Gediya9d368f32018-09-03 21:35:08 +0530626Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
627-----------------------------------------------------------------------------------------
628
629Properties / Entry arguments:
630 - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
631
Thomas Hebb32f2ca22019-11-13 18:18:03 -0800632This entry is valid for PowerPC mpc85xx cpus. This entry holds
Jagdish Gediya9d368f32018-09-03 21:35:08 +0530633'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
634placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
635
636
637
Simon Glass5a5da7c2018-07-17 13:25:37 -0600638Entry: section: Entry that contains other entries
639-------------------------------------------------
640
641Properties / Entry arguments: (see binman README for more information)
Simon Glass8beb11e2019-07-08 14:25:47 -0600642 pad-byte: Pad byte to use when padding
643 sort-by-offset: True if entries should be sorted by offset, False if
644 they must be in-order in the device tree description
645 end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
646 skip-at-start: Number of bytes before the first entry starts. These
647 effectively adjust the starting offset of entries. For example,
648 if this is 16, then the first entry would start at 16. An entry
649 with offset = 20 would in fact be written at offset 4 in the image
650 file, since the first 16 bytes are skipped when writing.
651 name-prefix: Adds a prefix to the name of every entry in the section
Simon Glass5a5da7c2018-07-17 13:25:37 -0600652 when writing out the map
653
Simon Glass8beb11e2019-07-08 14:25:47 -0600654Since a section is also an entry, it inherits all the properies of entries
655too.
656
Simon Glass5a5da7c2018-07-17 13:25:37 -0600657A section is an entry which can contain other entries, thus allowing
658hierarchical images to be created. See 'Sections and hierarchical images'
659in the binman README for more information.
660
661
662
663Entry: text: An entry which contains text
664-----------------------------------------
665
666The text can be provided either in the node itself or by a command-line
667argument. There is a level of indirection to allow multiple text strings
668and sharing of text.
669
670Properties / Entry arguments:
671 text-label: The value of this string indicates the property / entry-arg
672 that contains the string to place in the entry
673 <xxx> (actual name is the value of text-label): contains the string to
674 place in the entry.
Simon Glassaa88b502019-07-08 13:18:40 -0600675 <text>: The text to place in the entry (overrides the above mechanism).
676 This is useful when the text is constant.
Simon Glass5a5da7c2018-07-17 13:25:37 -0600677
678Example node:
679
680 text {
681 size = <50>;
682 text-label = "message";
683 };
684
685You can then use:
686
687 binman -amessage="this is my message"
688
689and binman will insert that string into the entry.
690
691It is also possible to put the string directly in the node:
692
693 text {
694 size = <8>;
695 text-label = "message";
696 message = "a message directly in the node"
697 };
698
Simon Glassaa88b502019-07-08 13:18:40 -0600699or just:
700
701 text {
702 size = <8>;
703 text = "some text directly in the node"
704 };
705
Simon Glass5a5da7c2018-07-17 13:25:37 -0600706The text is not itself nul-terminated. This can be achieved, if required,
707by setting the size of the entry to something larger than the text.
708
709
710
711Entry: u-boot: U-Boot flat binary
712---------------------------------
713
714Properties / Entry arguments:
715 - filename: Filename of u-boot.bin (default 'u-boot.bin')
716
717This is the U-Boot binary, containing relocation information to allow it
718to relocate itself at runtime. The binary typically includes a device tree
719blob at the end of it. Use u_boot_nodtb if you want to package the device
720tree separately.
721
722U-Boot can access binman symbols at runtime. See:
723
724 'Access to binman entry offsets at run time (fdt)'
725
726in the binman README for more information.
727
728
729
730Entry: u-boot-dtb: U-Boot device tree
731-------------------------------------
732
733Properties / Entry arguments:
734 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
735
736This is the U-Boot device tree, containing configuration information for
737U-Boot. U-Boot needs this to know what devices are present and which drivers
738to activate.
739
Simon Glass6ed45ba2018-09-14 04:57:24 -0600740Note: This is mostly an internal entry type, used by others. This allows
741binman to know which entries contain a device tree.
742
Simon Glass5a5da7c2018-07-17 13:25:37 -0600743
744
745Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
746-----------------------------------------------------------------------------------
747
748Properties / Entry arguments:
749 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
750
751See Entry_u_boot_ucode for full details of the three entries involved in
752this process. This entry provides the U-Boot device-tree file, which
753contains the microcode. If the microcode is not being collated into one
754place then the offset and size of the microcode is recorded by this entry,
755for use by u_boot_with_ucode_ptr. If it is being collated, then this
756entry deletes the microcode from the device tree (to save space) and makes
757it available to u_boot_ucode.
758
759
760
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600761Entry: u-boot-elf: U-Boot ELF image
762-----------------------------------
763
764Properties / Entry arguments:
765 - filename: Filename of u-boot (default 'u-boot')
766
767This is the U-Boot ELF image. It does not include a device tree but can be
768relocated to any address for execution.
769
770
771
Simon Glass5a5da7c2018-07-17 13:25:37 -0600772Entry: u-boot-img: U-Boot legacy image
773--------------------------------------
774
775Properties / Entry arguments:
776 - filename: Filename of u-boot.img (default 'u-boot.img')
777
778This is the U-Boot binary as a packaged image, in legacy format. It has a
779header which allows it to be loaded at the correct address for execution.
780
781You should use FIT (Flat Image Tree) instead of the legacy image for new
782applications.
783
784
785
786Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
787--------------------------------------------------------------------
788
789Properties / Entry arguments:
790 - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
791
792This is the U-Boot binary, containing relocation information to allow it
793to relocate itself at runtime. It does not include a device tree blob at
794the end of it so normally cannot work without it. You can add a u_boot_dtb
795entry after this one, or use a u_boot entry instead (which contains both
796U-Boot and the device tree).
797
798
799
800Entry: u-boot-spl: U-Boot SPL binary
801------------------------------------
802
803Properties / Entry arguments:
804 - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
805
806This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
807binary which loads before U-Boot proper, typically into on-chip SRAM. It is
808responsible for locating, loading and jumping to U-Boot. Note that SPL is
809not relocatable so must be loaded to the correct address in SRAM, or written
Simon Glassb8ef5b62018-07-17 13:25:48 -0600810to run from the correct address if direct flash execution is possible (e.g.
Simon Glass5a5da7c2018-07-17 13:25:37 -0600811on x86 devices).
812
813SPL can access binman symbols at runtime. See:
814
815 'Access to binman entry offsets at run time (symbols)'
816
817in the binman README for more information.
818
819The ELF file 'spl/u-boot-spl' must also be available for this to work, since
820binman uses that to look up symbols to write into the SPL binary.
821
822
823
824Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
825---------------------------------------------------------------------
826
827Properties / Entry arguments:
828 None
829
830This is similar to u_boot_spl except that padding is added after the SPL
831binary to cover the BSS (Block Started by Symbol) region. This region holds
832the various used by SPL. It is set to 0 by SPL when it starts up. If you
833want to append data to the SPL image (such as a device tree file), you must
834pad out the BSS region to avoid the data overlapping with U-Boot variables.
835This entry is useful in that case. It automatically pads out the entry size
836to cover both the code, data and BSS.
837
838The ELF file 'spl/u-boot-spl' must also be available for this to work, since
839binman uses that to look up the BSS address.
840
841
842
843Entry: u-boot-spl-dtb: U-Boot SPL device tree
844---------------------------------------------
845
846Properties / Entry arguments:
847 - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
848
849This is the SPL device tree, containing configuration information for
850SPL. SPL needs this to know what devices are present and which drivers
851to activate.
852
853
854
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600855Entry: u-boot-spl-elf: U-Boot SPL ELF image
856-------------------------------------------
857
858Properties / Entry arguments:
Simon Glassa6a520e2019-07-08 13:18:45 -0600859 - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600860
861This is the U-Boot SPL ELF image. It does not include a device tree but can
862be relocated to any address for execution.
863
864
865
Simon Glass5a5da7c2018-07-17 13:25:37 -0600866Entry: u-boot-spl-nodtb: SPL binary without device tree appended
867----------------------------------------------------------------
868
869Properties / Entry arguments:
870 - filename: Filename of spl/u-boot-spl-nodtb.bin (default
871 'spl/u-boot-spl-nodtb.bin')
872
873This is the U-Boot SPL binary, It does not include a device tree blob at
874the end of it so may not be able to work without it, assuming SPL needs
875a device tree to operation on your platform. You can add a u_boot_spl_dtb
876entry after this one, or use a u_boot_spl entry instead (which contains
877both SPL and the device tree).
878
879
880
881Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
882----------------------------------------------------------------------------
883
Simon Glassf0253632018-09-14 04:57:32 -0600884This is used when SPL must set up the microcode for U-Boot.
885
Simon Glass5a5da7c2018-07-17 13:25:37 -0600886See Entry_u_boot_ucode for full details of the entries involved in this
887process.
888
889
890
Simon Glassb8ef5b62018-07-17 13:25:48 -0600891Entry: u-boot-tpl: U-Boot TPL binary
892------------------------------------
893
894Properties / Entry arguments:
895 - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
896
897This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
898binary which loads before SPL, typically into on-chip SRAM. It is
899responsible for locating, loading and jumping to SPL, the next-stage
900loader. Note that SPL is not relocatable so must be loaded to the correct
901address in SRAM, or written to run from the correct address if direct
902flash execution is possible (e.g. on x86 devices).
903
904SPL can access binman symbols at runtime. See:
905
906 'Access to binman entry offsets at run time (symbols)'
907
908in the binman README for more information.
909
910The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
911binman uses that to look up symbols to write into the TPL binary.
912
913
914
915Entry: u-boot-tpl-dtb: U-Boot TPL device tree
916---------------------------------------------
917
918Properties / Entry arguments:
919 - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
920
921This is the TPL device tree, containing configuration information for
922TPL. TPL needs this to know what devices are present and which drivers
923to activate.
924
925
926
Simon Glassf0253632018-09-14 04:57:32 -0600927Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
928----------------------------------------------------------------------------
929
930This is used when TPL must set up the microcode for U-Boot.
931
932See Entry_u_boot_ucode for full details of the entries involved in this
933process.
934
935
936
Simon Glass4c650252019-07-08 13:18:46 -0600937Entry: u-boot-tpl-elf: U-Boot TPL ELF image
938-------------------------------------------
939
940Properties / Entry arguments:
941 - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
942
943This is the U-Boot TPL ELF image. It does not include a device tree but can
944be relocated to any address for execution.
945
946
947
Simon Glassf0253632018-09-14 04:57:32 -0600948Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
949----------------------------------------------------------------------------
950
951See Entry_u_boot_ucode for full details of the entries involved in this
952process.
953
954
955
Simon Glass5a5da7c2018-07-17 13:25:37 -0600956Entry: u-boot-ucode: U-Boot microcode block
957-------------------------------------------
958
959Properties / Entry arguments:
960 None
961
962The contents of this entry are filled in automatically by other entries
963which must also be in the image.
964
965U-Boot on x86 needs a single block of microcode. This is collected from
966the various microcode update nodes in the device tree. It is also unable
967to read the microcode from the device tree on platforms that use FSP
968(Firmware Support Package) binaries, because the API requires that the
969microcode is supplied before there is any SRAM available to use (i.e.
970the FSP sets up the SRAM / cache-as-RAM but does so in the call that
971requires the microcode!). To keep things simple, all x86 platforms handle
972microcode the same way in U-Boot (even non-FSP platforms). This is that
973a table is placed at _dt_ucode_base_size containing the base address and
974size of the microcode. This is either passed to the FSP (for FSP
975platforms), or used to set up the microcode (for non-FSP platforms).
976This all happens in the build system since it is the only way to get
977the microcode into a single blob and accessible without SRAM.
978
979There are two cases to handle. If there is only one microcode blob in
980the device tree, then the ucode pointer it set to point to that. This
981entry (u-boot-ucode) is empty. If there is more than one update, then
982this entry holds the concatenation of all updates, and the device tree
983entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
984last step ensures that that the microcode appears in one contiguous
985block in the image and is not unnecessarily duplicated in the device
986tree. It is referred to as 'collation' here.
987
988Entry types that have a part to play in handling microcode:
989
990 Entry_u_boot_with_ucode_ptr:
991 Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
992 It updates it with the address and size of the microcode so that
993 U-Boot can find it early on start-up.
994 Entry_u_boot_dtb_with_ucode:
995 Contains u-boot.dtb. It stores the microcode in a
996 'self.ucode_data' property, which is then read by this class to
997 obtain the microcode if needed. If collation is performed, it
998 removes the microcode from the device tree.
999 Entry_u_boot_ucode:
1000 This class. If collation is enabled it reads the microcode from
1001 the Entry_u_boot_dtb_with_ucode entry, and uses it as the
1002 contents of this entry.
1003
1004
1005
1006Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
1007--------------------------------------------------------------------
1008
1009Properties / Entry arguments:
Masahiro Yamadaf6a8c0f2019-12-14 13:47:26 +09001010 - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin')
Simon Glassf0693032018-09-14 04:57:07 -06001011 - optional-ucode: boolean property to make microcode optional. If the
1012 u-boot.bin image does not include microcode, no error will
1013 be generated.
Simon Glass5a5da7c2018-07-17 13:25:37 -06001014
1015See Entry_u_boot_ucode for full details of the three entries involved in
1016this process. This entry updates U-Boot with the offset and size of the
1017microcode, to allow early x86 boot code to find it without doing anything
1018complicated. Otherwise it is the same as the u_boot entry.
1019
1020
1021
Simon Glass24d0d3c2018-07-17 13:25:47 -06001022Entry: vblock: An entry which contains a Chromium OS verified boot block
1023------------------------------------------------------------------------
1024
1025Properties / Entry arguments:
Simon Glass5385f5a2019-05-17 22:00:53 -06001026 - content: List of phandles to entries to sign
Simon Glass24d0d3c2018-07-17 13:25:47 -06001027 - keydir: Directory containing the public keys to use
1028 - keyblock: Name of the key file to use (inside keydir)
1029 - signprivate: Name of provide key file to use (inside keydir)
1030 - version: Version number of the vblock (typically 1)
1031 - kernelkey: Name of the kernel key to use (inside keydir)
1032 - preamble-flags: Value of the vboot preamble flags (typically 0)
1033
Simon Glassa326b492018-09-14 04:57:11 -06001034Output files:
1035 - input.<unique_name> - input file passed to futility
1036 - vblock.<unique_name> - output file generated by futility (which is
1037 used as the entry contents)
1038
Jagdish Gediya9d368f32018-09-03 21:35:08 +05301039Chromium OS signs the read-write firmware and kernel, writing the signature
Simon Glass24d0d3c2018-07-17 13:25:47 -06001040in this block. This allows U-Boot to verify that the next firmware stage
1041and kernel are genuine.
1042
1043
1044
Simon Glass2250ee62019-08-24 07:22:48 -06001045Entry: x86-reset16: x86 16-bit reset code for U-Boot
1046----------------------------------------------------
1047
1048Properties / Entry arguments:
1049 - filename: Filename of u-boot-x86-reset16.bin (default
1050 'u-boot-x86-reset16.bin')
1051
1052x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1053must be placed at a particular address. This entry holds that code. It is
1054typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1055for jumping to the x86-start16 code, which continues execution.
1056
1057For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead.
1058
1059
1060
1061Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot
1062--------------------------------------------------------
1063
1064Properties / Entry arguments:
1065 - filename: Filename of u-boot-x86-reset16.bin (default
1066 'u-boot-x86-reset16.bin')
1067
1068x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1069must be placed at a particular address. This entry holds that code. It is
1070typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1071for jumping to the x86-start16 code, which continues execution.
1072
1073For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead.
1074
1075
1076
1077Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot
1078--------------------------------------------------------
1079
1080Properties / Entry arguments:
1081 - filename: Filename of u-boot-x86-reset16.bin (default
1082 'u-boot-x86-reset16.bin')
1083
1084x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1085must be placed at a particular address. This entry holds that code. It is
1086typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
1087for jumping to the x86-start16 code, which continues execution.
1088
1089For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead.
1090
1091
1092
Simon Glass5a5da7c2018-07-17 13:25:37 -06001093Entry: x86-start16: x86 16-bit start-up code for U-Boot
1094-------------------------------------------------------
1095
1096Properties / Entry arguments:
Simon Glass5e239182019-08-24 07:22:49 -06001097 - filename: Filename of u-boot-x86-start16.bin (default
1098 'u-boot-x86-start16.bin')
Simon Glass5a5da7c2018-07-17 13:25:37 -06001099
1100x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
Simon Glass5e239182019-08-24 07:22:49 -06001101must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1102entry holds that code. It is typically placed at offset
1103CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1104and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1105U-Boot).
Simon Glass5a5da7c2018-07-17 13:25:37 -06001106
1107For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
1108
1109
1110
1111Entry: x86-start16-spl: x86 16-bit start-up code for SPL
1112--------------------------------------------------------
1113
1114Properties / Entry arguments:
Simon Glass5e239182019-08-24 07:22:49 -06001115 - filename: Filename of spl/u-boot-x86-start16-spl.bin (default
1116 'spl/u-boot-x86-start16-spl.bin')
Simon Glass5a5da7c2018-07-17 13:25:37 -06001117
Simon Glass5e239182019-08-24 07:22:49 -06001118x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1119must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1120entry holds that code. It is typically placed at offset
1121CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1122and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1123U-Boot).
Simon Glass5a5da7c2018-07-17 13:25:37 -06001124
Simon Glass5e239182019-08-24 07:22:49 -06001125For 32-bit U-Boot, the 'x86-start16' entry type is used instead.
Simon Glass5a5da7c2018-07-17 13:25:37 -06001126
1127
1128
Simon Glass35b384c2018-09-14 04:57:10 -06001129Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
1130--------------------------------------------------------
1131
1132Properties / Entry arguments:
Simon Glass5e239182019-08-24 07:22:49 -06001133 - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default
1134 'tpl/u-boot-x86-start16-tpl.bin')
Simon Glass35b384c2018-09-14 04:57:10 -06001135
Simon Glass5e239182019-08-24 07:22:49 -06001136x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
1137must be placed in the top 64KB of the ROM. The reset code jumps to it. This
1138entry holds that code. It is typically placed at offset
1139CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
1140and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
1141U-Boot).
Simon Glass35b384c2018-09-14 04:57:10 -06001142
Simon Glass5e239182019-08-24 07:22:49 -06001143If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types
Simon Glass35b384c2018-09-14 04:57:10 -06001144may be used instead.
1145
1146
1147