buildroot/docs/manual/how-buildroot-works.txt
Thomas De Schampheleire 77007ad950 manual/user guide: high-level restructuring
This patch performs some additional restructuring of the manual,
specifically in the User Guide. In detail:

- Rename 'Daily use' to 'General Buildroot usage'
- Move chapters 'make tips', 'Eclipse integration', and 'Advanced usage' as
  sections under the 'General Buildroot usage' chapter.
- Rename 'Details on Buildroot configuration' into 'Buildroot configuration'
- Rework the 'Customization' section as follows:
  - Move the short section on debugging the external toolchain wrapper into
    the rest of the explanation on external toolchains.
  - Remove the now redundant section on toolchains, as this is already
    explained in much more detail in the 'Buildroot configuration' chapter.
  - Move the sections on busybox/uclibc/kernel configuration from chapter
    'Customization' into a separate chapter 'Configuration of other
    components'.
  - Rename the remaining part of the original 'Customization' chapter into
    'Project-specific customization' and fold it together with the next
    chapter 'Storing the configuration'
- Remove the chapter 'Going further in Buildroot innards' thanks to:
  - Moving the chapter 'How Buildroot works' to the Developer guide.
  - Moving the 'Advanced Buildroot usage' section to the 'General Buildroot
    usage' chapter.
- Remove the chapter 'Hacking Buildroot' by:
  - Adding a reference to adding packages to the 'Project-specific
    customizations' chapter
  - Leaving out the explicit reference to creating board support, as this is
    part of the previous chapter already, so an extra reference is
    redundant.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-21 15:39:32 +02:00

70 lines
2.6 KiB
Plaintext

// -*- mode:doc; -*-
// vim: set syntax=asciidoc:
== How Buildroot works
As mentioned above, Buildroot is basically a set of Makefiles that
download, configure, and compile software with the correct options. It
also includes patches for various software packages - mainly the ones
involved in the cross-compilation toolchain (+gcc+, +binutils+ and
+uClibc+).
There is basically one Makefile per software package, and they are
named with the +.mk+ extension. Makefiles are split into many different
parts.
* The +toolchain/+ directory contains the Makefiles
and associated files for all software related to the
cross-compilation toolchain: +binutils+, +gcc+, +gdb+,
+kernel-headers+ and +uClibc+.
* The +arch/+ directory contains the definitions for all the processor
architectures that are supported by Buildroot.
* The +package/+ directory contains the Makefiles and
associated files for all user-space tools and libraries that Buildroot
can compile and add to the target root filesystem. There is one
sub-directory per package.
* The +linux/+ directory contains the Makefiles and associated files for
the Linux kernel.
* The +boot/+ directory contains the Makefiles and associated files for
the bootloaders supported by Buildroot.
* The +system/+ directory contains support for system integration, e.g.
the target filesystem skeleton and the selection of an init system.
* The +fs/+ directory contains the Makefiles and
associated files for software related to the generation of the
target root filesystem image.
Each directory contains at least 2 files:
* +something.mk+ is the Makefile that downloads, configures,
compiles and installs the package +something+.
* +Config.in+ is a part of the configuration tool
description file. It describes the options related to the
package.
The main Makefile performs the following steps (once the
configuration is done):
* Create all the output directories: +staging+, +target+, +build+,
etc. in the output directory (+output/+ by default,
another value can be specified using +O=+)
* Generate the toolchain target. When an internal toolchain is used, this
means generating the cross-compilation toolchain. When an external
toolchain is used, this means checking the features of the external
toolchain and importing it into the Buildroot environment.
* Generate all the targets listed in the +TARGETS+ variable. This
variable is filled by all the individual components'
Makefiles. Generating these targets will trigger the compilation of
the userspace packages (libraries, programs), the kernel, the
bootloader and the generation of the root filesystem images,
depending on the configuration.