README.entries 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111
  1. Binman Entry Documentation
  2. ===========================
  3. This file describes the entry types supported by binman. These entry types can
  4. be placed in an image one by one to build up a final firmware image. It is
  5. fairly easy to create new entry types. Just add a new file to the 'etype'
  6. directory. You can use the existing entries as examples.
  7. Note that some entries are subclasses of others, using and extending their
  8. features to produce new behaviours.
  9. Entry: blob: Entry containing an arbitrary binary blob
  10. ------------------------------------------------------
  11. Note: This should not be used by itself. It is normally used as a parent
  12. class by other entry types.
  13. Properties / Entry arguments:
  14. - filename: Filename of file to read into entry
  15. - compress: Compression algorithm to use:
  16. none: No compression
  17. lz4: Use lz4 compression (via 'lz4' command-line utility)
  18. This entry reads data from a file and places it in the entry. The
  19. default filename is often specified specified by the subclass. See for
  20. example the 'u_boot' entry which provides the filename 'u-boot.bin'.
  21. If compression is enabled, an extra 'uncomp-size' property is written to
  22. the node (if enabled with -u) which provides the uncompressed size of the
  23. data.
  24. Entry: blob-dtb: A blob that holds a device tree
  25. ------------------------------------------------
  26. This is a blob containing a device tree. The contents of the blob are
  27. obtained from the list of available device-tree files, managed by the
  28. 'state' module.
  29. Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
  30. -----------------------------------------------------------------------------------------
  31. Properties / Entry arguments:
  32. - <xxx>-path: Filename containing the contents of this entry (optional,
  33. defaults to 0)
  34. where <xxx> is the blob_fname argument to the constructor.
  35. This entry cannot be used directly. Instead, it is used as a parent class
  36. for another entry, which defined blob_fname. This parameter is used to
  37. set the entry-arg or property containing the filename. The entry-arg or
  38. property is in turn used to set the actual filename.
  39. See cros_ec_rw for an example of this.
  40. Entry: cbfs: Entry containing a Coreboot Filesystem (CBFS)
  41. ----------------------------------------------------------
  42. A CBFS provides a way to group files into a group. It has a simple directory
  43. structure and allows the position of individual files to be set, since it is
  44. designed to support execute-in-place in an x86 SPI-flash device. Where XIP
  45. is not used, it supports compression and storing ELF files.
  46. CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
  47. The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:
  48. cbfs {
  49. size = <0x100000>;
  50. u-boot {
  51. cbfs-type = "raw";
  52. };
  53. u-boot-dtb {
  54. cbfs-type = "raw";
  55. };
  56. };
  57. This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
  58. Note that the size is required since binman does not support calculating it.
  59. The contents of each entry is just what binman would normally provide if it
  60. were not a CBFS node. A blob type can be used to import arbitrary files as
  61. with the second subnode below:
  62. cbfs {
  63. size = <0x100000>;
  64. u-boot {
  65. cbfs-name = "BOOT";
  66. cbfs-type = "raw";
  67. };
  68. dtb {
  69. type = "blob";
  70. filename = "u-boot.dtb";
  71. cbfs-type = "raw";
  72. cbfs-compress = "lz4";
  73. cbfs-offset = <0x100000>;
  74. };
  75. };
  76. This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
  77. u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
  78. Properties supported in the top-level CBFS node:
  79. cbfs-arch:
  80. Defaults to "x86", but you can specify the architecture if needed.
  81. Properties supported in the CBFS entry subnodes:
  82. cbfs-name:
  83. This is the name of the file created in CBFS. It defaults to the entry
  84. name (which is the node name), but you can override it with this
  85. property.
  86. cbfs-type:
  87. This is the CBFS file type. The following are supported:
  88. raw:
  89. This is a 'raw' file, although compression is supported. It can be
  90. used to store any file in CBFS.
  91. stage:
  92. This is an ELF file that has been loaded (i.e. mapped to memory), so
  93. appears in the CBFS as a flat binary. The input file must be an ELF
  94. image, for example this puts "u-boot" (the ELF image) into a 'stage'
  95. entry:
  96. cbfs {
  97. size = <0x100000>;
  98. u-boot-elf {
  99. cbfs-name = "BOOT";
  100. cbfs-type = "stage";
  101. };
  102. };
  103. You can use your own ELF file with something like:
  104. cbfs {
  105. size = <0x100000>;
  106. something {
  107. type = "blob";
  108. filename = "cbfs-stage.elf";
  109. cbfs-type = "stage";
  110. };
  111. };
  112. As mentioned, the file is converted to a flat binary, so it is
  113. equivalent to adding "u-boot.bin", for example, but with the load and
  114. start addresses specified by the ELF. At present there is no option
  115. to add a flat binary with a load/start address, similar to the
  116. 'add-flat-binary' option in cbfstool.
  117. cbfs-offset:
  118. This is the offset of the file's data within the CBFS. It is used to
  119. specify where the file should be placed in cases where a fixed position
  120. is needed. Typical uses are for code which is not relocatable and must
  121. execute in-place from a particular address. This works because SPI flash
  122. is generally mapped into memory on x86 devices. The file header is
  123. placed before this offset so that the data start lines up exactly with
  124. the chosen offset. If this property is not provided, then the file is
  125. placed in the next available spot.
  126. The current implementation supports only a subset of CBFS features. It does
  127. not support other file types (e.g. payload), adding multiple files (like the
  128. 'files' entry with a pattern supported by binman), putting files at a
  129. particular offset in the CBFS and a few other things.
  130. Of course binman can create images containing multiple CBFSs, simply by
  131. defining these in the binman config:
  132. binman {
  133. size = <0x800000>;
  134. cbfs {
  135. offset = <0x100000>;
  136. size = <0x100000>;
  137. u-boot {
  138. cbfs-type = "raw";
  139. };
  140. u-boot-dtb {
  141. cbfs-type = "raw";
  142. };
  143. };
  144. cbfs2 {
  145. offset = <0x700000>;
  146. size = <0x100000>;
  147. u-boot {
  148. cbfs-type = "raw";
  149. };
  150. u-boot-dtb {
  151. cbfs-type = "raw";
  152. };
  153. image {
  154. type = "blob";
  155. filename = "image.jpg";
  156. };
  157. };
  158. };
  159. This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
  160. both of size 1MB.
  161. Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
  162. --------------------------------------------------------------------------------
  163. Properties / Entry arguments:
  164. - cros-ec-rw-path: Filename containing the EC image
  165. This entry holds a Chromium OS EC (embedded controller) image, for use in
  166. updating the EC on startup via software sync.
  167. Entry: fdtmap: An entry which contains an FDT map
  168. -------------------------------------------------
  169. Properties / Entry arguments:
  170. None
  171. An FDT map is just a header followed by an FDT containing a list of all the
  172. entries in the image. The root node corresponds to the image node in the
  173. original FDT, and an image-name property indicates the image name in that
  174. original tree.
  175. The header is the string _FDTMAP_ followed by 8 unused bytes.
  176. When used, this entry will be populated with an FDT map which reflects the
  177. entries in the current image. Hierarchy is preserved, and all offsets and
  178. sizes are included.
  179. Note that the -u option must be provided to ensure that binman updates the
  180. FDT with the position of each entry.
  181. Example output for a simple image with U-Boot and an FDT map:
  182. / {
  183. image-name = "binman";
  184. size = <0x00000112>;
  185. image-pos = <0x00000000>;
  186. offset = <0x00000000>;
  187. u-boot {
  188. size = <0x00000004>;
  189. image-pos = <0x00000000>;
  190. offset = <0x00000000>;
  191. };
  192. fdtmap {
  193. size = <0x0000010e>;
  194. image-pos = <0x00000004>;
  195. offset = <0x00000004>;
  196. };
  197. };
  198. If allow-repack is used then 'orig-offset' and 'orig-size' properties are
  199. added as necessary. See the binman README.
  200. Entry: files: Entry containing a set of files
  201. ---------------------------------------------
  202. Properties / Entry arguments:
  203. - pattern: Filename pattern to match the files to include
  204. - compress: Compression algorithm to use:
  205. none: No compression
  206. lz4: Use lz4 compression (via 'lz4' command-line utility)
  207. This entry reads a number of files and places each in a separate sub-entry
  208. within this entry. To access these you need to enable device-tree updates
  209. at run-time so you can obtain the file positions.
  210. Entry: fill: An entry which is filled to a particular byte value
  211. ----------------------------------------------------------------
  212. Properties / Entry arguments:
  213. - fill-byte: Byte to use to fill the entry
  214. Note that the size property must be set since otherwise this entry does not
  215. know how large it should be.
  216. You can often achieve the same effect using the pad-byte property of the
  217. overall image, in that the space between entries will then be padded with
  218. that byte. But this entry is sometimes useful for explicitly setting the
  219. byte value of a region.
  220. Entry: fmap: An entry which contains an Fmap section
  221. ----------------------------------------------------
  222. Properties / Entry arguments:
  223. None
  224. FMAP is a simple format used by flashrom, an open-source utility for
  225. reading and writing the SPI flash, typically on x86 CPUs. The format
  226. provides flashrom with a list of areas, so it knows what it in the flash.
  227. It can then read or write just a single area, instead of the whole flash.
  228. The format is defined by the flashrom project, in the file lib/fmap.h -
  229. see www.flashrom.org/Flashrom for more information.
  230. When used, this entry will be populated with an FMAP which reflects the
  231. entries in the current image. Note that any hierarchy is squashed, since
  232. FMAP does not support this. Also, CBFS entries appear as a single entry -
  233. the sub-entries are ignored.
  234. Entry: gbb: An entry which contains a Chromium OS Google Binary Block
  235. ---------------------------------------------------------------------
  236. Properties / Entry arguments:
  237. - hardware-id: Hardware ID to use for this build (a string)
  238. - keydir: Directory containing the public keys to use
  239. - bmpblk: Filename containing images used by recovery
  240. Chromium OS uses a GBB to store various pieces of information, in particular
  241. the root and recovery keys that are used to verify the boot process. Some
  242. more details are here:
  243. https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
  244. but note that the page dates from 2013 so is quite out of date. See
  245. README.chromium for how to obtain the required keys and tools.
  246. Entry: image-header: An entry which contains a pointer to the FDT map
  247. ---------------------------------------------------------------------
  248. Properties / Entry arguments:
  249. location: Location of header ("start" or "end" of image). This is
  250. optional. If omitted then the entry must have an offset property.
  251. This adds an 8-byte entry to the start or end of the image, pointing to the
  252. location of the FDT map. The format is a magic number followed by an offset
  253. from the start or end of the image, in twos-compliment format.
  254. This entry must be in the top-level part of the image.
  255. NOTE: If the location is at the start/end, you will probably need to specify
  256. sort-by-offset for the image, unless you actually put the image header
  257. first/last in the entry list.
  258. Entry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
  259. -------------------------------------------------------------------------
  260. Properties / Entry arguments:
  261. - filename: Filename of file to read into entry
  262. This file contains microcode for some devices in a special format. An
  263. example filename is 'Microcode/C0_22211.BIN'.
  264. See README.x86 for information about x86 binary blobs.
  265. Entry: intel-descriptor: Intel flash descriptor block (4KB)
  266. -----------------------------------------------------------
  267. Properties / Entry arguments:
  268. filename: Filename of file containing the descriptor. This is typically
  269. a 4KB binary file, sometimes called 'descriptor.bin'
  270. This entry is placed at the start of flash and provides information about
  271. the SPI flash regions. In particular it provides the base address and
  272. size of the ME (Management Engine) region, allowing us to place the ME
  273. binary in the right place.
  274. With this entry in your image, the position of the 'intel-me' entry will be
  275. fixed in the image, which avoids you needed to specify an offset for that
  276. region. This is useful, because it is not possible to change the position
  277. of the ME region without updating the descriptor.
  278. See README.x86 for information about x86 binary blobs.
  279. Entry: intel-fit: Intel Firmware Image Table (FIT)
  280. --------------------------------------------------
  281. This entry contains a dummy FIT as required by recent Intel CPUs. The FIT
  282. contains information about the firmware and microcode available in the
  283. image.
  284. At present binman only supports a basic FIT with no microcode.
  285. Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer
  286. --------------------------------------------------------------
  287. This entry contains a pointer to the FIT. It is required to be at address
  288. 0xffffffc0 in the image.
  289. Entry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
  290. -------------------------------------------------------------------------------
  291. Properties / Entry arguments:
  292. - filename: Filename of file to read into entry
  293. This file contains binary blobs which are used on some devices to make the
  294. platform work. U-Boot executes this code since it is not possible to set up
  295. the hardware using U-Boot open-source code. Documentation is typically not
  296. available in sufficient detail to allow this.
  297. An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
  298. See README.x86 for information about x86 binary blobs.
  299. Entry: intel-fsp-m: Entry containing Intel Firmware Support Package (FSP) memory init
  300. -------------------------------------------------------------------------------------
  301. Properties / Entry arguments:
  302. - filename: Filename of file to read into entry
  303. This file contains a binary blob which is used on some devices to set up
  304. SDRAM. U-Boot executes this code in SPL so that it can make full use of
  305. memory. Documentation is typically not available in sufficient detail to
  306. allow U-Boot do this this itself..
  307. An example filename is 'fsp_m.bin'
  308. See README.x86 for information about x86 binary blobs.
  309. Entry: intel-fsp-s: Entry containing Intel Firmware Support Package (FSP) silicon init
  310. --------------------------------------------------------------------------------------
  311. Properties / Entry arguments:
  312. - filename: Filename of file to read into entry
  313. This file contains a binary blob which is used on some devices to set up
  314. the silicon. U-Boot executes this code in U-Boot proper after SDRAM is
  315. running, so that it can make full use of memory. Documentation is typically
  316. not available in sufficient detail to allow U-Boot do this this itself.
  317. An example filename is 'fsp_s.bin'
  318. See README.x86 for information about x86 binary blobs.
  319. Entry: intel-fsp-t: Entry containing Intel Firmware Support Package (FSP) temp ram init
  320. ---------------------------------------------------------------------------------------
  321. Properties / Entry arguments:
  322. - filename: Filename of file to read into entry
  323. This file contains a binary blob which is used on some devices to set up
  324. temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so
  325. that it has access to memory for its stack and initial storage.
  326. An example filename is 'fsp_t.bin'
  327. See README.x86 for information about x86 binary blobs.
  328. Entry: intel-ifwi: Entry containing an Intel Integrated Firmware Image (IFWI) file
  329. ----------------------------------------------------------------------------------
  330. Properties / Entry arguments:
  331. - filename: Filename of file to read into entry. This is either the
  332. IFWI file itself, or a file that can be converted into one using a
  333. tool
  334. - convert-fit: If present this indicates that the ifwitool should be
  335. used to convert the provided file into a IFWI.
  336. This file contains code and data used by the SoC that is required to make
  337. it work. It includes U-Boot TPL, microcode, things related to the CSE
  338. (Converged Security Engine, the microcontroller that loads all the firmware)
  339. and other items beyond the wit of man.
  340. A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a
  341. file that will be converted to an IFWI.
  342. The position of this entry is generally set by the intel-descriptor entry.
  343. The contents of the IFWI are specified by the subnodes of the IFWI node.
  344. Each subnode describes an entry which is placed into the IFWFI with a given
  345. sub-partition (and optional entry name).
  346. Properties for subnodes:
  347. ifwi-subpart - sub-parition to put this entry into, e.g. "IBBP"
  348. ifwi-entry - entry name t use, e.g. "IBBL"
  349. ifwi-replace - if present, indicates that the item should be replaced
  350. in the IFWI. Otherwise it is added.
  351. See README.x86 for information about x86 binary blobs.
  352. Entry: intel-me: Entry containing an Intel Management Engine (ME) file
  353. ----------------------------------------------------------------------
  354. Properties / Entry arguments:
  355. - filename: Filename of file to read into entry
  356. This file contains code used by the SoC that is required to make it work.
  357. The Management Engine is like a background task that runs things that are
  358. not clearly documented, but may include keyboard, display and network
  359. access. For platform that use ME it is not possible to disable it. U-Boot
  360. does not directly execute code in the ME binary.
  361. A typical filename is 'me.bin'.
  362. The position of this entry is generally set by the intel-descriptor entry.
  363. See README.x86 for information about x86 binary blobs.
  364. Entry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
  365. ----------------------------------------------------------------------------
  366. Properties / Entry arguments:
  367. - filename: Filename of file to read into entry
  368. This file contains code for setting up the SDRAM on some Intel systems. This
  369. is executed by U-Boot when needed early during startup. A typical filename
  370. is 'mrc.bin'.
  371. See README.x86 for information about x86 binary blobs.
  372. Entry: intel-refcode: Entry containing an Intel Reference Code file
  373. -------------------------------------------------------------------
  374. Properties / Entry arguments:
  375. - filename: Filename of file to read into entry
  376. This file contains code for setting up the platform on some Intel systems.
  377. This is executed by U-Boot when needed early during startup. A typical
  378. filename is 'refcode.bin'.
  379. See README.x86 for information about x86 binary blobs.
  380. Entry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
  381. -----------------------------------------------------------------------
  382. Properties / Entry arguments:
  383. - filename: Filename of file to read into entry
  384. This file contains code that sets up the integrated graphics subsystem on
  385. some Intel SoCs. U-Boot executes this when the display is started up.
  386. See README.x86 for information about Intel binary blobs.
  387. Entry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
  388. -----------------------------------------------------------------------------
  389. Properties / Entry arguments:
  390. - filename: Filename of file to read into entry
  391. This file contains code that sets up the integrated graphics subsystem on
  392. some Intel SoCs. U-Boot executes this when the display is started up.
  393. This is similar to the VBT file but in a different format.
  394. See README.x86 for information about Intel binary blobs.
  395. Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
  396. -----------------------------------------------------------------------------------------
  397. Properties / Entry arguments:
  398. - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
  399. This entry is valid for PowerPC mpc85xx cpus. This entry holds
  400. 'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
  401. placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
  402. Entry: section: Entry that contains other entries
  403. -------------------------------------------------
  404. Properties / Entry arguments: (see binman README for more information)
  405. pad-byte: Pad byte to use when padding
  406. sort-by-offset: True if entries should be sorted by offset, False if
  407. they must be in-order in the device tree description
  408. end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
  409. skip-at-start: Number of bytes before the first entry starts. These
  410. effectively adjust the starting offset of entries. For example,
  411. if this is 16, then the first entry would start at 16. An entry
  412. with offset = 20 would in fact be written at offset 4 in the image
  413. file, since the first 16 bytes are skipped when writing.
  414. name-prefix: Adds a prefix to the name of every entry in the section
  415. when writing out the map
  416. Since a section is also an entry, it inherits all the properies of entries
  417. too.
  418. A section is an entry which can contain other entries, thus allowing
  419. hierarchical images to be created. See 'Sections and hierarchical images'
  420. in the binman README for more information.
  421. Entry: text: An entry which contains text
  422. -----------------------------------------
  423. The text can be provided either in the node itself or by a command-line
  424. argument. There is a level of indirection to allow multiple text strings
  425. and sharing of text.
  426. Properties / Entry arguments:
  427. text-label: The value of this string indicates the property / entry-arg
  428. that contains the string to place in the entry
  429. <xxx> (actual name is the value of text-label): contains the string to
  430. place in the entry.
  431. <text>: The text to place in the entry (overrides the above mechanism).
  432. This is useful when the text is constant.
  433. Example node:
  434. text {
  435. size = <50>;
  436. text-label = "message";
  437. };
  438. You can then use:
  439. binman -amessage="this is my message"
  440. and binman will insert that string into the entry.
  441. It is also possible to put the string directly in the node:
  442. text {
  443. size = <8>;
  444. text-label = "message";
  445. message = "a message directly in the node"
  446. };
  447. or just:
  448. text {
  449. size = <8>;
  450. text = "some text directly in the node"
  451. };
  452. The text is not itself nul-terminated. This can be achieved, if required,
  453. by setting the size of the entry to something larger than the text.
  454. Entry: u-boot: U-Boot flat binary
  455. ---------------------------------
  456. Properties / Entry arguments:
  457. - filename: Filename of u-boot.bin (default 'u-boot.bin')
  458. This is the U-Boot binary, containing relocation information to allow it
  459. to relocate itself at runtime. The binary typically includes a device tree
  460. blob at the end of it. Use u_boot_nodtb if you want to package the device
  461. tree separately.
  462. U-Boot can access binman symbols at runtime. See:
  463. 'Access to binman entry offsets at run time (fdt)'
  464. in the binman README for more information.
  465. Entry: u-boot-dtb: U-Boot device tree
  466. -------------------------------------
  467. Properties / Entry arguments:
  468. - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
  469. This is the U-Boot device tree, containing configuration information for
  470. U-Boot. U-Boot needs this to know what devices are present and which drivers
  471. to activate.
  472. Note: This is mostly an internal entry type, used by others. This allows
  473. binman to know which entries contain a device tree.
  474. Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
  475. -----------------------------------------------------------------------------------
  476. Properties / Entry arguments:
  477. - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
  478. See Entry_u_boot_ucode for full details of the three entries involved in
  479. this process. This entry provides the U-Boot device-tree file, which
  480. contains the microcode. If the microcode is not being collated into one
  481. place then the offset and size of the microcode is recorded by this entry,
  482. for use by u_boot_with_ucode_ptr. If it is being collated, then this
  483. entry deletes the microcode from the device tree (to save space) and makes
  484. it available to u_boot_ucode.
  485. Entry: u-boot-elf: U-Boot ELF image
  486. -----------------------------------
  487. Properties / Entry arguments:
  488. - filename: Filename of u-boot (default 'u-boot')
  489. This is the U-Boot ELF image. It does not include a device tree but can be
  490. relocated to any address for execution.
  491. Entry: u-boot-img: U-Boot legacy image
  492. --------------------------------------
  493. Properties / Entry arguments:
  494. - filename: Filename of u-boot.img (default 'u-boot.img')
  495. This is the U-Boot binary as a packaged image, in legacy format. It has a
  496. header which allows it to be loaded at the correct address for execution.
  497. You should use FIT (Flat Image Tree) instead of the legacy image for new
  498. applications.
  499. Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
  500. --------------------------------------------------------------------
  501. Properties / Entry arguments:
  502. - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
  503. This is the U-Boot binary, containing relocation information to allow it
  504. to relocate itself at runtime. It does not include a device tree blob at
  505. the end of it so normally cannot work without it. You can add a u_boot_dtb
  506. entry after this one, or use a u_boot entry instead (which contains both
  507. U-Boot and the device tree).
  508. Entry: u-boot-spl: U-Boot SPL binary
  509. ------------------------------------
  510. Properties / Entry arguments:
  511. - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
  512. This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
  513. binary which loads before U-Boot proper, typically into on-chip SRAM. It is
  514. responsible for locating, loading and jumping to U-Boot. Note that SPL is
  515. not relocatable so must be loaded to the correct address in SRAM, or written
  516. to run from the correct address if direct flash execution is possible (e.g.
  517. on x86 devices).
  518. SPL can access binman symbols at runtime. See:
  519. 'Access to binman entry offsets at run time (symbols)'
  520. in the binman README for more information.
  521. The ELF file 'spl/u-boot-spl' must also be available for this to work, since
  522. binman uses that to look up symbols to write into the SPL binary.
  523. Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
  524. ---------------------------------------------------------------------
  525. Properties / Entry arguments:
  526. None
  527. This is similar to u_boot_spl except that padding is added after the SPL
  528. binary to cover the BSS (Block Started by Symbol) region. This region holds
  529. the various used by SPL. It is set to 0 by SPL when it starts up. If you
  530. want to append data to the SPL image (such as a device tree file), you must
  531. pad out the BSS region to avoid the data overlapping with U-Boot variables.
  532. This entry is useful in that case. It automatically pads out the entry size
  533. to cover both the code, data and BSS.
  534. The ELF file 'spl/u-boot-spl' must also be available for this to work, since
  535. binman uses that to look up the BSS address.
  536. Entry: u-boot-spl-dtb: U-Boot SPL device tree
  537. ---------------------------------------------
  538. Properties / Entry arguments:
  539. - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
  540. This is the SPL device tree, containing configuration information for
  541. SPL. SPL needs this to know what devices are present and which drivers
  542. to activate.
  543. Entry: u-boot-spl-elf: U-Boot SPL ELF image
  544. -------------------------------------------
  545. Properties / Entry arguments:
  546. - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
  547. This is the U-Boot SPL ELF image. It does not include a device tree but can
  548. be relocated to any address for execution.
  549. Entry: u-boot-spl-nodtb: SPL binary without device tree appended
  550. ----------------------------------------------------------------
  551. Properties / Entry arguments:
  552. - filename: Filename of spl/u-boot-spl-nodtb.bin (default
  553. 'spl/u-boot-spl-nodtb.bin')
  554. This is the U-Boot SPL binary, It does not include a device tree blob at
  555. the end of it so may not be able to work without it, assuming SPL needs
  556. a device tree to operation on your platform. You can add a u_boot_spl_dtb
  557. entry after this one, or use a u_boot_spl entry instead (which contains
  558. both SPL and the device tree).
  559. Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
  560. ----------------------------------------------------------------------------
  561. This is used when SPL must set up the microcode for U-Boot.
  562. See Entry_u_boot_ucode for full details of the entries involved in this
  563. process.
  564. Entry: u-boot-tpl: U-Boot TPL binary
  565. ------------------------------------
  566. Properties / Entry arguments:
  567. - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
  568. This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
  569. binary which loads before SPL, typically into on-chip SRAM. It is
  570. responsible for locating, loading and jumping to SPL, the next-stage
  571. loader. Note that SPL is not relocatable so must be loaded to the correct
  572. address in SRAM, or written to run from the correct address if direct
  573. flash execution is possible (e.g. on x86 devices).
  574. SPL can access binman symbols at runtime. See:
  575. 'Access to binman entry offsets at run time (symbols)'
  576. in the binman README for more information.
  577. The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
  578. binman uses that to look up symbols to write into the TPL binary.
  579. Entry: u-boot-tpl-dtb: U-Boot TPL device tree
  580. ---------------------------------------------
  581. Properties / Entry arguments:
  582. - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
  583. This is the TPL device tree, containing configuration information for
  584. TPL. TPL needs this to know what devices are present and which drivers
  585. to activate.
  586. Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
  587. ----------------------------------------------------------------------------
  588. This is used when TPL must set up the microcode for U-Boot.
  589. See Entry_u_boot_ucode for full details of the entries involved in this
  590. process.
  591. Entry: u-boot-tpl-elf: U-Boot TPL ELF image
  592. -------------------------------------------
  593. Properties / Entry arguments:
  594. - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
  595. This is the U-Boot TPL ELF image. It does not include a device tree but can
  596. be relocated to any address for execution.
  597. Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
  598. ----------------------------------------------------------------------------
  599. See Entry_u_boot_ucode for full details of the entries involved in this
  600. process.
  601. Entry: u-boot-ucode: U-Boot microcode block
  602. -------------------------------------------
  603. Properties / Entry arguments:
  604. None
  605. The contents of this entry are filled in automatically by other entries
  606. which must also be in the image.
  607. U-Boot on x86 needs a single block of microcode. This is collected from
  608. the various microcode update nodes in the device tree. It is also unable
  609. to read the microcode from the device tree on platforms that use FSP
  610. (Firmware Support Package) binaries, because the API requires that the
  611. microcode is supplied before there is any SRAM available to use (i.e.
  612. the FSP sets up the SRAM / cache-as-RAM but does so in the call that
  613. requires the microcode!). To keep things simple, all x86 platforms handle
  614. microcode the same way in U-Boot (even non-FSP platforms). This is that
  615. a table is placed at _dt_ucode_base_size containing the base address and
  616. size of the microcode. This is either passed to the FSP (for FSP
  617. platforms), or used to set up the microcode (for non-FSP platforms).
  618. This all happens in the build system since it is the only way to get
  619. the microcode into a single blob and accessible without SRAM.
  620. There are two cases to handle. If there is only one microcode blob in
  621. the device tree, then the ucode pointer it set to point to that. This
  622. entry (u-boot-ucode) is empty. If there is more than one update, then
  623. this entry holds the concatenation of all updates, and the device tree
  624. entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
  625. last step ensures that that the microcode appears in one contiguous
  626. block in the image and is not unnecessarily duplicated in the device
  627. tree. It is referred to as 'collation' here.
  628. Entry types that have a part to play in handling microcode:
  629. Entry_u_boot_with_ucode_ptr:
  630. Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
  631. It updates it with the address and size of the microcode so that
  632. U-Boot can find it early on start-up.
  633. Entry_u_boot_dtb_with_ucode:
  634. Contains u-boot.dtb. It stores the microcode in a
  635. 'self.ucode_data' property, which is then read by this class to
  636. obtain the microcode if needed. If collation is performed, it
  637. removes the microcode from the device tree.
  638. Entry_u_boot_ucode:
  639. This class. If collation is enabled it reads the microcode from
  640. the Entry_u_boot_dtb_with_ucode entry, and uses it as the
  641. contents of this entry.
  642. Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
  643. --------------------------------------------------------------------
  644. Properties / Entry arguments:
  645. - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb')
  646. - optional-ucode: boolean property to make microcode optional. If the
  647. u-boot.bin image does not include microcode, no error will
  648. be generated.
  649. See Entry_u_boot_ucode for full details of the three entries involved in
  650. this process. This entry updates U-Boot with the offset and size of the
  651. microcode, to allow early x86 boot code to find it without doing anything
  652. complicated. Otherwise it is the same as the u_boot entry.
  653. Entry: vblock: An entry which contains a Chromium OS verified boot block
  654. ------------------------------------------------------------------------
  655. Properties / Entry arguments:
  656. - content: List of phandles to entries to sign
  657. - keydir: Directory containing the public keys to use
  658. - keyblock: Name of the key file to use (inside keydir)
  659. - signprivate: Name of provide key file to use (inside keydir)
  660. - version: Version number of the vblock (typically 1)
  661. - kernelkey: Name of the kernel key to use (inside keydir)
  662. - preamble-flags: Value of the vboot preamble flags (typically 0)
  663. Output files:
  664. - input.<unique_name> - input file passed to futility
  665. - vblock.<unique_name> - output file generated by futility (which is
  666. used as the entry contents)
  667. Chromium OS signs the read-write firmware and kernel, writing the signature
  668. in this block. This allows U-Boot to verify that the next firmware stage
  669. and kernel are genuine.
  670. Entry: x86-reset16: x86 16-bit reset code for U-Boot
  671. ----------------------------------------------------
  672. Properties / Entry arguments:
  673. - filename: Filename of u-boot-x86-reset16.bin (default
  674. 'u-boot-x86-reset16.bin')
  675. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  676. must be placed at a particular address. This entry holds that code. It is
  677. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  678. for jumping to the x86-start16 code, which continues execution.
  679. For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead.
  680. Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot
  681. --------------------------------------------------------
  682. Properties / Entry arguments:
  683. - filename: Filename of u-boot-x86-reset16.bin (default
  684. 'u-boot-x86-reset16.bin')
  685. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  686. must be placed at a particular address. This entry holds that code. It is
  687. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  688. for jumping to the x86-start16 code, which continues execution.
  689. For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead.
  690. Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot
  691. --------------------------------------------------------
  692. Properties / Entry arguments:
  693. - filename: Filename of u-boot-x86-reset16.bin (default
  694. 'u-boot-x86-reset16.bin')
  695. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  696. must be placed at a particular address. This entry holds that code. It is
  697. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  698. for jumping to the x86-start16 code, which continues execution.
  699. For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead.
  700. Entry: x86-start16: x86 16-bit start-up code for U-Boot
  701. -------------------------------------------------------
  702. Properties / Entry arguments:
  703. - filename: Filename of u-boot-x86-start16.bin (default
  704. 'u-boot-x86-start16.bin')
  705. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  706. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  707. entry holds that code. It is typically placed at offset
  708. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  709. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  710. U-Boot).
  711. For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
  712. Entry: x86-start16-spl: x86 16-bit start-up code for SPL
  713. --------------------------------------------------------
  714. Properties / Entry arguments:
  715. - filename: Filename of spl/u-boot-x86-start16-spl.bin (default
  716. 'spl/u-boot-x86-start16-spl.bin')
  717. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  718. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  719. entry holds that code. It is typically placed at offset
  720. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  721. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  722. U-Boot).
  723. For 32-bit U-Boot, the 'x86-start16' entry type is used instead.
  724. Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
  725. --------------------------------------------------------
  726. Properties / Entry arguments:
  727. - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default
  728. 'tpl/u-boot-x86-start16-tpl.bin')
  729. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  730. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  731. entry holds that code. It is typically placed at offset
  732. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  733. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  734. U-Boot).
  735. If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types
  736. may be used instead.