entries.rst 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744
  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. .. _etype_atf_bl31:
  10. Entry: atf-bl31: ARM Trusted Firmware (ATF) BL31 blob
  11. -----------------------------------------------------
  12. Properties / Entry arguments:
  13. - atf-bl31-path: Filename of file to read into entry. This is typically
  14. called bl31.bin or bl31.elf
  15. This entry holds the run-time firmware, typically started by U-Boot SPL.
  16. See the U-Boot README for your architecture or board for how to use it. See
  17. https://github.com/ARM-software/arm-trusted-firmware for more information
  18. about ATF.
  19. .. _etype_atf_fip:
  20. Entry: atf-fip: ARM Trusted Firmware's Firmware Image Package (FIP)
  21. -------------------------------------------------------------------
  22. A FIP_ provides a way to group binaries in a firmware image, used by ARM's
  23. Trusted Firmware A (TF-A) code. It is a simple format consisting of a
  24. table of contents with information about the type, offset and size of the
  25. binaries in the FIP. It is quite similar to FMAP, with the major difference
  26. that it uses UUIDs to indicate the type of each entry.
  27. Note: It is recommended to always add an fdtmap to every image, as well as
  28. any FIPs so that binman and other tools can access the entire image
  29. correctly.
  30. The UUIDs correspond to useful names in `fiptool`, provided by ATF to
  31. operate on FIPs. Binman uses these names to make it easier to understand
  32. what is going on, although it is possible to provide a UUID if needed.
  33. The contents of the FIP are defined by subnodes of the atf-fip entry, e.g.::
  34. atf-fip {
  35. soc-fw {
  36. filename = "bl31.bin";
  37. };
  38. scp-fwu-cfg {
  39. filename = "bl2u.bin";
  40. };
  41. u-boot {
  42. fip-type = "nt-fw";
  43. };
  44. };
  45. This describes a FIP with three entries: soc-fw, scp-fwu-cfg and nt-fw.
  46. You can use normal (non-external) binaries like U-Boot simply by adding a
  47. FIP type, with the `fip-type` property, as above.
  48. Since FIP exists to bring blobs together, Binman assumes that all FIP
  49. entries are external binaries. If a binary may not exist, you can use the
  50. `--allow-missing` flag to Binman, in which case the image is still created,
  51. even though it will not actually work.
  52. The size of the FIP depends on the size of the binaries. There is currently
  53. no way to specify a fixed size. If the `atf-fip` node has a `size` entry,
  54. this affects the space taken up by the `atf-fip` entry, but the FIP itself
  55. does not expand to use that space.
  56. Some other FIP features are available with Binman. The header and the
  57. entries have 64-bit flag works. The flag flags do not seem to be defined
  58. anywhere, but you can use `fip-hdr-flags` and fip-flags` to set the values
  59. of the header and entries respectively.
  60. FIP entries can be aligned to a particular power-of-two boundary. Use
  61. fip-align for this.
  62. Binman only understands the entry types that are included in its
  63. implementation. It is possible to specify a 16-byte UUID instead, using the
  64. fip-uuid property. In this case Binman doesn't know what its type is, so
  65. just uses the UUID. See the `u-boot` node in this example::
  66. binman {
  67. atf-fip {
  68. fip-hdr-flags = /bits/ 64 <0x123>;
  69. fip-align = <16>;
  70. soc-fw {
  71. fip-flags = /bits/ 64 <0x456>;
  72. filename = "bl31.bin";
  73. };
  74. scp-fwu-cfg {
  75. filename = "bl2u.bin";
  76. };
  77. u-boot {
  78. fip-uuid = [fc 65 13 92 4a 5b 11 ec
  79. 94 35 ff 2d 1c fc 79 9c];
  80. };
  81. };
  82. fdtmap {
  83. };
  84. };
  85. Binman allows reading and updating FIP entries after the image is created,
  86. provided that an FDPMAP is present too. Updates which change the size of a
  87. FIP entry will cause it to be expanded or contracted as needed.
  88. Properties for top-level atf-fip node
  89. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  90. fip-hdr-flags (64 bits)
  91. Sets the flags for the FIP header.
  92. Properties for subnodes
  93. ~~~~~~~~~~~~~~~~~~~~~~~
  94. fip-type (str)
  95. FIP type to use for this entry. This is needed if the entry
  96. name is not a valid type. Value types are defined in `fip_util.py`.
  97. The FIP type defines the UUID that is used (they map 1:1).
  98. fip-uuid (16 bytes)
  99. If there is no FIP-type name defined, or it is not supported by Binman,
  100. this property sets the UUID. It should be a 16-byte value, following the
  101. hex digits of the UUID.
  102. fip-flags (64 bits)
  103. Set the flags for a FIP entry. Use in one of the subnodes of the
  104. 7atf-fip entry.
  105. fip-align
  106. Set the alignment for a FIP entry, FIP entries can be aligned to a
  107. particular power-of-two boundary. The default is 1.
  108. Adding new FIP-entry types
  109. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  110. When new FIP entries are defined by TF-A they appear in the
  111. `TF-A source tree`_. You can use `fip_util.py` to update Binman to support
  112. new types, then `send a patch`_ to the U-Boot mailing list. There are two
  113. source files that the tool examples:
  114. - `include/tools_share/firmware_image_package.h` has the UUIDs
  115. - `tools/fiptool/tbbr_config.c` has the name and descripion for each UUID
  116. To run the tool::
  117. $ tools/binman/fip_util.py -s /path/to/arm-trusted-firmware
  118. Warning: UUID 'UUID_NON_TRUSTED_WORLD_KEY_CERT' is not mentioned in tbbr_config.c file
  119. Existing code in 'tools/binman/fip_util.py' is up-to-date
  120. If it shows there is an update, it writes a new version of `fip_util.py`
  121. to `fip_util.py.out`. You can change the output file using the `-i` flag.
  122. If you have a problem, use `-D` to enable traceback debugging.
  123. FIP commentary
  124. ~~~~~~~~~~~~~~
  125. As a side effect of use of UUIDs, FIP does not support multiple
  126. entries of the same type, such as might be used to store fonts or graphics
  127. icons, for example. For verified boot it could be used for each part of the
  128. image (e.g. separate FIPs for A and B) but cannot describe the whole
  129. firmware image. As with FMAP there is no hierarchy defined, although FMAP
  130. works around this by having 'section' areas which encompass others. A
  131. similar workaround would be possible with FIP but is not currently defined.
  132. It is recommended to always add an fdtmap to every image, as well as any
  133. FIPs so that binman and other tools can access the entire image correctly.
  134. .. _FIP: https://trustedfirmware-a.readthedocs.io/en/latest/design/firmware-design.html#firmware-image-package-fip
  135. .. _`TF-A source tree`: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
  136. .. _`send a patch`: https://www.denx.de/wiki/U-Boot/Patches
  137. .. _etype_blob:
  138. Entry: blob: Arbitrary binary blob
  139. ----------------------------------
  140. Note: This should not be used by itself. It is normally used as a parent
  141. class by other entry types.
  142. Properties / Entry arguments:
  143. - filename: Filename of file to read into entry
  144. - compress: Compression algorithm to use:
  145. none: No compression
  146. lz4: Use lz4 compression (via 'lz4' command-line utility)
  147. This entry reads data from a file and places it in the entry. The
  148. default filename is often specified specified by the subclass. See for
  149. example the 'u-boot' entry which provides the filename 'u-boot.bin'.
  150. If compression is enabled, an extra 'uncomp-size' property is written to
  151. the node (if enabled with -u) which provides the uncompressed size of the
  152. data.
  153. .. _etype_blob_dtb:
  154. Entry: blob-dtb: A blob that holds a device tree
  155. ------------------------------------------------
  156. This is a blob containing a device tree. The contents of the blob are
  157. obtained from the list of available device-tree files, managed by the
  158. 'state' module.
  159. Additional attributes:
  160. prepend: Header used (e.g. 'length')
  161. .. _etype_blob_ext:
  162. Entry: blob-ext: Externally built binary blob
  163. ---------------------------------------------
  164. Note: This should not be used by itself. It is normally used as a parent
  165. class by other entry types.
  166. If the file providing this blob is missing, binman can optionally ignore it
  167. and produce a broken image with a warning.
  168. See 'blob' for Properties / Entry arguments.
  169. .. _etype_blob_ext_list:
  170. Entry: blob-ext-list: List of externally built binary blobs
  171. -----------------------------------------------------------
  172. This is like blob-ext except that a number of blobs can be provided,
  173. typically with some sort of relationship, e.g. all are DDC parameters.
  174. If any of the external files needed by this llist is missing, binman can
  175. optionally ignore it and produce a broken image with a warning.
  176. Args:
  177. filenames: List of filenames to read and include
  178. .. _etype_blob_named_by_arg:
  179. Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
  180. -----------------------------------------------------------------------------------------
  181. Properties / Entry arguments:
  182. - <xxx>-path: Filename containing the contents of this entry (optional,
  183. defaults to None)
  184. where <xxx> is the blob_fname argument to the constructor.
  185. This entry cannot be used directly. Instead, it is used as a parent class
  186. for another entry, which defined blob_fname. This parameter is used to
  187. set the entry-arg or property containing the filename. The entry-arg or
  188. property is in turn used to set the actual filename.
  189. See cros_ec_rw for an example of this.
  190. .. _etype_blob_phase:
  191. Entry: blob-phase: Section that holds a phase binary
  192. ----------------------------------------------------
  193. This is a base class that should not normally be used directly. It is used
  194. when converting a 'u-boot' entry automatically into a 'u-boot-expanded'
  195. entry; similarly for SPL.
  196. .. _etype_cbfs:
  197. Entry: cbfs: Coreboot Filesystem (CBFS)
  198. ---------------------------------------
  199. A CBFS provides a way to group files into a group. It has a simple directory
  200. structure and allows the position of individual files to be set, since it is
  201. designed to support execute-in-place in an x86 SPI-flash device. Where XIP
  202. is not used, it supports compression and storing ELF files.
  203. CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
  204. The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.::
  205. cbfs {
  206. size = <0x100000>;
  207. u-boot {
  208. cbfs-type = "raw";
  209. };
  210. u-boot-dtb {
  211. cbfs-type = "raw";
  212. };
  213. };
  214. This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
  215. Note that the size is required since binman does not support calculating it.
  216. The contents of each entry is just what binman would normally provide if it
  217. were not a CBFS node. A blob type can be used to import arbitrary files as
  218. with the second subnode below::
  219. cbfs {
  220. size = <0x100000>;
  221. u-boot {
  222. cbfs-name = "BOOT";
  223. cbfs-type = "raw";
  224. };
  225. dtb {
  226. type = "blob";
  227. filename = "u-boot.dtb";
  228. cbfs-type = "raw";
  229. cbfs-compress = "lz4";
  230. cbfs-offset = <0x100000>;
  231. };
  232. };
  233. This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
  234. u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
  235. Properties supported in the top-level CBFS node:
  236. cbfs-arch:
  237. Defaults to "x86", but you can specify the architecture if needed.
  238. Properties supported in the CBFS entry subnodes:
  239. cbfs-name:
  240. This is the name of the file created in CBFS. It defaults to the entry
  241. name (which is the node name), but you can override it with this
  242. property.
  243. cbfs-type:
  244. This is the CBFS file type. The following are supported:
  245. raw:
  246. This is a 'raw' file, although compression is supported. It can be
  247. used to store any file in CBFS.
  248. stage:
  249. This is an ELF file that has been loaded (i.e. mapped to memory), so
  250. appears in the CBFS as a flat binary. The input file must be an ELF
  251. image, for example this puts "u-boot" (the ELF image) into a 'stage'
  252. entry::
  253. cbfs {
  254. size = <0x100000>;
  255. u-boot-elf {
  256. cbfs-name = "BOOT";
  257. cbfs-type = "stage";
  258. };
  259. };
  260. You can use your own ELF file with something like::
  261. cbfs {
  262. size = <0x100000>;
  263. something {
  264. type = "blob";
  265. filename = "cbfs-stage.elf";
  266. cbfs-type = "stage";
  267. };
  268. };
  269. As mentioned, the file is converted to a flat binary, so it is
  270. equivalent to adding "u-boot.bin", for example, but with the load and
  271. start addresses specified by the ELF. At present there is no option
  272. to add a flat binary with a load/start address, similar to the
  273. 'add-flat-binary' option in cbfstool.
  274. cbfs-offset:
  275. This is the offset of the file's data within the CBFS. It is used to
  276. specify where the file should be placed in cases where a fixed position
  277. is needed. Typical uses are for code which is not relocatable and must
  278. execute in-place from a particular address. This works because SPI flash
  279. is generally mapped into memory on x86 devices. The file header is
  280. placed before this offset so that the data start lines up exactly with
  281. the chosen offset. If this property is not provided, then the file is
  282. placed in the next available spot.
  283. The current implementation supports only a subset of CBFS features. It does
  284. not support other file types (e.g. payload), adding multiple files (like the
  285. 'files' entry with a pattern supported by binman), putting files at a
  286. particular offset in the CBFS and a few other things.
  287. Of course binman can create images containing multiple CBFSs, simply by
  288. defining these in the binman config::
  289. binman {
  290. size = <0x800000>;
  291. cbfs {
  292. offset = <0x100000>;
  293. size = <0x100000>;
  294. u-boot {
  295. cbfs-type = "raw";
  296. };
  297. u-boot-dtb {
  298. cbfs-type = "raw";
  299. };
  300. };
  301. cbfs2 {
  302. offset = <0x700000>;
  303. size = <0x100000>;
  304. u-boot {
  305. cbfs-type = "raw";
  306. };
  307. u-boot-dtb {
  308. cbfs-type = "raw";
  309. };
  310. image {
  311. type = "blob";
  312. filename = "image.jpg";
  313. };
  314. };
  315. };
  316. This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
  317. both of size 1MB.
  318. .. _etype_collection:
  319. Entry: collection: An entry which contains a collection of other entries
  320. ------------------------------------------------------------------------
  321. Properties / Entry arguments:
  322. - content: List of phandles to entries to include
  323. This allows reusing the contents of other entries. The contents of the
  324. listed entries are combined to form this entry. This serves as a useful
  325. base class for entry types which need to process data from elsewhere in
  326. the image, not necessarily child entries.
  327. The entries can generally be anywhere in the same image, even if they are in
  328. a different section from this entry.
  329. .. _etype_cros_ec_rw:
  330. Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
  331. --------------------------------------------------------------------------------
  332. Properties / Entry arguments:
  333. - cros-ec-rw-path: Filename containing the EC image
  334. This entry holds a Chromium OS EC (embedded controller) image, for use in
  335. updating the EC on startup via software sync.
  336. .. _etype_encrypted:
  337. Entry: encrypted: Externally built encrypted binary blob
  338. --------------------------------------------------------
  339. This entry provides the functionality to include information about how to
  340. decrypt an encrypted binary. This information is added to the
  341. resulting device tree by adding a new cipher node in the entry's parent
  342. node (i.e. the binary).
  343. The key that must be used to decrypt the binary is either directly embedded
  344. in the device tree or indirectly by specifying a key source. The key source
  345. can be used as an id of a key that is stored in an external device.
  346. Using an embedded key
  347. ~~~~~~~~~~~~~~~~~~~~~
  348. This is an example using an embedded key::
  349. blob-ext {
  350. filename = "encrypted-blob.bin";
  351. };
  352. encrypted {
  353. algo = "aes256-gcm";
  354. iv-filename = "encrypted-blob.bin.iv";
  355. key-filename = "encrypted-blob.bin.key";
  356. };
  357. This entry generates the following device tree structure form the example
  358. above::
  359. data = [...]
  360. cipher {
  361. algo = "aes256-gcm";
  362. key = <0x...>;
  363. iv = <0x...>;
  364. };
  365. The data property is generated by the blob-ext etype, the cipher node and
  366. its content is generated by this etype.
  367. Using an external key
  368. ~~~~~~~~~~~~~~~~~~~~~
  369. Instead of embedding the key itself into the device tree, it is also
  370. possible to address an externally stored key by specifying a 'key-source'
  371. instead of the 'key'::
  372. blob-ext {
  373. filename = "encrypted-blob.bin";
  374. };
  375. encrypted {
  376. algo = "aes256-gcm";
  377. iv-filename = "encrypted-blob.bin.iv";
  378. key-source = "external-key-id";
  379. };
  380. This entry generates the following device tree structure form the example
  381. above::
  382. data = [...]
  383. cipher {
  384. algo = "aes256-gcm";
  385. key-source = "external-key-id";
  386. iv = <0x...>;
  387. };
  388. Properties
  389. ~~~~~~~~~~
  390. Properties / Entry arguments:
  391. - algo: The encryption algorithm. Currently no algorithm is supported
  392. out-of-the-box. Certain algorithms will be added in future
  393. patches.
  394. - iv-filename: The name of the file containing the initialization
  395. vector (in short iv). See
  396. https://en.wikipedia.org/wiki/Initialization_vector
  397. - key-filename: The name of the file containing the key. Either
  398. key-filename or key-source must be provided.
  399. - key-source: The key that should be used. Either key-filename or
  400. key-source must be provided.
  401. .. _etype_fdtmap:
  402. Entry: fdtmap: An entry which contains an FDT map
  403. -------------------------------------------------
  404. Properties / Entry arguments:
  405. None
  406. An FDT map is just a header followed by an FDT containing a list of all the
  407. entries in the image. The root node corresponds to the image node in the
  408. original FDT, and an image-name property indicates the image name in that
  409. original tree.
  410. The header is the string _FDTMAP_ followed by 8 unused bytes.
  411. When used, this entry will be populated with an FDT map which reflects the
  412. entries in the current image. Hierarchy is preserved, and all offsets and
  413. sizes are included.
  414. Note that the -u option must be provided to ensure that binman updates the
  415. FDT with the position of each entry.
  416. Example output for a simple image with U-Boot and an FDT map::
  417. / {
  418. image-name = "binman";
  419. size = <0x00000112>;
  420. image-pos = <0x00000000>;
  421. offset = <0x00000000>;
  422. u-boot {
  423. size = <0x00000004>;
  424. image-pos = <0x00000000>;
  425. offset = <0x00000000>;
  426. };
  427. fdtmap {
  428. size = <0x0000010e>;
  429. image-pos = <0x00000004>;
  430. offset = <0x00000004>;
  431. };
  432. };
  433. If allow-repack is used then 'orig-offset' and 'orig-size' properties are
  434. added as necessary. See the binman README.
  435. When extracting files, an alternative 'fdt' format is available for fdtmaps.
  436. Use `binman extract -F fdt ...` to use this. It will export a devicetree,
  437. without the fdtmap header, so it can be viewed with `fdtdump`.
  438. .. _etype_files:
  439. Entry: files: A set of files arranged in a section
  440. --------------------------------------------------
  441. Properties / Entry arguments:
  442. - pattern: Filename pattern to match the files to include
  443. - files-compress: Compression algorithm to use:
  444. none: No compression
  445. lz4: Use lz4 compression (via 'lz4' command-line utility)
  446. - files-align: Align each file to the given alignment
  447. This entry reads a number of files and places each in a separate sub-entry
  448. within this entry. To access these you need to enable device-tree updates
  449. at run-time so you can obtain the file positions.
  450. .. _etype_fill:
  451. Entry: fill: An entry which is filled to a particular byte value
  452. ----------------------------------------------------------------
  453. Properties / Entry arguments:
  454. - fill-byte: Byte to use to fill the entry
  455. Note that the size property must be set since otherwise this entry does not
  456. know how large it should be.
  457. You can often achieve the same effect using the pad-byte property of the
  458. overall image, in that the space between entries will then be padded with
  459. that byte. But this entry is sometimes useful for explicitly setting the
  460. byte value of a region.
  461. .. _etype_fit:
  462. Entry: fit: Flat Image Tree (FIT)
  463. ---------------------------------
  464. This calls mkimage to create a FIT (U-Boot Flat Image Tree) based on the
  465. input provided.
  466. Nodes for the FIT should be written out in the binman configuration just as
  467. they would be in a file passed to mkimage.
  468. For example, this creates an image containing a FIT with U-Boot SPL::
  469. binman {
  470. fit {
  471. description = "Test FIT";
  472. fit,fdt-list = "of-list";
  473. images {
  474. kernel@1 {
  475. description = "SPL";
  476. os = "u-boot";
  477. type = "rkspi";
  478. arch = "arm";
  479. compression = "none";
  480. load = <0>;
  481. entry = <0>;
  482. u-boot-spl {
  483. };
  484. };
  485. };
  486. };
  487. };
  488. More complex setups can be created, with generated nodes, as described
  489. below.
  490. Properties (in the 'fit' node itself)
  491. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  492. Special properties have a `fit,` prefix, indicating that they should be
  493. processed but not included in the final FIT.
  494. The top-level 'fit' node supports the following special properties:
  495. fit,external-offset
  496. Indicates that the contents of the FIT are external and provides the
  497. external offset. This is passed to mkimage via the -E and -p flags.
  498. fit,align
  499. Indicates what alignment to use for the FIT and its external data,
  500. and provides the alignment to use. This is passed to mkimage via
  501. the -B flag.
  502. fit,fdt-list
  503. Indicates the entry argument which provides the list of device tree
  504. files for the gen-fdt-nodes operation (as below). This is often
  505. `of-list` meaning that `-a of-list="dtb1 dtb2..."` should be passed
  506. to binman.
  507. fit,fdt-list-val
  508. As an alternative to fit,fdt-list the list of device tree files
  509. can be provided in this property as a string list, e.g.::
  510. fit,fdt-list-val = "dtb1", "dtb2";
  511. Substitutions
  512. ~~~~~~~~~~~~~
  513. Node names and property values support a basic string-substitution feature.
  514. Available substitutions for '@' nodes (and property values) are:
  515. SEQ:
  516. Sequence number of the generated fdt (1, 2, ...)
  517. NAME
  518. Name of the dtb as provided (i.e. without adding '.dtb')
  519. The `default` property, if present, will be automatically set to the name
  520. if of configuration whose devicetree matches the `default-dt` entry
  521. argument, e.g. with `-a default-dt=sun50i-a64-pine64-lts`.
  522. Available substitutions for property values in these nodes are:
  523. DEFAULT-SEQ:
  524. Sequence number of the default fdt, as provided by the 'default-dt'
  525. entry argument
  526. Available operations
  527. ~~~~~~~~~~~~~~~~~~~~
  528. You can add an operation to an '@' node to indicate which operation is
  529. required::
  530. @fdt-SEQ {
  531. fit,operation = "gen-fdt-nodes";
  532. ...
  533. };
  534. Available operations are:
  535. gen-fdt-nodes
  536. Generate FDT nodes as above. This is the default if there is no
  537. `fit,operation` property.
  538. split-elf
  539. Split an ELF file into a separate node for each segment.
  540. Generating nodes from an FDT list (gen-fdt-nodes)
  541. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  542. U-Boot supports creating fdt and config nodes automatically. To do this,
  543. pass an `of-list` property (e.g. `-a of-list=file1 file2`). This tells
  544. binman that you want to generates nodes for two files: `file1.dtb` and
  545. `file2.dtb`. The `fit,fdt-list` property (see above) indicates that
  546. `of-list` should be used. If the property is missing you will get an error.
  547. Then add a 'generator node', a node with a name starting with '@'::
  548. images {
  549. @fdt-SEQ {
  550. description = "fdt-NAME";
  551. type = "flat_dt";
  552. compression = "none";
  553. };
  554. };
  555. This tells binman to create nodes `fdt-1` and `fdt-2` for each of your two
  556. files. All the properties you specify will be included in the node. This
  557. node acts like a template to generate the nodes. The generator node itself
  558. does not appear in the output - it is replaced with what binman generates.
  559. A 'data' property is created with the contents of the FDT file.
  560. You can create config nodes in a similar way::
  561. configurations {
  562. default = "@config-DEFAULT-SEQ";
  563. @config-SEQ {
  564. description = "NAME";
  565. firmware = "atf";
  566. loadables = "uboot";
  567. fdt = "fdt-SEQ";
  568. };
  569. };
  570. This tells binman to create nodes `config-1` and `config-2`, i.e. a config
  571. for each of your two files.
  572. Note that if no devicetree files are provided (with '-a of-list' as above)
  573. then no nodes will be generated.
  574. Generating nodes from an ELF file (split-elf)
  575. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  576. This uses the node as a template to generate multiple nodes. The following
  577. special properties are available:
  578. split-elf
  579. Split an ELF file into a separate node for each segment. This uses the
  580. node as a template to generate multiple nodes. The following special
  581. properties are available:
  582. fit,load
  583. Generates a `load = <...>` property with the load address of the
  584. segment
  585. fit,entry
  586. Generates a `entry = <...>` property with the entry address of the
  587. ELF. This is only produced for the first entry
  588. fit,data
  589. Generates a `data = <...>` property with the contents of the segment
  590. fit,firmware
  591. Generates a `firmware = <...>` property. Provides a list of possible
  592. nodes to be used as the `firmware` property value. The first valid
  593. node is picked as the firmware. Any remaining valid nodes is
  594. prepended to the `loadable` property generated by `fit,loadables`
  595. fit,loadables
  596. Generates a `loadable = <...>` property with a list of the generated
  597. nodes (including all nodes if this operation is used multiple times)
  598. Here is an example showing ATF, TEE and a device tree all combined::
  599. fit {
  600. description = "test-desc";
  601. #address-cells = <1>;
  602. fit,fdt-list = "of-list";
  603. images {
  604. u-boot {
  605. description = "U-Boot (64-bit)";
  606. type = "standalone";
  607. os = "U-Boot";
  608. arch = "arm64";
  609. compression = "none";
  610. load = <CONFIG_TEXT_BASE>;
  611. u-boot-nodtb {
  612. };
  613. };
  614. @fdt-SEQ {
  615. description = "fdt-NAME.dtb";
  616. type = "flat_dt";
  617. compression = "none";
  618. };
  619. @atf-SEQ {
  620. fit,operation = "split-elf";
  621. description = "ARM Trusted Firmware";
  622. type = "firmware";
  623. arch = "arm64";
  624. os = "arm-trusted-firmware";
  625. compression = "none";
  626. fit,load;
  627. fit,entry;
  628. fit,data;
  629. atf-bl31 {
  630. };
  631. hash {
  632. algo = "sha256";
  633. };
  634. };
  635. @tee-SEQ {
  636. fit,operation = "split-elf";
  637. description = "TEE";
  638. type = "tee";
  639. arch = "arm64";
  640. os = "tee";
  641. compression = "none";
  642. fit,load;
  643. fit,entry;
  644. fit,data;
  645. tee-os {
  646. };
  647. hash {
  648. algo = "sha256";
  649. };
  650. };
  651. };
  652. configurations {
  653. default = "@config-DEFAULT-SEQ";
  654. @config-SEQ {
  655. description = "conf-NAME.dtb";
  656. fdt = "fdt-SEQ";
  657. fit,firmware = "atf-1", "u-boot";
  658. fit,loadables;
  659. };
  660. };
  661. };
  662. If ATF-BL31 is available, this generates a node for each segment in the
  663. ELF file, for example::
  664. images {
  665. atf-1 {
  666. data = <...contents of first segment...>;
  667. data-offset = <0x00000000>;
  668. entry = <0x00040000>;
  669. load = <0x00040000>;
  670. compression = "none";
  671. os = "arm-trusted-firmware";
  672. arch = "arm64";
  673. type = "firmware";
  674. description = "ARM Trusted Firmware";
  675. hash {
  676. algo = "sha256";
  677. value = <...hash of first segment...>;
  678. };
  679. };
  680. atf-2 {
  681. data = <...contents of second segment...>;
  682. load = <0xff3b0000>;
  683. compression = "none";
  684. os = "arm-trusted-firmware";
  685. arch = "arm64";
  686. type = "firmware";
  687. description = "ARM Trusted Firmware";
  688. hash {
  689. algo = "sha256";
  690. value = <...hash of second segment...>;
  691. };
  692. };
  693. };
  694. The same applies for OP-TEE if that is available.
  695. If each binary is not available, the relevant template node (@atf-SEQ or
  696. @tee-SEQ) is removed from the output.
  697. This also generates a `config-xxx` node for each device tree in `of-list`.
  698. Note that the U-Boot build system uses `-a of-list=$(CONFIG_OF_LIST)`
  699. so you can use `CONFIG_OF_LIST` to define that list. In this example it is
  700. set up for `firefly-rk3399` with a single device tree and the default set
  701. with `-a default-dt=$(CONFIG_DEFAULT_DEVICE_TREE)`, so the resulting output
  702. is::
  703. configurations {
  704. default = "config-1";
  705. config-1 {
  706. loadables = "u-boot", "atf-2", "atf-3", "tee-1", "tee-2";
  707. description = "rk3399-firefly.dtb";
  708. fdt = "fdt-1";
  709. firmware = "atf-1";
  710. };
  711. };
  712. U-Boot SPL can then load the firmware (ATF) and all the loadables (U-Boot
  713. proper, ATF and TEE), then proceed with the boot.
  714. .. _etype_fmap:
  715. Entry: fmap: An entry which contains an Fmap section
  716. ----------------------------------------------------
  717. Properties / Entry arguments:
  718. None
  719. FMAP is a simple format used by flashrom, an open-source utility for
  720. reading and writing the SPI flash, typically on x86 CPUs. The format
  721. provides flashrom with a list of areas, so it knows what it in the flash.
  722. It can then read or write just a single area, instead of the whole flash.
  723. The format is defined by the flashrom project, in the file lib/fmap.h -
  724. see www.flashrom.org/Flashrom for more information.
  725. When used, this entry will be populated with an FMAP which reflects the
  726. entries in the current image. Note that any hierarchy is squashed, since
  727. FMAP does not support this. Sections are represented as an area appearing
  728. before its contents, so that it is possible to reconstruct the hierarchy
  729. from the FMAP by using the offset information. This convention does not
  730. seem to be documented, but is used in Chromium OS.
  731. To mark an area as preserved, use the normal 'preserved' flag in the entry.
  732. This will result in the corresponding FMAP area having the
  733. FMAP_AREA_PRESERVE flag. This flag does not automatically propagate down to
  734. child entries.
  735. CBFS entries appear as a single entry, i.e. the sub-entries are ignored.
  736. .. _etype_gbb:
  737. Entry: gbb: An entry which contains a Chromium OS Google Binary Block
  738. ---------------------------------------------------------------------
  739. Properties / Entry arguments:
  740. - hardware-id: Hardware ID to use for this build (a string)
  741. - keydir: Directory containing the public keys to use
  742. - bmpblk: Filename containing images used by recovery
  743. Chromium OS uses a GBB to store various pieces of information, in particular
  744. the root and recovery keys that are used to verify the boot process. Some
  745. more details are here:
  746. https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
  747. but note that the page dates from 2013 so is quite out of date. See
  748. README.chromium for how to obtain the required keys and tools.
  749. .. _etype_image_header:
  750. Entry: image-header: An entry which contains a pointer to the FDT map
  751. ---------------------------------------------------------------------
  752. Properties / Entry arguments:
  753. location: Location of header ("start" or "end" of image). This is
  754. optional. If omitted then the entry must have an offset property.
  755. This adds an 8-byte entry to the start or end of the image, pointing to the
  756. location of the FDT map. The format is a magic number followed by an offset
  757. from the start or end of the image, in twos-compliment format.
  758. This entry must be in the top-level part of the image.
  759. NOTE: If the location is at the start/end, you will probably need to specify
  760. sort-by-offset for the image, unless you actually put the image header
  761. first/last in the entry list.
  762. .. _etype_intel_cmc:
  763. Entry: intel-cmc: Intel Chipset Micro Code (CMC) file
  764. -----------------------------------------------------
  765. Properties / Entry arguments:
  766. - filename: Filename of file to read into entry
  767. This file contains microcode for some devices in a special format. An
  768. example filename is 'Microcode/C0_22211.BIN'.
  769. See README.x86 for information about x86 binary blobs.
  770. .. _etype_intel_descriptor:
  771. Entry: intel-descriptor: Intel flash descriptor block (4KB)
  772. -----------------------------------------------------------
  773. Properties / Entry arguments:
  774. filename: Filename of file containing the descriptor. This is typically
  775. a 4KB binary file, sometimes called 'descriptor.bin'
  776. This entry is placed at the start of flash and provides information about
  777. the SPI flash regions. In particular it provides the base address and
  778. size of the ME (Management Engine) region, allowing us to place the ME
  779. binary in the right place.
  780. With this entry in your image, the position of the 'intel-me' entry will be
  781. fixed in the image, which avoids you needed to specify an offset for that
  782. region. This is useful, because it is not possible to change the position
  783. of the ME region without updating the descriptor.
  784. See README.x86 for information about x86 binary blobs.
  785. .. _etype_intel_fit:
  786. Entry: intel-fit: Intel Firmware Image Table (FIT)
  787. --------------------------------------------------
  788. This entry contains a dummy FIT as required by recent Intel CPUs. The FIT
  789. contains information about the firmware and microcode available in the
  790. image.
  791. At present binman only supports a basic FIT with no microcode.
  792. .. _etype_intel_fit_ptr:
  793. Entry: intel-fit-ptr: Intel Firmware Image Table (FIT) pointer
  794. --------------------------------------------------------------
  795. This entry contains a pointer to the FIT. It is required to be at address
  796. 0xffffffc0 in the image.
  797. .. _etype_intel_fsp:
  798. Entry: intel-fsp: Intel Firmware Support Package (FSP) file
  799. -----------------------------------------------------------
  800. Properties / Entry arguments:
  801. - filename: Filename of file to read into entry
  802. This file contains binary blobs which are used on some devices to make the
  803. platform work. U-Boot executes this code since it is not possible to set up
  804. the hardware using U-Boot open-source code. Documentation is typically not
  805. available in sufficient detail to allow this.
  806. An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
  807. See README.x86 for information about x86 binary blobs.
  808. .. _etype_intel_fsp_m:
  809. Entry: intel-fsp-m: Intel Firmware Support Package (FSP) memory init
  810. --------------------------------------------------------------------
  811. Properties / Entry arguments:
  812. - filename: Filename of file to read into entry
  813. This file contains a binary blob which is used on some devices to set up
  814. SDRAM. U-Boot executes this code in SPL so that it can make full use of
  815. memory. Documentation is typically not available in sufficient detail to
  816. allow U-Boot do this this itself..
  817. An example filename is 'fsp_m.bin'
  818. See README.x86 for information about x86 binary blobs.
  819. .. _etype_intel_fsp_s:
  820. Entry: intel-fsp-s: Intel Firmware Support Package (FSP) silicon init
  821. ---------------------------------------------------------------------
  822. Properties / Entry arguments:
  823. - filename: Filename of file to read into entry
  824. This file contains a binary blob which is used on some devices to set up
  825. the silicon. U-Boot executes this code in U-Boot proper after SDRAM is
  826. running, so that it can make full use of memory. Documentation is typically
  827. not available in sufficient detail to allow U-Boot do this this itself.
  828. An example filename is 'fsp_s.bin'
  829. See README.x86 for information about x86 binary blobs.
  830. .. _etype_intel_fsp_t:
  831. Entry: intel-fsp-t: Intel Firmware Support Package (FSP) temp ram init
  832. ----------------------------------------------------------------------
  833. Properties / Entry arguments:
  834. - filename: Filename of file to read into entry
  835. This file contains a binary blob which is used on some devices to set up
  836. temporary memory (Cache-as-RAM or CAR). U-Boot executes this code in TPL so
  837. that it has access to memory for its stack and initial storage.
  838. An example filename is 'fsp_t.bin'
  839. See README.x86 for information about x86 binary blobs.
  840. .. _etype_intel_ifwi:
  841. Entry: intel-ifwi: Intel Integrated Firmware Image (IFWI) file
  842. --------------------------------------------------------------
  843. Properties / Entry arguments:
  844. - filename: Filename of file to read into entry. This is either the
  845. IFWI file itself, or a file that can be converted into one using a
  846. tool
  847. - convert-fit: If present this indicates that the ifwitool should be
  848. used to convert the provided file into a IFWI.
  849. This file contains code and data used by the SoC that is required to make
  850. it work. It includes U-Boot TPL, microcode, things related to the CSE
  851. (Converged Security Engine, the microcontroller that loads all the firmware)
  852. and other items beyond the wit of man.
  853. A typical filename is 'ifwi.bin' for an IFWI file, or 'fitimage.bin' for a
  854. file that will be converted to an IFWI.
  855. The position of this entry is generally set by the intel-descriptor entry.
  856. The contents of the IFWI are specified by the subnodes of the IFWI node.
  857. Each subnode describes an entry which is placed into the IFWFI with a given
  858. sub-partition (and optional entry name).
  859. Properties for subnodes:
  860. - ifwi-subpart: sub-parition to put this entry into, e.g. "IBBP"
  861. - ifwi-entry: entry name t use, e.g. "IBBL"
  862. - ifwi-replace: if present, indicates that the item should be replaced
  863. in the IFWI. Otherwise it is added.
  864. See README.x86 for information about x86 binary blobs.
  865. .. _etype_intel_me:
  866. Entry: intel-me: Intel Management Engine (ME) file
  867. --------------------------------------------------
  868. Properties / Entry arguments:
  869. - filename: Filename of file to read into entry
  870. This file contains code used by the SoC that is required to make it work.
  871. The Management Engine is like a background task that runs things that are
  872. not clearly documented, but may include keyboard, display and network
  873. access. For platform that use ME it is not possible to disable it. U-Boot
  874. does not directly execute code in the ME binary.
  875. A typical filename is 'me.bin'.
  876. The position of this entry is generally set by the intel-descriptor entry.
  877. See README.x86 for information about x86 binary blobs.
  878. .. _etype_intel_mrc:
  879. Entry: intel-mrc: Intel Memory Reference Code (MRC) file
  880. --------------------------------------------------------
  881. Properties / Entry arguments:
  882. - filename: Filename of file to read into entry
  883. This file contains code for setting up the SDRAM on some Intel systems. This
  884. is executed by U-Boot when needed early during startup. A typical filename
  885. is 'mrc.bin'.
  886. See README.x86 for information about x86 binary blobs.
  887. .. _etype_intel_refcode:
  888. Entry: intel-refcode: Intel Reference Code file
  889. -----------------------------------------------
  890. Properties / Entry arguments:
  891. - filename: Filename of file to read into entry
  892. This file contains code for setting up the platform on some Intel systems.
  893. This is executed by U-Boot when needed early during startup. A typical
  894. filename is 'refcode.bin'.
  895. See README.x86 for information about x86 binary blobs.
  896. .. _etype_intel_vbt:
  897. Entry: intel-vbt: Intel Video BIOS Table (VBT) file
  898. ---------------------------------------------------
  899. Properties / Entry arguments:
  900. - filename: Filename of file to read into entry
  901. This file contains code that sets up the integrated graphics subsystem on
  902. some Intel SoCs. U-Boot executes this when the display is started up.
  903. See README.x86 for information about Intel binary blobs.
  904. .. _etype_intel_vga:
  905. Entry: intel-vga: Intel Video Graphics Adaptor (VGA) file
  906. ---------------------------------------------------------
  907. Properties / Entry arguments:
  908. - filename: Filename of file to read into entry
  909. This file contains code that sets up the integrated graphics subsystem on
  910. some Intel SoCs. U-Boot executes this when the display is started up.
  911. This is similar to the VBT file but in a different format.
  912. See README.x86 for information about Intel binary blobs.
  913. .. _etype_mkimage:
  914. Entry: mkimage: Binary produced by mkimage
  915. ------------------------------------------
  916. Properties / Entry arguments:
  917. - args: Arguments to pass
  918. - data-to-imagename: Indicates that the -d data should be passed in as
  919. the image name also (-n)
  920. - multiple-data-files: boolean to tell binman to pass all files as
  921. datafiles to mkimage instead of creating a temporary file the result
  922. of datafiles concatenation
  923. - filename: filename of output binary generated by mkimage
  924. The data passed to mkimage via the -d flag is collected from subnodes of the
  925. mkimage node, e.g.::
  926. mkimage {
  927. filename = "imximage.bin";
  928. args = "-n test -T imximage";
  929. u-boot-spl {
  930. };
  931. };
  932. This calls mkimage to create an imximage with `u-boot-spl.bin` as the data
  933. file, with mkimage being called like this::
  934. mkimage -d <data_file> -n test -T imximage <output_file>
  935. The output from mkimage then becomes part of the image produced by
  936. binman but also is written into `imximage.bin` file. If you need to put
  937. multiple things in the data file, you can use a section, or just multiple
  938. subnodes like this::
  939. mkimage {
  940. args = "-n test -T imximage";
  941. u-boot-spl {
  942. };
  943. u-boot-tpl {
  944. };
  945. };
  946. Note that binman places the contents (here SPL and TPL) into a single file
  947. and passes that to mkimage using the -d option.
  948. To pass all datafiles untouched to mkimage::
  949. mkimage {
  950. args = "-n rk3399 -T rkspi";
  951. multiple-data-files;
  952. u-boot-tpl {
  953. };
  954. u-boot-spl {
  955. };
  956. };
  957. This calls mkimage to create a Rockchip RK3399-specific first stage
  958. bootloader, made of TPL+SPL. Since this first stage bootloader requires to
  959. align the TPL and SPL but also some weird hacks that is handled by mkimage
  960. directly, binman is told to not perform the concatenation of datafiles prior
  961. to passing the data to mkimage.
  962. To use CONFIG options in the arguments, use a string list instead, as in
  963. this example which also produces four arguments::
  964. mkimage {
  965. args = "-n", CONFIG_SYS_SOC, "-T imximage";
  966. u-boot-spl {
  967. };
  968. };
  969. If you need to pass the input data in with the -n argument as well, then use
  970. the 'data-to-imagename' property::
  971. mkimage {
  972. args = "-T imximage";
  973. data-to-imagename;
  974. u-boot-spl {
  975. };
  976. };
  977. That will pass the data to mkimage both as the data file (with -d) and as
  978. the image name (with -n). In both cases, a filename is passed as the
  979. argument, with the actual data being in that file.
  980. If need to pass different data in with -n, then use an `imagename` subnode::
  981. mkimage {
  982. args = "-T imximage";
  983. imagename {
  984. blob {
  985. filename = "spl/u-boot-spl.cfgout"
  986. };
  987. };
  988. u-boot-spl {
  989. };
  990. };
  991. This will pass in u-boot-spl as the input data and the .cfgout file as the
  992. -n data.
  993. .. _etype_null:
  994. Entry: null: An entry which has no contents of its own
  995. ------------------------------------------------------
  996. Note that the size property must be set since otherwise this entry does not
  997. know how large it should be.
  998. The contents are set by the containing section, e.g. the section's pad
  999. byte.
  1000. .. _etype_opensbi:
  1001. Entry: opensbi: RISC-V OpenSBI fw_dynamic blob
  1002. ----------------------------------------------
  1003. Properties / Entry arguments:
  1004. - opensbi-path: Filename of file to read into entry. This is typically
  1005. called fw_dynamic.bin
  1006. This entry holds the run-time firmware, typically started by U-Boot SPL.
  1007. See the U-Boot README for your architecture or board for how to use it. See
  1008. https://github.com/riscv/opensbi for more information about OpenSBI.
  1009. .. _etype_powerpc_mpc85xx_bootpg_resetvec:
  1010. Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
  1011. -----------------------------------------------------------------------------------------
  1012. Properties / Entry arguments:
  1013. - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
  1014. This entry is valid for PowerPC mpc85xx cpus. This entry holds
  1015. 'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
  1016. placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
  1017. .. _etype_pre_load:
  1018. Entry: pre-load: Pre load image header
  1019. --------------------------------------
  1020. Properties / Entry arguments:
  1021. - pre-load-key-path: Path of the directory that store key (provided by
  1022. the environment variable PRE_LOAD_KEY_PATH)
  1023. - content: List of phandles to entries to sign
  1024. - algo-name: Hash and signature algo to use for the signature
  1025. - padding-name: Name of the padding (pkcs-1.5 or pss)
  1026. - key-name: Filename of the private key to sign
  1027. - header-size: Total size of the header
  1028. - version: Version of the header
  1029. This entry creates a pre-load header that contains a global
  1030. image signature.
  1031. For example, this creates an image with a pre-load header and a binary::
  1032. binman {
  1033. image2 {
  1034. filename = "sandbox.bin";
  1035. pre-load {
  1036. content = <&image>;
  1037. algo-name = "sha256,rsa2048";
  1038. padding-name = "pss";
  1039. key-name = "private.pem";
  1040. header-size = <4096>;
  1041. version = <1>;
  1042. };
  1043. image: blob-ext {
  1044. filename = "sandbox.itb";
  1045. };
  1046. };
  1047. };
  1048. .. _etype_rockchip_tpl:
  1049. Entry: rockchip-tpl: Rockchip TPL binary
  1050. ----------------------------------------
  1051. Properties / Entry arguments:
  1052. - rockchip-tpl-path: Filename of file to read into the entry,
  1053. typically <soc>_ddr_<version>.bin
  1054. This entry holds an external TPL binary used by some Rockchip SoCs
  1055. instead of normal U-Boot TPL, typically to initialize DRAM.
  1056. .. _etype_scp:
  1057. Entry: scp: System Control Processor (SCP) firmware blob
  1058. --------------------------------------------------------
  1059. Properties / Entry arguments:
  1060. - scp-path: Filename of file to read into the entry, typically scp.bin
  1061. This entry holds firmware for an external platform-specific coprocessor.
  1062. .. _etype_section:
  1063. Entry: section: Entry that contains other entries
  1064. -------------------------------------------------
  1065. A section is an entry which can contain other entries, thus allowing
  1066. hierarchical images to be created. See 'Sections and hierarchical images'
  1067. in the binman README for more information.
  1068. The base implementation simply joins the various entries together, using
  1069. various rules about alignment, etc.
  1070. Subclassing
  1071. ~~~~~~~~~~~
  1072. This class can be subclassed to support other file formats which hold
  1073. multiple entries, such as CBFS. To do this, override the following
  1074. functions. The documentation here describes what your function should do.
  1075. For example code, see etypes which subclass `Entry_section`, or `cbfs.py`
  1076. for a more involved example::
  1077. $ grep -l \(Entry_section tools/binman/etype/*.py
  1078. ReadNode()
  1079. Call `super().ReadNode()`, then read any special properties for the
  1080. section. Then call `self.ReadEntries()` to read the entries.
  1081. Binman calls this at the start when reading the image description.
  1082. ReadEntries()
  1083. Read in the subnodes of the section. This may involve creating entries
  1084. of a particular etype automatically, as well as reading any special
  1085. properties in the entries. For each entry, entry.ReadNode() should be
  1086. called, to read the basic entry properties. The properties should be
  1087. added to `self._entries[]`, in the correct order, with a suitable name.
  1088. Binman calls this at the start when reading the image description.
  1089. BuildSectionData(required)
  1090. Create the custom file format that you want and return it as bytes.
  1091. This likely sets up a file header, then loops through the entries,
  1092. adding them to the file. For each entry, call `entry.GetData()` to
  1093. obtain the data. If that returns None, and `required` is False, then
  1094. this method must give up and return None. But if `required` is True then
  1095. it should assume that all data is valid.
  1096. Binman calls this when packing the image, to find out the size of
  1097. everything. It is called again at the end when building the final image.
  1098. SetImagePos(image_pos):
  1099. Call `super().SetImagePos(image_pos)`, then set the `image_pos` values
  1100. for each of the entries. This should use the custom file format to find
  1101. the `start offset` (and `image_pos`) of each entry. If the file format
  1102. uses compression in such a way that there is no offset available (other
  1103. than reading the whole file and decompressing it), then the offsets for
  1104. affected entries can remain unset (`None`). The size should also be set
  1105. if possible.
  1106. Binman calls this after the image has been packed, to update the
  1107. location that all the entries ended up at.
  1108. ReadChildData(child, decomp, alt_format):
  1109. The default version of this may be good enough, if you are able to
  1110. implement SetImagePos() correctly. But that is a bit of a bypass, so
  1111. you can override this method to read from your custom file format. It
  1112. should read the entire entry containing the custom file using
  1113. `super().ReadData(True)`, then parse the file to get the data for the
  1114. given child, then return that data.
  1115. If your file format supports compression, the `decomp` argument tells
  1116. you whether to return the compressed data (`decomp` is False) or to
  1117. uncompress it first, then return the uncompressed data (`decomp` is
  1118. True). This is used by the `binman extract -U` option.
  1119. If your entry supports alternative formats, the alt_format provides the
  1120. alternative format that the user has selected. Your function should
  1121. return data in that format. This is used by the 'binman extract -l'
  1122. option.
  1123. Binman calls this when reading in an image, in order to populate all the
  1124. entries with the data from that image (`binman ls`).
  1125. WriteChildData(child):
  1126. Binman calls this after `child.data` is updated, to inform the custom
  1127. file format about this, in case it needs to do updates.
  1128. The default version of this does nothing and probably needs to be
  1129. overridden for the 'binman replace' command to work. Your version should
  1130. use `child.data` to update the data for that child in the custom file
  1131. format.
  1132. Binman calls this when updating an image that has been read in and in
  1133. particular to update the data for a particular entry (`binman replace`)
  1134. Properties / Entry arguments
  1135. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1136. See :ref:`develop/package/binman:Image description format` for more
  1137. information.
  1138. align-default
  1139. Default alignment for this section, if no alignment is given in the
  1140. entry
  1141. pad-byte
  1142. Pad byte to use when padding
  1143. sort-by-offset
  1144. True if entries should be sorted by offset, False if they must be
  1145. in-order in the device tree description
  1146. end-at-4gb
  1147. Used to build an x86 ROM which ends at 4GB (2^32)
  1148. name-prefix
  1149. Adds a prefix to the name of every entry in the section when writing out
  1150. the map
  1151. skip-at-start
  1152. Number of bytes before the first entry starts. These effectively adjust
  1153. the starting offset of entries. For example, if this is 16, then the
  1154. first entry would start at 16. An entry with offset = 20 would in fact
  1155. be written at offset 4 in the image file, since the first 16 bytes are
  1156. skipped when writing.
  1157. filename
  1158. filename to write the unpadded section contents to within the output
  1159. directory (None to skip this).
  1160. Since a section is also an entry, it inherits all the properies of entries
  1161. too.
  1162. Note that the `allow_missing` member controls whether this section permits
  1163. external blobs to be missing their contents. The option will produce an
  1164. image but of course it will not work. It is useful to make sure that
  1165. Continuous Integration systems can build without the binaries being
  1166. available. This is set by the `SetAllowMissing()` method, if
  1167. `--allow-missing` is passed to binman.
  1168. .. _etype_tee_os:
  1169. Entry: tee-os: Entry containing an OP-TEE Trusted OS (TEE) blob
  1170. ---------------------------------------------------------------
  1171. Properties / Entry arguments:
  1172. - tee-os-path: Filename of file to read into entry. This is typically
  1173. called tee.bin or tee.elf
  1174. This entry holds the run-time firmware, typically started by U-Boot SPL.
  1175. See the U-Boot README for your architecture or board for how to use it. See
  1176. https://github.com/OP-TEE/optee_os for more information about OP-TEE.
  1177. Note that if the file is in ELF format, it must go in a FIT. In that case,
  1178. this entry will mark itself as absent, providing the data only through the
  1179. read_elf_segments() method.
  1180. Marking this entry as absent means that it if is used in the wrong context
  1181. it can be automatically dropped. Thus it is possible to add an OP-TEE entry
  1182. like this::
  1183. binman {
  1184. tee-os {
  1185. };
  1186. };
  1187. and pass either an ELF or plain binary in with -a tee-os-path <filename>
  1188. and have binman do the right thing:
  1189. - include the entry if tee.bin is provided and it does NOT have the v1
  1190. header
  1191. - drop it otherwise
  1192. When used within a FIT, we can do::
  1193. binman {
  1194. fit {
  1195. tee-os {
  1196. };
  1197. };
  1198. };
  1199. which will split the ELF into separate nodes for each segment, if an ELF
  1200. file is provided (see :ref:`etype_fit`), or produce a single node if the
  1201. OP-TEE binary v1 format is provided (see optee_doc_) .
  1202. .. _optee_doc: https://optee.readthedocs.io/en/latest/architecture/core.html#partitioning-of-the-binary
  1203. .. _etype_text:
  1204. Entry: text: An entry which contains text
  1205. -----------------------------------------
  1206. The text can be provided either in the node itself or by a command-line
  1207. argument. There is a level of indirection to allow multiple text strings
  1208. and sharing of text.
  1209. Properties / Entry arguments:
  1210. text-label: The value of this string indicates the property / entry-arg
  1211. that contains the string to place in the entry
  1212. <xxx> (actual name is the value of text-label): contains the string to
  1213. place in the entry.
  1214. <text>: The text to place in the entry (overrides the above mechanism).
  1215. This is useful when the text is constant.
  1216. Example node::
  1217. text {
  1218. size = <50>;
  1219. text-label = "message";
  1220. };
  1221. You can then use:
  1222. binman -amessage="this is my message"
  1223. and binman will insert that string into the entry.
  1224. It is also possible to put the string directly in the node::
  1225. text {
  1226. size = <8>;
  1227. text-label = "message";
  1228. message = "a message directly in the node"
  1229. };
  1230. or just::
  1231. text {
  1232. size = <8>;
  1233. text = "some text directly in the node"
  1234. };
  1235. The text is not itself nul-terminated. This can be achieved, if required,
  1236. by setting the size of the entry to something larger than the text.
  1237. .. _etype_ti_board_config:
  1238. Entry: ti-board-config: An entry containing a TI schema validated board config binary
  1239. -------------------------------------------------------------------------------------
  1240. This etype supports generation of two kinds of board configuration
  1241. binaries: singular board config binary as well as combined board config
  1242. binary.
  1243. Properties / Entry arguments:
  1244. - config-file: File containing board configuration data in YAML
  1245. - schema-file: File containing board configuration YAML schema against
  1246. which the config file is validated
  1247. Output files:
  1248. - board config binary: File containing board configuration binary
  1249. These above parameters are used only when the generated binary is
  1250. intended to be a single board configuration binary. Example::
  1251. my-ti-board-config {
  1252. ti-board-config {
  1253. config = "board-config.yaml";
  1254. schema = "schema.yaml";
  1255. };
  1256. };
  1257. To generate a combined board configuration binary, we pack the
  1258. needed individual binaries into a ti-board-config binary. In this case,
  1259. the available supported subnode names are board-cfg, pm-cfg, sec-cfg and
  1260. rm-cfg. The final binary is prepended with a header containing details about
  1261. the included board config binaries. Example::
  1262. my-combined-ti-board-config {
  1263. ti-board-config {
  1264. board-cfg {
  1265. config = "board-cfg.yaml";
  1266. schema = "schema.yaml";
  1267. };
  1268. sec-cfg {
  1269. config = "sec-cfg.yaml";
  1270. schema = "schema.yaml";
  1271. };
  1272. }
  1273. }
  1274. .. _etype_ti_secure:
  1275. Entry: ti-secure: Entry containing a TI x509 certificate binary
  1276. ---------------------------------------------------------------
  1277. Properties / Entry arguments:
  1278. - content: List of phandles to entries to sign
  1279. - keyfile: Filename of file containing key to sign binary with
  1280. - sha: Hash function to be used for signing
  1281. Output files:
  1282. - input.<unique_name> - input file passed to openssl
  1283. - config.<unique_name> - input file generated for openssl (which is
  1284. used as the config file)
  1285. - cert.<unique_name> - output file generated by openssl (which is
  1286. used as the entry contents)
  1287. openssl signs the provided data, using the TI templated config file and
  1288. writes the signature in this entry. This allows verification that the
  1289. data is genuine.
  1290. .. _etype_ti_secure_rom:
  1291. Entry: ti-secure-rom: Entry containing a TI x509 certificate binary for images booted by ROM
  1292. --------------------------------------------------------------------------------------------
  1293. Properties / Entry arguments:
  1294. - keyfile: Filename of file containing key to sign binary with
  1295. - combined: boolean if device follows combined boot flow
  1296. - countersign: boolean if device contains countersigned system firmware
  1297. - load: load address of SPL
  1298. - sw-rev: software revision
  1299. - sha: Hash function to be used for signing
  1300. - core: core on which bootloader runs, valid cores are 'secure' and 'public'
  1301. - content: phandle of SPL in case of legacy bootflow or phandles of component binaries
  1302. in case of combined bootflow
  1303. The following properties are only for generating a combined bootflow binary:
  1304. - sysfw-inner-cert: boolean if binary contains sysfw inner certificate
  1305. - dm-data: boolean if binary contains dm-data binary
  1306. - content-sbl: phandle of SPL binary
  1307. - content-sysfw: phandle of sysfw binary
  1308. - content-sysfw-data: phandle of sysfw-data or tifs-data binary
  1309. - content-sysfw-inner-cert (optional): phandle of sysfw inner certificate binary
  1310. - content-dm-data (optional): phandle of dm-data binary
  1311. - load-sysfw: load address of sysfw binary
  1312. - load-sysfw-data: load address of sysfw-data or tifs-data binary
  1313. - load-sysfw-inner-cert (optional): load address of sysfw inner certificate binary
  1314. - load-dm-data (optional): load address of dm-data binary
  1315. Output files:
  1316. - input.<unique_name> - input file passed to openssl
  1317. - config.<unique_name> - input file generated for openssl (which is
  1318. used as the config file)
  1319. - cert.<unique_name> - output file generated by openssl (which is
  1320. used as the entry contents)
  1321. openssl signs the provided data, using the TI templated config file and
  1322. writes the signature in this entry. This allows verification that the
  1323. data is genuine.
  1324. .. _etype_u_boot:
  1325. Entry: u-boot: U-Boot flat binary
  1326. ---------------------------------
  1327. Properties / Entry arguments:
  1328. - filename: Filename of u-boot.bin (default 'u-boot.bin')
  1329. This is the U-Boot binary, containing relocation information to allow it
  1330. to relocate itself at runtime. The binary typically includes a device tree
  1331. blob at the end of it.
  1332. U-Boot can access binman symbols at runtime. See :ref:`binman_fdt`.
  1333. Note that this entry is automatically replaced with u-boot-expanded unless
  1334. --no-expanded is used or the node has a 'no-expanded' property.
  1335. .. _etype_u_boot_dtb:
  1336. Entry: u-boot-dtb: U-Boot device tree
  1337. -------------------------------------
  1338. Properties / Entry arguments:
  1339. - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
  1340. This is the U-Boot device tree, containing configuration information for
  1341. U-Boot. U-Boot needs this to know what devices are present and which drivers
  1342. to activate.
  1343. Note: This is mostly an internal entry type, used by others. This allows
  1344. binman to know which entries contain a device tree.
  1345. .. _etype_u_boot_dtb_with_ucode:
  1346. Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
  1347. -----------------------------------------------------------------------------------
  1348. Properties / Entry arguments:
  1349. - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
  1350. See Entry_u_boot_ucode for full details of the three entries involved in
  1351. this process. This entry provides the U-Boot device-tree file, which
  1352. contains the microcode. If the microcode is not being collated into one
  1353. place then the offset and size of the microcode is recorded by this entry,
  1354. for use by u-boot-with-ucode_ptr. If it is being collated, then this
  1355. entry deletes the microcode from the device tree (to save space) and makes
  1356. it available to u-boot-ucode.
  1357. .. _etype_u_boot_elf:
  1358. Entry: u-boot-elf: U-Boot ELF image
  1359. -----------------------------------
  1360. Properties / Entry arguments:
  1361. - filename: Filename of u-boot (default 'u-boot')
  1362. This is the U-Boot ELF image. It does not include a device tree but can be
  1363. relocated to any address for execution.
  1364. .. _etype_u_boot_env:
  1365. Entry: u-boot-env: An entry which contains a U-Boot environment
  1366. ---------------------------------------------------------------
  1367. Properties / Entry arguments:
  1368. - filename: File containing the environment text, with each line in the
  1369. form var=value
  1370. .. _etype_u_boot_expanded:
  1371. Entry: u-boot-expanded: U-Boot flat binary broken out into its component parts
  1372. ------------------------------------------------------------------------------
  1373. This is a section containing the U-Boot binary and a devicetree. Using this
  1374. entry type automatically creates this section, with the following entries
  1375. in it:
  1376. u-boot-nodtb
  1377. u-boot-dtb
  1378. Having the devicetree separate allows binman to update it in the final
  1379. image, so that the entries positions are provided to the running U-Boot.
  1380. .. _etype_u_boot_img:
  1381. Entry: u-boot-img: U-Boot legacy image
  1382. --------------------------------------
  1383. Properties / Entry arguments:
  1384. - filename: Filename of u-boot.img (default 'u-boot.img')
  1385. This is the U-Boot binary as a packaged image, in legacy format. It has a
  1386. header which allows it to be loaded at the correct address for execution.
  1387. You should use FIT (Flat Image Tree) instead of the legacy image for new
  1388. applications.
  1389. .. _etype_u_boot_nodtb:
  1390. Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
  1391. --------------------------------------------------------------------
  1392. Properties / Entry arguments:
  1393. - filename: Filename to include (default 'u-boot-nodtb.bin')
  1394. This is the U-Boot binary, containing relocation information to allow it
  1395. to relocate itself at runtime. It does not include a device tree blob at
  1396. the end of it so normally cannot work without it. You can add a u-boot-dtb
  1397. entry after this one, or use a u-boot entry instead, normally expands to a
  1398. section containing u-boot and u-boot-dtb
  1399. .. _etype_u_boot_spl:
  1400. Entry: u-boot-spl: U-Boot SPL binary
  1401. ------------------------------------
  1402. Properties / Entry arguments:
  1403. - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
  1404. This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
  1405. binary which loads before U-Boot proper, typically into on-chip SRAM. It is
  1406. responsible for locating, loading and jumping to U-Boot. Note that SPL is
  1407. not relocatable so must be loaded to the correct address in SRAM, or written
  1408. to run from the correct address if direct flash execution is possible (e.g.
  1409. on x86 devices).
  1410. SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1411. in the binman README for more information.
  1412. The ELF file 'spl/u-boot-spl' must also be available for this to work, since
  1413. binman uses that to look up symbols to write into the SPL binary.
  1414. Note that this entry is automatically replaced with u-boot-spl-expanded
  1415. unless --no-expanded is used or the node has a 'no-expanded' property.
  1416. .. _etype_u_boot_spl_bss_pad:
  1417. Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
  1418. ---------------------------------------------------------------------
  1419. Properties / Entry arguments:
  1420. None
  1421. This holds the padding added after the SPL binary to cover the BSS (Block
  1422. Started by Symbol) region. This region holds the various variables used by
  1423. SPL. It is set to 0 by SPL when it starts up. If you want to append data to
  1424. the SPL image (such as a device tree file), you must pad out the BSS region
  1425. to avoid the data overlapping with U-Boot variables. This entry is useful in
  1426. that case. It automatically pads out the entry size to cover both the code,
  1427. data and BSS.
  1428. The contents of this entry will a certain number of zero bytes, determined
  1429. by __bss_size
  1430. The ELF file 'spl/u-boot-spl' must also be available for this to work, since
  1431. binman uses that to look up the BSS address.
  1432. .. _etype_u_boot_spl_dtb:
  1433. Entry: u-boot-spl-dtb: U-Boot SPL device tree
  1434. ---------------------------------------------
  1435. Properties / Entry arguments:
  1436. - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
  1437. This is the SPL device tree, containing configuration information for
  1438. SPL. SPL needs this to know what devices are present and which drivers
  1439. to activate.
  1440. .. _etype_u_boot_spl_elf:
  1441. Entry: u-boot-spl-elf: U-Boot SPL ELF image
  1442. -------------------------------------------
  1443. Properties / Entry arguments:
  1444. - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
  1445. This is the U-Boot SPL ELF image. It does not include a device tree but can
  1446. be relocated to any address for execution.
  1447. .. _etype_u_boot_spl_expanded:
  1448. Entry: u-boot-spl-expanded: U-Boot SPL flat binary broken out into its component parts
  1449. --------------------------------------------------------------------------------------
  1450. Properties / Entry arguments:
  1451. - spl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
  1452. select)
  1453. This is a section containing the U-Boot binary, BSS padding if needed and a
  1454. devicetree. Using this entry type automatically creates this section, with
  1455. the following entries in it:
  1456. u-boot-spl-nodtb
  1457. u-boot-spl-bss-pad
  1458. u-boot-dtb
  1459. Having the devicetree separate allows binman to update it in the final
  1460. image, so that the entries positions are provided to the running U-Boot.
  1461. This entry is selected based on the value of the 'spl-dtb' entryarg. If
  1462. this is non-empty (and not 'n' or '0') then this expanded entry is selected.
  1463. .. _etype_u_boot_spl_nodtb:
  1464. Entry: u-boot-spl-nodtb: SPL binary without device tree appended
  1465. ----------------------------------------------------------------
  1466. Properties / Entry arguments:
  1467. - filename: Filename to include (default 'spl/u-boot-spl-nodtb.bin')
  1468. This is the U-Boot SPL binary, It does not include a device tree blob at
  1469. the end of it so may not be able to work without it, assuming SPL needs
  1470. a device tree to operate on your platform. You can add a u-boot-spl-dtb
  1471. entry after this one, or use a u-boot-spl entry instead' which normally
  1472. expands to a section containing u-boot-spl-dtb, u-boot-spl-bss-pad and
  1473. u-boot-spl-dtb
  1474. SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1475. in the binman README for more information.
  1476. The ELF file 'spl/u-boot-spl' must also be available for this to work, since
  1477. binman uses that to look up symbols to write into the SPL binary.
  1478. .. _etype_u_boot_spl_pubkey_dtb:
  1479. Entry: u-boot-spl-pubkey-dtb: U-Boot SPL device tree including public key
  1480. -------------------------------------------------------------------------
  1481. Properties / Entry arguments:
  1482. - key-name-hint: Public key name without extension (.crt).
  1483. Default is determined by underlying
  1484. bintool (fdt_add_pubkey), usually 'key'.
  1485. - algo: (Optional) Algorithm used for signing. Default is determined by
  1486. underlying bintool (fdt_add_pubkey), usually 'sha1,rsa2048'
  1487. - required: (Optional) If present this indicates that the key must be
  1488. verified for the image / configuration to be
  1489. considered valid
  1490. The following example shows an image containing an SPL which
  1491. is packed together with the dtb. Binman will add a signature
  1492. node to the dtb.
  1493. Example node::
  1494. image {
  1495. ...
  1496. spl {
  1497. filename = "spl.bin"
  1498. u-boot-spl-nodtb {
  1499. };
  1500. u-boot-spl-pubkey-dtb {
  1501. algo = "sha384,rsa4096";
  1502. required = "conf";
  1503. key-name-hint = "dev";
  1504. };
  1505. };
  1506. ...
  1507. }
  1508. .. _etype_u_boot_spl_with_ucode_ptr:
  1509. Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
  1510. ----------------------------------------------------------------------------
  1511. This is used when SPL must set up the microcode for U-Boot.
  1512. See Entry_u_boot_ucode for full details of the entries involved in this
  1513. process.
  1514. .. _etype_u_boot_tpl:
  1515. Entry: u-boot-tpl: U-Boot TPL binary
  1516. ------------------------------------
  1517. Properties / Entry arguments:
  1518. - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
  1519. This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
  1520. binary which loads before SPL, typically into on-chip SRAM. It is
  1521. responsible for locating, loading and jumping to SPL, the next-stage
  1522. loader. Note that SPL is not relocatable so must be loaded to the correct
  1523. address in SRAM, or written to run from the correct address if direct
  1524. flash execution is possible (e.g. on x86 devices).
  1525. SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1526. in the binman README for more information.
  1527. The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
  1528. binman uses that to look up symbols to write into the TPL binary.
  1529. Note that this entry is automatically replaced with u-boot-tpl-expanded
  1530. unless --no-expanded is used or the node has a 'no-expanded' property.
  1531. .. _etype_u_boot_tpl_bss_pad:
  1532. Entry: u-boot-tpl-bss-pad: U-Boot TPL binary padded with a BSS region
  1533. ---------------------------------------------------------------------
  1534. Properties / Entry arguments:
  1535. None
  1536. This holds the padding added after the TPL binary to cover the BSS (Block
  1537. Started by Symbol) region. This region holds the various variables used by
  1538. TPL. It is set to 0 by TPL when it starts up. If you want to append data to
  1539. the TPL image (such as a device tree file), you must pad out the BSS region
  1540. to avoid the data overlapping with U-Boot variables. This entry is useful in
  1541. that case. It automatically pads out the entry size to cover both the code,
  1542. data and BSS.
  1543. The contents of this entry will a certain number of zero bytes, determined
  1544. by __bss_size
  1545. The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
  1546. binman uses that to look up the BSS address.
  1547. .. _etype_u_boot_tpl_dtb:
  1548. Entry: u-boot-tpl-dtb: U-Boot TPL device tree
  1549. ---------------------------------------------
  1550. Properties / Entry arguments:
  1551. - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
  1552. This is the TPL device tree, containing configuration information for
  1553. TPL. TPL needs this to know what devices are present and which drivers
  1554. to activate.
  1555. .. _etype_u_boot_tpl_dtb_with_ucode:
  1556. Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
  1557. ----------------------------------------------------------------------------
  1558. This is used when TPL must set up the microcode for U-Boot.
  1559. See Entry_u_boot_ucode for full details of the entries involved in this
  1560. process.
  1561. .. _etype_u_boot_tpl_elf:
  1562. Entry: u-boot-tpl-elf: U-Boot TPL ELF image
  1563. -------------------------------------------
  1564. Properties / Entry arguments:
  1565. - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
  1566. This is the U-Boot TPL ELF image. It does not include a device tree but can
  1567. be relocated to any address for execution.
  1568. .. _etype_u_boot_tpl_expanded:
  1569. Entry: u-boot-tpl-expanded: U-Boot TPL flat binary broken out into its component parts
  1570. --------------------------------------------------------------------------------------
  1571. Properties / Entry arguments:
  1572. - tpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
  1573. select)
  1574. This is a section containing the U-Boot binary, BSS padding if needed and a
  1575. devicetree. Using this entry type automatically creates this section, with
  1576. the following entries in it:
  1577. u-boot-tpl-nodtb
  1578. u-boot-tpl-bss-pad
  1579. u-boot-dtb
  1580. Having the devicetree separate allows binman to update it in the final
  1581. image, so that the entries positions are provided to the running U-Boot.
  1582. This entry is selected based on the value of the 'tpl-dtb' entryarg. If
  1583. this is non-empty (and not 'n' or '0') then this expanded entry is selected.
  1584. .. _etype_u_boot_tpl_nodtb:
  1585. Entry: u-boot-tpl-nodtb: TPL binary without device tree appended
  1586. ----------------------------------------------------------------
  1587. Properties / Entry arguments:
  1588. - filename: Filename to include (default 'tpl/u-boot-tpl-nodtb.bin')
  1589. This is the U-Boot TPL binary, It does not include a device tree blob at
  1590. the end of it so may not be able to work without it, assuming TPL needs
  1591. a device tree to operate on your platform. You can add a u-boot-tpl-dtb
  1592. entry after this one, or use a u-boot-tpl entry instead, which normally
  1593. expands to a section containing u-boot-tpl-dtb, u-boot-tpl-bss-pad and
  1594. u-boot-tpl-dtb
  1595. TPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1596. in the binman README for more information.
  1597. The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
  1598. binman uses that to look up symbols to write into the TPL binary.
  1599. .. _etype_u_boot_tpl_with_ucode_ptr:
  1600. Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
  1601. ----------------------------------------------------------------------------
  1602. See Entry_u_boot_ucode for full details of the entries involved in this
  1603. process.
  1604. .. _etype_u_boot_ucode:
  1605. Entry: u-boot-ucode: U-Boot microcode block
  1606. -------------------------------------------
  1607. Properties / Entry arguments:
  1608. None
  1609. The contents of this entry are filled in automatically by other entries
  1610. which must also be in the image.
  1611. U-Boot on x86 needs a single block of microcode. This is collected from
  1612. the various microcode update nodes in the device tree. It is also unable
  1613. to read the microcode from the device tree on platforms that use FSP
  1614. (Firmware Support Package) binaries, because the API requires that the
  1615. microcode is supplied before there is any SRAM available to use (i.e.
  1616. the FSP sets up the SRAM / cache-as-RAM but does so in the call that
  1617. requires the microcode!). To keep things simple, all x86 platforms handle
  1618. microcode the same way in U-Boot (even non-FSP platforms). This is that
  1619. a table is placed at _dt_ucode_base_size containing the base address and
  1620. size of the microcode. This is either passed to the FSP (for FSP
  1621. platforms), or used to set up the microcode (for non-FSP platforms).
  1622. This all happens in the build system since it is the only way to get
  1623. the microcode into a single blob and accessible without SRAM.
  1624. There are two cases to handle. If there is only one microcode blob in
  1625. the device tree, then the ucode pointer it set to point to that. This
  1626. entry (u-boot-ucode) is empty. If there is more than one update, then
  1627. this entry holds the concatenation of all updates, and the device tree
  1628. entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
  1629. last step ensures that that the microcode appears in one contiguous
  1630. block in the image and is not unnecessarily duplicated in the device
  1631. tree. It is referred to as 'collation' here.
  1632. Entry types that have a part to play in handling microcode:
  1633. Entry_u_boot_with_ucode_ptr:
  1634. Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
  1635. It updates it with the address and size of the microcode so that
  1636. U-Boot can find it early on start-up.
  1637. Entry_u_boot_dtb_with_ucode:
  1638. Contains u-boot.dtb. It stores the microcode in a
  1639. 'self.ucode_data' property, which is then read by this class to
  1640. obtain the microcode if needed. If collation is performed, it
  1641. removes the microcode from the device tree.
  1642. Entry_u_boot_ucode:
  1643. This class. If collation is enabled it reads the microcode from
  1644. the Entry_u_boot_dtb_with_ucode entry, and uses it as the
  1645. contents of this entry.
  1646. .. _etype_u_boot_vpl:
  1647. Entry: u-boot-vpl: U-Boot VPL binary
  1648. ------------------------------------
  1649. Properties / Entry arguments:
  1650. - filename: Filename of u-boot-vpl.bin (default 'vpl/u-boot-vpl.bin')
  1651. This is the U-Boot VPL (Verifying Program Loader) binary. This is a small
  1652. binary which loads before SPL, typically into on-chip SRAM. It is
  1653. responsible for locating, loading and jumping to SPL, the next-stage
  1654. loader. Note that VPL is not relocatable so must be loaded to the correct
  1655. address in SRAM, or written to run from the correct address if direct
  1656. flash execution is possible (e.g. on x86 devices).
  1657. SPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1658. in the binman README for more information.
  1659. The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
  1660. binman uses that to look up symbols to write into the VPL binary.
  1661. .. _etype_u_boot_vpl_bss_pad:
  1662. Entry: u-boot-vpl-bss-pad: U-Boot VPL binary padded with a BSS region
  1663. ---------------------------------------------------------------------
  1664. Properties / Entry arguments:
  1665. None
  1666. This holds the padding added after the VPL binary to cover the BSS (Block
  1667. Started by Symbol) region. This region holds the various variables used by
  1668. VPL. It is set to 0 by VPL when it starts up. If you want to append data to
  1669. the VPL image (such as a device tree file), you must pad out the BSS region
  1670. to avoid the data overlapping with U-Boot variables. This entry is useful in
  1671. that case. It automatically pads out the entry size to cover both the code,
  1672. data and BSS.
  1673. The contents of this entry will a certain number of zero bytes, determined
  1674. by __bss_size
  1675. The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
  1676. binman uses that to look up the BSS address.
  1677. .. _etype_u_boot_vpl_dtb:
  1678. Entry: u-boot-vpl-dtb: U-Boot VPL device tree
  1679. ---------------------------------------------
  1680. Properties / Entry arguments:
  1681. - filename: Filename of u-boot.dtb (default 'vpl/u-boot-vpl.dtb')
  1682. This is the VPL device tree, containing configuration information for
  1683. VPL. VPL needs this to know what devices are present and which drivers
  1684. to activate.
  1685. .. _etype_u_boot_vpl_elf:
  1686. Entry: u-boot-vpl-elf: U-Boot VPL ELF image
  1687. -------------------------------------------
  1688. Properties / Entry arguments:
  1689. - filename: Filename of VPL u-boot (default 'vpl/u-boot-vpl')
  1690. This is the U-Boot VPL ELF image. It does not include a device tree but can
  1691. be relocated to any address for execution.
  1692. .. _etype_u_boot_vpl_expanded:
  1693. Entry: u-boot-vpl-expanded: U-Boot VPL flat binary broken out into its component parts
  1694. --------------------------------------------------------------------------------------
  1695. Properties / Entry arguments:
  1696. - vpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to
  1697. select)
  1698. This is a section containing the U-Boot binary, BSS padding if needed and a
  1699. devicetree. Using this entry type automatically creates this section, with
  1700. the following entries in it:
  1701. u-boot-vpl-nodtb
  1702. u-boot-vpl-bss-pad
  1703. u-boot-dtb
  1704. Having the devicetree separate allows binman to update it in the final
  1705. image, so that the entries positions are provided to the running U-Boot.
  1706. This entry is selected based on the value of the 'vpl-dtb' entryarg. If
  1707. this is non-empty (and not 'n' or '0') then this expanded entry is selected.
  1708. .. _etype_u_boot_vpl_nodtb:
  1709. Entry: u-boot-vpl-nodtb: VPL binary without device tree appended
  1710. ----------------------------------------------------------------
  1711. Properties / Entry arguments:
  1712. - filename: Filename to include (default 'vpl/u-boot-vpl-nodtb.bin')
  1713. This is the U-Boot VPL binary, It does not include a device tree blob at
  1714. the end of it so may not be able to work without it, assuming VPL needs
  1715. a device tree to operate on your platform. You can add a u_boot_vpl_dtb
  1716. entry after this one, or use a u_boot_vpl entry instead, which normally
  1717. expands to a section containing u-boot-vpl-dtb, u-boot-vpl-bss-pad and
  1718. u-boot-vpl-dtb
  1719. VPL can access binman symbols at runtime. See :ref:`binman_fdt`.
  1720. The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since
  1721. binman uses that to look up symbols to write into the VPL binary.
  1722. .. _etype_u_boot_with_ucode_ptr:
  1723. Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
  1724. --------------------------------------------------------------------
  1725. Properties / Entry arguments:
  1726. - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin')
  1727. - optional-ucode: boolean property to make microcode optional. If the
  1728. u-boot.bin image does not include microcode, no error will
  1729. be generated.
  1730. See Entry_u_boot_ucode for full details of the three entries involved in
  1731. this process. This entry updates U-Boot with the offset and size of the
  1732. microcode, to allow early x86 boot code to find it without doing anything
  1733. complicated. Otherwise it is the same as the u-boot entry.
  1734. .. _etype_vblock:
  1735. Entry: vblock: An entry which contains a Chromium OS verified boot block
  1736. ------------------------------------------------------------------------
  1737. Properties / Entry arguments:
  1738. - content: List of phandles to entries to sign
  1739. - keydir: Directory containing the public keys to use
  1740. - keyblock: Name of the key file to use (inside keydir)
  1741. - signprivate: Name of provide key file to use (inside keydir)
  1742. - version: Version number of the vblock (typically 1)
  1743. - kernelkey: Name of the kernel key to use (inside keydir)
  1744. - preamble-flags: Value of the vboot preamble flags (typically 0)
  1745. Output files:
  1746. - input.<unique_name> - input file passed to futility
  1747. - vblock.<unique_name> - output file generated by futility (which is
  1748. used as the entry contents)
  1749. Chromium OS signs the read-write firmware and kernel, writing the signature
  1750. in this block. This allows U-Boot to verify that the next firmware stage
  1751. and kernel are genuine.
  1752. .. _etype_x509_cert:
  1753. Entry: x509-cert: An entry which contains an X509 certificate
  1754. -------------------------------------------------------------
  1755. Properties / Entry arguments:
  1756. - content: List of phandles to entries to sign
  1757. Output files:
  1758. - input.<unique_name> - input file passed to openssl
  1759. - cert.<unique_name> - output file generated by openssl (which is
  1760. used as the entry contents)
  1761. openssl signs the provided data, writing the signature in this entry. This
  1762. allows verification that the data is genuine
  1763. .. _etype_x86_reset16:
  1764. Entry: x86-reset16: x86 16-bit reset code for U-Boot
  1765. ----------------------------------------------------
  1766. Properties / Entry arguments:
  1767. - filename: Filename of u-boot-x86-reset16.bin (default
  1768. 'u-boot-x86-reset16.bin')
  1769. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1770. must be placed at a particular address. This entry holds that code. It is
  1771. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  1772. for jumping to the x86-start16 code, which continues execution.
  1773. For 64-bit U-Boot, the 'x86_reset16_spl' entry type is used instead.
  1774. .. _etype_x86_reset16_spl:
  1775. Entry: x86-reset16-spl: x86 16-bit reset code for U-Boot
  1776. --------------------------------------------------------
  1777. Properties / Entry arguments:
  1778. - filename: Filename of u-boot-x86-reset16.bin (default
  1779. 'u-boot-x86-reset16.bin')
  1780. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1781. must be placed at a particular address. This entry holds that code. It is
  1782. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  1783. for jumping to the x86-start16 code, which continues execution.
  1784. For 32-bit U-Boot, the 'x86_reset_spl' entry type is used instead.
  1785. .. _etype_x86_reset16_tpl:
  1786. Entry: x86-reset16-tpl: x86 16-bit reset code for U-Boot
  1787. --------------------------------------------------------
  1788. Properties / Entry arguments:
  1789. - filename: Filename of u-boot-x86-reset16.bin (default
  1790. 'u-boot-x86-reset16.bin')
  1791. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1792. must be placed at a particular address. This entry holds that code. It is
  1793. typically placed at offset CONFIG_RESET_VEC_LOC. The code is responsible
  1794. for jumping to the x86-start16 code, which continues execution.
  1795. For 32-bit U-Boot, the 'x86_reset_tpl' entry type is used instead.
  1796. .. _etype_x86_start16:
  1797. Entry: x86-start16: x86 16-bit start-up code for U-Boot
  1798. -------------------------------------------------------
  1799. Properties / Entry arguments:
  1800. - filename: Filename of u-boot-x86-start16.bin (default
  1801. 'u-boot-x86-start16.bin')
  1802. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1803. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  1804. entry holds that code. It is typically placed at offset
  1805. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  1806. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  1807. U-Boot).
  1808. For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
  1809. .. _etype_x86_start16_spl:
  1810. Entry: x86-start16-spl: x86 16-bit start-up code for SPL
  1811. --------------------------------------------------------
  1812. Properties / Entry arguments:
  1813. - filename: Filename of spl/u-boot-x86-start16-spl.bin (default
  1814. 'spl/u-boot-x86-start16-spl.bin')
  1815. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1816. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  1817. entry holds that code. It is typically placed at offset
  1818. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  1819. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  1820. U-Boot).
  1821. For 32-bit U-Boot, the 'x86-start16' entry type is used instead.
  1822. .. _etype_x86_start16_tpl:
  1823. Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
  1824. --------------------------------------------------------
  1825. Properties / Entry arguments:
  1826. - filename: Filename of tpl/u-boot-x86-start16-tpl.bin (default
  1827. 'tpl/u-boot-x86-start16-tpl.bin')
  1828. x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
  1829. must be placed in the top 64KB of the ROM. The reset code jumps to it. This
  1830. entry holds that code. It is typically placed at offset
  1831. CONFIG_SYS_X86_START16. The code is responsible for changing to 32-bit mode
  1832. and jumping to U-Boot's entry point, which requires 32-bit mode (for 32-bit
  1833. U-Boot).
  1834. If TPL is not being used, the 'x86-start16-spl or 'x86-start16' entry types
  1835. may be used instead.
  1836. .. _etype_xilinx_bootgen:
  1837. Entry: xilinx-bootgen: Signed SPL boot image for Xilinx ZynqMP devices
  1838. ----------------------------------------------------------------------
  1839. Properties / Entry arguments:
  1840. - auth-params: (Optional) Authentication parameters passed to bootgen
  1841. - fsbl-config: (Optional) FSBL parameters passed to bootgen
  1842. - keysrc-enc: (Optional) Key source when using decryption engine
  1843. - pmufw-filename: Filename of PMU firmware. Default: pmu-firmware.elf
  1844. - psk-key-name-hint: Name of primary secret key to use for signing the
  1845. secondardy public key. Format: .pem file
  1846. - ssk-key-name-hint: Name of secondardy secret key to use for signing
  1847. the boot image. Format: .pem file
  1848. The etype is used to create a boot image for Xilinx ZynqMP
  1849. devices.
  1850. Information for signed images:
  1851. In AMD/Xilinx SoCs, two pairs of public and secret keys are used
  1852. - primary and secondary. The function of the primary public/secret key pair
  1853. is to authenticate the secondary public/secret key pair.
  1854. The function of the secondary key is to sign/verify the boot image. [1]
  1855. AMD/Xilinx uses the following terms for private/public keys [1]:
  1856. PSK = Primary Secret Key (Used to sign Secondary Public Key)
  1857. PPK = Primary Public Key (Used to verify Secondary Public Key)
  1858. SSK = Secondary Secret Key (Used to sign the boot image/partitions)
  1859. SPK = Used to verify the actual boot image
  1860. The following example builds a signed boot image. The fuses of
  1861. the primary public key (ppk) should be fused together with the RSA_EN flag.
  1862. Example node::
  1863. spl {
  1864. filename = "boot.signed.bin";
  1865. xilinx-bootgen {
  1866. psk-key-name-hint = "psk0";
  1867. ssk-key-name-hint = "ssk0";
  1868. auth-params = "ppk_select=0", "spk_id=0x00000000";
  1869. u-boot-spl-nodtb {
  1870. };
  1871. u-boot-spl-pubkey-dtb {
  1872. algo = "sha384,rsa4096";
  1873. required = "conf";
  1874. key-name-hint = "dev";
  1875. };
  1876. };
  1877. };
  1878. For testing purposes, e.g. if no RSA_EN should be fused, one could add
  1879. the "bh_auth_enable" flag in the fsbl-config field. This will skip the
  1880. verification of the ppk fuses and boot the image, even if ppk hash is
  1881. invalid.
  1882. Example node::
  1883. xilinx-bootgen {
  1884. psk-key-name-hint = "psk0";
  1885. psk-key-name-hint = "ssk0";
  1886. ...
  1887. fsbl-config = "bh_auth_enable";
  1888. ...
  1889. };
  1890. [1] https://docs.xilinx.com/r/en-US/ug1283-bootgen-user-guide/Using-Authentication