blob: ec0172292585e55bf0620bcc717b46ae17a8b0f3 [file] [log] [blame]
Bin Mengbcb78a02019-10-27 05:19:45 -07001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Bin Meng <bmeng.cn@gmail.com>
3
4Host tools
5==========
6
7Building tools for Linux
8------------------------
9
10To allow distributions to distribute all possible tools in a generic way,
11avoiding the need of specific tools building for each machine, a tools only
12defconfig file is provided.
13
14Using this, we can build the tools by doing::
15
16 $ make tools-only_defconfig
17 $ make tools-only
18
19Building tools for Windows
20--------------------------
21If you wish to generate Windows versions of the utilities in the tools directory
22you can use MSYS2, a software distro and building platform for Windows.
23
24Download the MSYS2 installer from https://www.msys2.org. Make sure you have
25installed all required packages below in order to build these host tools::
26
27 * gcc (9.1.0)
28 * make (4.2.1)
29 * bison (3.4.2)
30 * diffutils (3.7)
31 * openssl-devel (1.1.1.d)
32
33Note the version numbers in these parentheses above are the package versions
34at the time being when writing this document. The MSYS2 installer tested is
35http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe.
36
37There are 3 MSYS subsystems installed: MSYS2, MinGW32 and MinGW64. Each
38subsystem provides an environment to build Windows applications. The MSYS2
39environment is for building POSIX compliant software on Windows using an
40emulation layer. The MinGW32/64 subsystems are for building native Windows
41applications using a linux toolchain (gcc, bash, etc), targeting respectively
4232 and 64 bit Windows.
43
44Launch the MSYS2 shell of the MSYS2 environment, and do the following::
45
46 $ make tools-only_defconfig
Tom Riniea79bb72022-11-19 18:45:43 -050047 $ make tools-only