manual/getting started: rework 'Using Buildroot' section

This patch does some general rewording of the 'Using buildroot' section
of the manual.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas De Schampheleire 2014-08-12 22:20:13 +02:00 committed by Thomas Petazzoni
parent afdd5cebe2
commit 607bd1a1bd

View File

@ -3,67 +3,73 @@
== Using Buildroot == Using Buildroot
*Important*: you can and should *build everything as a normal user*. There
is no need to be root to configure and use Buildroot. By running all
commands as a regular user, you protect your system against packages
behaving badly during compilation and installation.
The first step when using Buildroot is to create a configuration.
Buildroot has a nice configuration tool similar to the one you can Buildroot has a nice configuration tool similar to the one you can
find in the http://www.kernel.org/[Linux kernel] or in find in the http://www.kernel.org/[Linux kernel] or in
http://www.busybox.net/[BusyBox]. Note that you can *and should build http://www.busybox.net/[BusyBox].
everything as a normal user*. There is no need to be root to configure
and use Buildroot. The first step is to run the configuration From the buildroot directory, run
assistant:
-------------------- --------------------
$ make menuconfig $ make menuconfig
-------------------- --------------------
or for the original curses-based configurator, or
-------------------- --------------------
$ make nconfig $ make nconfig
-------------------- --------------------
to run the old or new curses-based configurator, or for the new curses-based configurator, or
-------------------- --------------------
$ make xconfig $ make xconfig
-------------------- --------------------
or for the Qt-based configurator, or
-------------------- --------------------
$ make gconfig $ make gconfig
-------------------- --------------------
to run the Qt or GTK-based configurators. for the GTK-based configurator.
All of these "make" commands will need to build a configuration All of these "make" commands will need to build a configuration
utility (including the interface), so you may need to install utility (including the interface), so you may need to install
"development" packages for relevant libraries used by the "development" packages for relevant libraries used by the
configuration utilities. Check xref:requirement[] to know what configuration utilities. Refer to xref:requirement[] for more details,
Buildroot needs, and specifically the xref:requirement-optional[optional requirements] specifically the xref:requirement-optional[optional requirements]
to get the dependencies of your favorite interface. to get the dependencies of your favorite interface.
For each menu entry in the configuration tool, you can find associated For each menu entry in the configuration tool, you can find associated
help that describes the purpose of the entry. help that describes the purpose of the entry.
Once everything is configured, the configuration tool generates a Once everything is configured, the configuration tool generates a
+.config+ file that contains the description of your +.config+ file that contains the entire configuration. This file will be
configuration. It will be used by the Makefiles to do what's needed. read by the top-level Makefile.
Let's go: To start the build process, simply run:
-------------------- --------------------
$ make $ make
-------------------- --------------------
You *should never* use +make -jN+ with Buildroot: it does not support You *should never* use +make -jN+ with Buildroot: top-level parallel
'top-level parallel make'. Instead, use the +BR2_JLEVEL+ option to make is currently not supported. Instead, use the +BR2_JLEVEL+ option
tell Buildroot to run each package compilation with +make -jN+. to tell Buildroot to run the compilation of each individual package
with +make -jN+.
The `make` command will generally perform the following steps: The `make` command will generally perform the following steps:
* download source files (as required); * download source files (as required);
* configure, build and install the cross-compiling toolchain using the * configure, build and install the cross-compilation toolchain, or
appropriate toolchain backend, or simply import an external toolchain; simply import an external toolchain;
* build/install selected target packages; * configure, build and install selected target packages;
* build a kernel image, if selected; * build a kernel image, if selected;
* build a bootloader image, if selected; * build a bootloader image, if selected;
* create a root filesystem in selected formats. * create a root filesystem in selected formats.
@ -72,15 +78,16 @@ Buildroot output is stored in a single directory, +output/+.
This directory contains several subdirectories: This directory contains several subdirectories:
* +images/+ where all the images (kernel image, bootloader and root * +images/+ where all the images (kernel image, bootloader and root
filesystem images) are stored. filesystem images) are stored. These are the files you need to put
on your target system.
* +build/+ where all the components are built * +build/+ where all the components are built (this includes tools
(this includes tools needed to run Buildroot on needed by Buildroot on the host and packages compiled for the
the host and packages compiled for the target). The +build/+ target). This directory contains one subdirectory for each of these
directory contains one subdirectory for each of these components. components.
* +staging/+ which contains a hierarchy similar to a root filesystem * +staging/+ which contains a hierarchy similar to a root filesystem
hierarchy. This directory contains the installation of the hierarchy. This directory contains the headers and libraries of the
cross-compilation toolchain and all the userspace packages selected cross-compilation toolchain and all the userspace packages selected
for the target. However, this directory is 'not' intended to be for the target. However, this directory is 'not' intended to be
the root filesystem for the target: it contains a lot of development the root filesystem for the target: it contains a lot of development
@ -109,7 +116,7 @@ This directory contains several subdirectories:
These commands, +make menuconfig|nconfig|gconfig|xconfig+ and +make+, are the These commands, +make menuconfig|nconfig|gconfig|xconfig+ and +make+, are the
basic ones that allow to easily and quickly generate images fitting basic ones that allow to easily and quickly generate images fitting
your needs, with all the supports and applications you enabled. your needs, with all the features and applications you enabled.
More details about the "make" command usage are given in More details about the "make" command usage are given in
xref:make-tips[]. xref:make-tips[].