README.entries 44 KB

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