From patchwork Tue Mar 20 23:09:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 147857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 97DE7B6EEA for ; Wed, 21 Mar 2012 10:11:30 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4F04B1011C3; Tue, 20 Mar 2012 23:11:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yyiKAzzSqxKJ; Tue, 20 Mar 2012 23:11:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 84524100DB4; Tue, 20 Mar 2012 23:10:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C9BAE8F75B for ; Tue, 20 Mar 2012 23:10:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B54098D0AC for ; Tue, 20 Mar 2012 23:10:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yrzhj7LVI97s for ; Tue, 20 Mar 2012 23:10:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6E0E88D0AB for ; Tue, 20 Mar 2012 23:10:50 +0000 (UTC) Received: by wibhr17 with SMTP id hr17so694410wib.10 for ; Tue, 20 Mar 2012 16:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KMCIwW7P0GqhP97g57ufSnX9e7zWQRl3io9COxikW88=; b=0EISgjFX39fmQpoVt8u3kbTIgLXoK/Bm5dn0NwqbOIl2jD7iyPM8R8y+Lp/HbRlBIk ggJv1gCQU680u6pEvC4xxK9Bkg6ZE9FRuyHFqN7PTVL3ia5n9ajCfO8/yzQxcSSlJEqL FpI5oyaXMB1GXTxnYDLkSfIkyYcm8S9/EGAvqqKbJqAm/U5I6y0T0didgGeWTmoX4Ui2 e0SuNp4rPgh4z9kyEl4Ot2E4VSp1RQUuve2W0ngtVjZg1+uHOWPC00crEA/Y4Zj7pmGR 27rgc28Ns0sCSvwIqIo3whu83246EMVDDKyYnBVq19IXIIKB2+U2spfeiPxpySWHWO0D qCpA== Received: by 10.180.104.65 with SMTP id gc1mr3745429wib.13.1332285049038; Tue, 20 Mar 2012 16:10:49 -0700 (PDT) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPS id fz9sm37727837wib.3.2012.03.20.16.10.47 (version=SSLv3 cipher=OTHER); Tue, 20 Mar 2012 16:10:48 -0700 (PDT) From: Samuel MARTIN To: buildroot@busybox.net Date: Wed, 21 Mar 2012 00:09:52 +0100 Message-Id: <1332285001-12881-3-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.7.9.4 In-Reply-To: <1332285001-12881-1-git-send-email-s.martin49@gmail.com> References: <1332285001-12881-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH 02/11] manual: rework introduction.txt and update embedded-basics.txt X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Split and rephrasing of introduction.txt. Cross-toolchain and pro-Buildroot explainations moved from introduction.txt into embedded-basics.txt. Signed-off-by: Samuel MARTIN --- docs/manual/embedded-basics.txt | 65 ++++++++++++++++++++++++++++++++++ docs/manual/introduction.txt | 74 +++++++-------------------------------- 2 files changed, 78 insertions(+), 61 deletions(-) diff --git a/docs/manual/embedded-basics.txt b/docs/manual/embedded-basics.txt index e1c66e3..bf14d7c 100644 --- a/docs/manual/embedded-basics.txt +++ b/docs/manual/embedded-basics.txt @@ -1,2 +1,67 @@ Embedded system basics & Reasons to use Buildroot ------------------------------------------------- + +Cross-compilation & cross-toolchain +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A compilation toolchain is the set of tools that allows you to compile +code for your system. It consists of a compiler (in our case, +gcc+), +binary utils like assembler and linker (in our case, +binutils+) and a +C standard library (for example +http://www.gnu.org/software/libc/libc.html[GNU Libc], +http://www.uclibc.org/[uClibc] or +http://www.fefe.de/dietlibc/[dietlibc]). The system installed on your +development station certainly already has a compilation toolchain that +you can use to compile an application that runs on your system. If +you're using a PC, your compilation toolchain runs on an x86 processor +and generates code for an x86 processor. Under most Linux systems, the +compilation toolchain uses the GNU libc (glibc) as the C standard +library. This compilation toolchain is called the "host compilation +toolchain". The machine on which it is running, and on which you're +working, is called the "host system". The compilation toolchain is +provided by your distribution, and Buildroot has nothing to do with it +(other than using it to build a cross-compilation toolchain and other +tools that are run on the development host). + +As said above, the compilation toolchain that comes with your system +runs on and generates code for the processor in your host system. As +your embedded system has a different processor, you need a +cross-compilation toolchain - a compilation toolchain that runs on +your host system but generates code for your target system (and target +processor). For example, if your host system uses x86 and your target +system uses ARM, the regular compilation toolchain on your host runs on +x86 and generates code for x86, while the cross-compilation toolchain +runs on x86 and generates code for ARM. + +[[pros-buildroot]] + +Why choose Buildroot +~~~~~~~~~~~~~~~~~~~~ + +Even if your embedded system uses an x86 processor, you might be +interested in Buildroot for two reasons: + +* The compilation toolchain on your host certainly uses the GNU Libc + which is a complete but huge C standard library. Instead of using + GNU Libc on your target system, you can use uClibc which is a tiny C + standard library. If you want to use this C library, then you need a + compilation toolchain to generate binaries linked with it. Buildroot + can do that for you. + +* Buildroot automates the building of a root filesystem with all + needed tools like busybox. That makes it much easier than doing it + by hand. + +You might wonder why such a tool is needed when you can compile +gcc+, ++binutils+, +uClibc+ and all the other tools by hand. Of course doing +so is possible but, dealing with all of the configure options and +problems of every +gcc+ or +binutils+ version is very time-consuming +and uninteresting. Buildroot automates this process through the use +of Makefiles and has a collection of patches for each +gcc+ and ++binutils+ version to make them work on most architectures. + +Moreover, Buildroot provides an infrastructure for reproducing the +build process of your kernel, cross-toolchain, and embedded root +filesystem. Being able to reproduce the build process will be useful +when a component needs to be patched or updated or when another person +is supposed to take over the project. diff --git a/docs/manual/introduction.txt b/docs/manual/introduction.txt index 476ce25..e330674 100644 --- a/docs/manual/introduction.txt +++ b/docs/manual/introduction.txt @@ -1,69 +1,21 @@ About Buildroot =============== -Buildroot is a set of Makefiles and patches that allows you to easily -generate a cross-compilation toolchain, a root filesystem and a Linux -kernel image for your target. Buildroot can be used for one, two or -all of these options, independently. - -Buildroot is useful mainly for people working with embedded systems. +Buildroot provides a full featured environment for cross-development. +Buildroot is able to generate a cross-compilation toolchain, a root +filesystem, a Linux kernel image and a bootloader for your target. +Buildroot can be used for any combinaison of these options, +independently. + +Buildroot is useful mainly for people working with embedded systems +for a number of good reasons (see xref:pros-buildroot[]). Embedded systems often use processors that are not the regular x86 processors everyone is used to having in his PC. They can be PowerPC processors, MIPS processors, ARM processors, etc. -A compilation toolchain is the set of tools that allows you to compile -code for your system. It consists of a compiler (in our case, +gcc+), -binary utils like assembler and linker (in our case, +binutils+) and a -C standard library (for example -http://www.gnu.org/software/libc/libc.html[GNU Libc], -http://www.uclibc.org/[uClibc] or -http://www.fefe.de/dietlibc/[dietlibc]). The system installed on your -development station certainly already has a compilation toolchain that -you can use to compile an application that runs on your system. If -you're using a PC, your compilation toolchain runs on an x86 processor -and generates code for an x86 processor. Under most Linux systems, the -compilation toolchain uses the GNU libc (glibc) as the C standard -library. This compilation toolchain is called the "host compilation -toolchain". The machine on which it is running, and on which you're -working, is called the "host system". The compilation toolchain is -provided by your distribution, and Buildroot has nothing to do with it -(other than using it to build a cross-compilation toolchain and other -tools that are run on the development host). - -As said above, the compilation toolchain that comes with your system -runs on and generates code for the processor in your host system. As -your embedded system has a different processor, you need a -cross-compilation toolchain - a compilation toolchain that runs on -your host system but generates code for your target system (and target -processor). For example, if your host system uses x86 and your target -system uses ARM, the regular compilation toolchain on your host runs on -x86 and generates code for x86, while the cross-compilation toolchain -runs on x86 and generates code for ARM. - -Even if your embedded system uses an x86 processor, you might be -interested in Buildroot for two reasons: - -* The compilation toolchain on your host certainly uses the GNU Libc - which is a complete but huge C standard library. Instead of using - GNU Libc on your target system, you can use uClibc which is a tiny C - standard library. If you want to use this C library, then you need a - compilation toolchain to generate binaries linked with it. Buildroot - can do that for you. - -* Buildroot automates the building of a root filesystem with all - needed tools like busybox. That makes it much easier than doing it - by hand. - -You might wonder why such a tool is needed when you can compile +gcc+, -+binutils+, +uClibc+ and all the other tools by hand. Of course doing -so is possible but, dealing with all of the configure options and -problems of every +gcc+ or +binutils+ version is very time-consuming -and uninteresting. Buildroot automates this process through the use -of Makefiles and has a collection of patches for each +gcc+ and -+binutils+ version to make them work on most architectures. +Buildroot supports numerous processors and their variants; it also +comes with default configuration for several boards available +off-the-shelf. Besides, a number of third-party projects are based on +or develop their BSP footnote:[BSP: Board Software Package] or +SDK footnote:[SDK: Standard Development Kit] on top of Buildroot. -Moreover, Buildroot provides an infrastructure for reproducing the -build process of your kernel, cross-toolchain, and embedded root -filesystem. Being able to reproduce the build process will be useful -when a component needs to be patched or updated or when another person -is supposed to take over the project.