bintools.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. Binman bintool Documentation
  3. ============================
  4. This file describes the bintools (binary tools) supported by binman. Bintools
  5. are binman's name for external executables that it runs to generate or process
  6. binaries. It is fairly easy to create new bintools. Just add a new file to the
  7. 'btool' directory. You can use existing bintools as examples.
  8. Bintool: bzip2: Compression/decompression using the bzip2 algorithm
  9. -------------------------------------------------------------------
  10. This bintool supports running `bzip2` to compress and decompress data, as
  11. used by binman.
  12. It is also possible to fetch the tool, which uses `apt` to install it.
  13. Documentation is available via::
  14. man bzip2
  15. Bintool: cbfstool: Coreboot filesystem (CBFS) tool
  16. --------------------------------------------------
  17. This bintool supports creating new CBFS images and adding files to an
  18. existing image, i.e. the features needed by binman.
  19. It also supports fetching a binary cbfstool, since building it from source
  20. is fairly slow.
  21. Documentation about CBFS is at https://www.coreboot.org/CBFS
  22. Bintool: fiptool: Image generation for ARM Trusted Firmware
  23. -----------------------------------------------------------
  24. This bintool supports running `fiptool` with some basic parameters as
  25. neeed by binman.
  26. It also supports build fiptool from source.
  27. fiptool provides a way to package firmware in an ARM Trusted Firmware
  28. Firmware Image Package (ATF FIP) format. It is used with Trusted Firmware A,
  29. for example.
  30. See `TF-A FIP tool documentation`_ for more information.
  31. .. _`TF-A FIP tool documentation`:
  32. https://trustedfirmware-a.readthedocs.io/en/latest/getting_started/tools-build.html?highlight=fiptool#building-and-using-the-fip-tool
  33. Bintool: futility: Handles the 'futility' tool
  34. ----------------------------------------------
  35. futility (flash utility) is a tool for working with Chromium OS flash
  36. images. This Bintool implements just the features used by Binman, related to
  37. GBB creation and firmware signing.
  38. A binary version of the tool can be fetched.
  39. See `Chromium OS vboot documentation`_ for more information.
  40. .. _`Chromium OS vboot documentation`:
  41. https://chromium.googlesource.com/chromiumos/platform/vboot/+/refs/heads/main/_vboot_reference/README
  42. Bintool: gzip: Compression/decompression using the gzip algorithm
  43. -----------------------------------------------------------------
  44. This bintool supports running `gzip` to compress and decompress data, as
  45. used by binman.
  46. It is also possible to fetch the tool, which uses `apt` to install it.
  47. Documentation is available via::
  48. man gzip
  49. Bintool: ifwitool: Handles the 'ifwitool' tool
  50. ----------------------------------------------
  51. This bintool supports running `ifwitool` with some basic parameters as
  52. neeed by binman. It includes creating a file from a FIT as well as adding,
  53. replacing, deleting and extracting subparts.
  54. The tool is built as part of U-Boot, but a binary version can be fetched if
  55. required.
  56. ifwitool provides a way to package firmware in an Intel Firmware Image
  57. (IFWI) file on some Intel SoCs, e.g. Apolo Lake.
  58. Bintool: lz4: Compression/decompression using the LZ4 algorithm
  59. ---------------------------------------------------------------
  60. This bintool supports running `lz4` to compress and decompress data, as
  61. used by binman.
  62. It is also possible to fetch the tool, which uses `apt` to install it.
  63. Documentation is available via::
  64. man lz4
  65. Bintool: lzma_alone: Compression/decompression using the LZMA algorithm
  66. -----------------------------------------------------------------------
  67. This bintool supports running `lzma_alone` to compress and decompress data,
  68. as used by binman.
  69. It is also possible to fetch the tool, which uses `apt` to install it.
  70. Documentation is available via::
  71. man lzma_alone
  72. Bintool: lzop: Compression/decompression using the lzop algorithm
  73. -----------------------------------------------------------------
  74. This bintool supports running `lzop` to compress and decompress data, as
  75. used by binman.
  76. It is also possible to fetch the tool, which uses `apt` to install it.
  77. Documentation is available via::
  78. man lzop
  79. Bintool: mkimage: Image generation for U-Boot
  80. ---------------------------------------------
  81. This bintool supports running `mkimage` with some basic parameters as
  82. neeed by binman.
  83. Normally binman uses the mkimage built by U-Boot. But when run outside the
  84. U-Boot build system, binman can use the version installed in your system.
  85. Support is provided for fetching this on Debian-like systems, using apt.
  86. Bintool: openssl: openssl tool
  87. ------------------------------
  88. This bintool supports creating new openssl certificates.
  89. It also supports fetching a binary openssl
  90. Documentation about openssl is at https://www.openssl.org/
  91. Bintool: xz: Compression/decompression using the xz algorithm
  92. -------------------------------------------------------------
  93. This bintool supports running `xz` to compress and decompress data, as
  94. used by binman.
  95. It is also possible to fetch the tool, which uses `apt` to install it.
  96. Documentation is available via::
  97. man xz
  98. Bintool: zstd: Compression/decompression using the zstd algorithm
  99. -----------------------------------------------------------------
  100. This bintool supports running `zstd` to compress and decompress data, as
  101. used by binman.
  102. It is also possible to fetch the tool, which uses `apt` to install it.
  103. Documentation is available via::
  104. man zstd
  105. Bintool: fdt_add_pubkey: Add public key to device tree
  106. ------------------------------------------------------
  107. This bintool supports running `fdt_add_pubkey` in order to add a public
  108. key coming from a certificate to a device-tree.
  109. Normally signing is done using `mkimage` in context of `binman sign`. However,
  110. in this process the public key is not added to the stage before u-boot proper.
  111. Using `fdt_add_pubkey` the key can be injected to the SPL independent of
  112. `mkimage`
  113. Bintool: bootgen: Sign ZynqMP FSBL image
  114. ----------------------------------------
  115. This bintool supports running `bootgen` in order to sign a SPL for ZynqMP
  116. devices.
  117. The bintool automatically creates an appropriate input image file (.bif) for
  118. bootgen based on the passed arguments. The output is a bootable,
  119. authenticated `boot.bin` file.