2 // vim: set syntax=asciidoc:
6 As mentioned above, Buildroot is basically a set of Makefiles that
7 download, configure, and compile software with the correct options. It
8 also includes patches for various software packages - mainly the ones
9 involved in the cross-compilation toolchain (+gcc+, +binutils+ and
12 There is basically one Makefile per software package, and they are
13 named with the +.mk+ extension. Makefiles are split into many different
16 * The +toolchain/+ directory contains the Makefiles
17 and associated files for all software related to the
18 cross-compilation toolchain: +binutils+, +gcc+, +gdb+,
19 +kernel-headers+ and +uClibc+.
21 * The +arch/+ directory contains the definitions for all the processor
22 architectures that are supported by Buildroot.
24 * The +package/+ directory contains the Makefiles and
25 associated files for all user-space tools and libraries that Buildroot
26 can compile and add to the target root filesystem. There is one
27 sub-directory per package.
29 * The +linux/+ directory contains the Makefiles and associated files for
32 * The +boot/+ directory contains the Makefiles and associated files for
33 the bootloaders supported by Buildroot.
35 * The +system/+ directory contains support for system integration, e.g.
36 the target filesystem skeleton and the selection of an init system.
38 * The +fs/+ directory contains the Makefiles and
39 associated files for software related to the generation of the
40 target root filesystem image.
42 Each directory contains at least 2 files:
44 * +something.mk+ is the Makefile that downloads, configures,
45 compiles and installs the package +something+.
47 * +Config.in+ is a part of the configuration tool
48 description file. It describes the options related to the
51 The main Makefile performs the following steps (once the
52 configuration is done):
54 * Create all the output directories: +staging+, +target+, +build+,
55 etc. in the output directory (+output/+ by default,
56 another value can be specified using +O=+)
58 * Generate the toolchain target. When an internal toolchain is used, this
59 means generating the cross-compilation toolchain. When an external
60 toolchain is used, this means checking the features of the external
61 toolchain and importing it into the Buildroot environment.
63 * Generate all the targets listed in the +TARGETS+ variable. This
64 variable is filled by all the individual components'
65 Makefiles. Generating these targets will trigger the compilation of
66 the userspace packages (libraries, programs), the kernel, the
67 bootloader and the generation of the root filesystem images,
68 depending on the configuration.