blob: 1336f4d0115257f00ea3f1a778fa0ebf7ec15b54 [file] [log] [blame]
Simon Glass3e7749e2022-01-09 20:14:12 -07001.. SPDX-License-Identifier: GPL-2.0+
2
3Binman bintool Documentation
4============================
5
6This file describes the bintools (binary tools) supported by binman. Bintools
7are binman's name for external executables that it runs to generate or process
8binaries. It is fairly easy to create new bintools. Just add a new file to the
9'btool' directory. You can use existing bintools as examples.
10
11
12
Simon Glassfbb0e482023-02-22 12:14:46 -070013Bintool: bzip2: Compression/decompression using the bzip2 algorithm
14-------------------------------------------------------------------
15
16This bintool supports running `bzip2` to compress and decompress data, as
17used by binman.
18
19It is also possible to fetch the tool, which uses `apt` to install it.
20
21Documentation is available via::
22
23 man bzip2
24
25
26
Simon Glass3e7749e2022-01-09 20:14:12 -070027Bintool: cbfstool: Coreboot filesystem (CBFS) tool
28--------------------------------------------------
29
30This bintool supports creating new CBFS images and adding files to an
31existing image, i.e. the features needed by binman.
32
33It also supports fetching a binary cbfstool, since building it from source
34is fairly slow.
35
36Documentation about CBFS is at https://www.coreboot.org/CBFS
37
38
39
40Bintool: fiptool: Image generation for ARM Trusted Firmware
41-----------------------------------------------------------
42
43This bintool supports running `fiptool` with some basic parameters as
44neeed by binman.
45
46It also supports build fiptool from source.
47
48fiptool provides a way to package firmware in an ARM Trusted Firmware
49Firmware Image Package (ATF FIP) format. It is used with Trusted Firmware A,
50for example.
51
52See `TF-A FIP tool documentation`_ for more information.
53
54.. _`TF-A FIP tool documentation`:
55 https://trustedfirmware-a.readthedocs.io/en/latest/getting_started/tools-build.html?highlight=fiptool#building-and-using-the-fip-tool
56
57
58
59Bintool: futility: Handles the 'futility' tool
60----------------------------------------------
61
62futility (flash utility) is a tool for working with Chromium OS flash
63images. This Bintool implements just the features used by Binman, related to
64GBB creation and firmware signing.
65
66A binary version of the tool can be fetched.
67
68See `Chromium OS vboot documentation`_ for more information.
69
70.. _`Chromium OS vboot documentation`:
71 https://chromium.googlesource.com/chromiumos/platform/vboot/+/refs/heads/main/_vboot_reference/README
72
73
74
Simon Glassfbb0e482023-02-22 12:14:46 -070075Bintool: gzip: Compression/decompression using the gzip algorithm
76-----------------------------------------------------------------
77
78This bintool supports running `gzip` to compress and decompress data, as
79used by binman.
80
81It is also possible to fetch the tool, which uses `apt` to install it.
82
83Documentation is available via::
84
85 man gzip
86
87
88
Simon Glass3e7749e2022-01-09 20:14:12 -070089Bintool: ifwitool: Handles the 'ifwitool' tool
90----------------------------------------------
91
92This bintool supports running `ifwitool` with some basic parameters as
93neeed by binman. It includes creating a file from a FIT as well as adding,
94replacing, deleting and extracting subparts.
95
96The tool is built as part of U-Boot, but a binary version can be fetched if
97required.
98
99ifwitool provides a way to package firmware in an Intel Firmware Image
100(IFWI) file on some Intel SoCs, e.g. Apolo Lake.
101
102
103
104Bintool: lz4: Compression/decompression using the LZ4 algorithm
105---------------------------------------------------------------
106
107This bintool supports running `lz4` to compress and decompress data, as
108used by binman.
109
110It is also possible to fetch the tool, which uses `apt` to install it.
111
112Documentation is available via::
113
114 man lz4
115
116
117
118Bintool: lzma_alone: Compression/decompression using the LZMA algorithm
119-----------------------------------------------------------------------
120
121This bintool supports running `lzma_alone` to compress and decompress data,
122as used by binman.
123
124It is also possible to fetch the tool, which uses `apt` to install it.
125
126Documentation is available via::
127
128 man lzma_alone
129
130
131
Simon Glassfbb0e482023-02-22 12:14:46 -0700132Bintool: lzop: Compression/decompression using the lzop algorithm
133-----------------------------------------------------------------
134
135This bintool supports running `lzop` to compress and decompress data, as
136used by binman.
137
138It is also possible to fetch the tool, which uses `apt` to install it.
139
140Documentation is available via::
141
142 man lzop
143
144
145
Simon Glass3e7749e2022-01-09 20:14:12 -0700146Bintool: mkimage: Image generation for U-Boot
147---------------------------------------------
148
149This bintool supports running `mkimage` with some basic parameters as
150neeed by binman.
151
152Normally binman uses the mkimage built by U-Boot. But when run outside the
153U-Boot build system, binman can use the version installed in your system.
154Support is provided for fetching this on Debian-like systems, using apt.
155
156
157
Simon Glassdf11aa72023-07-24 09:20:00 -0600158Bintool: openssl: openssl tool
159------------------------------
160
161This bintool supports creating new openssl certificates.
162
163It also supports fetching a binary openssl
164
165Documentation about openssl is at https://www.openssl.org/
166
167
168
Simon Glassfbb0e482023-02-22 12:14:46 -0700169Bintool: xz: Compression/decompression using the xz algorithm
170-------------------------------------------------------------
171
172This bintool supports running `xz` to compress and decompress data, as
173used by binman.
174
175It is also possible to fetch the tool, which uses `apt` to install it.
176
177Documentation is available via::
178
179 man xz
180
181
182
183Bintool: zstd: Compression/decompression using the zstd algorithm
184-----------------------------------------------------------------
185
186This bintool supports running `zstd` to compress and decompress data, as
187used by binman.
188
189It is also possible to fetch the tool, which uses `apt` to install it.
190
191Documentation is available via::
192
193 man zstd
194
195
196
Lukas Funkec76831d2023-07-18 13:53:12 +0200197Bintool: fdt_add_pubkey: Add public key to device tree
198------------------------------------------------------
199
200This bintool supports running `fdt_add_pubkey` in order to add a public
201key coming from a certificate to a device-tree.
202
203Normally signing is done using `mkimage` in context of `binman sign`. However,
204in this process the public key is not added to the stage before u-boot proper.
205Using `fdt_add_pubkey` the key can be injected to the SPL independent of
206`mkimage`
Lukas Funke6cb64252023-07-18 13:53:16 +0200207
208
209
210Bintool: bootgen: Sign ZynqMP FSBL image
Lukas Funke7f51fe52023-08-03 17:22:13 +0200211----------------------------------------
Lukas Funke6cb64252023-07-18 13:53:16 +0200212
213This bintool supports running `bootgen` in order to sign a SPL for ZynqMP
214devices.
215
216The bintool automatically creates an appropriate input image file (.bif) for
217bootgen based on the passed arguments. The output is a bootable,
218authenticated `boot.bin` file.