From a161b51c54a859dd24edef1b05db1ab20d903df3 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 28 Dec 2004 19:15:20 +0000 Subject: Thomas Petazzoni writes: ello, Enclosed is a small documentation update. It adds a section that answers a very often asked question : "How to use the uClibc toolchain generated by Buildroot". Erik, could you apply it if you agree with the modifications ? Thanks, Thomas --- docs/buildroot-documentation.html | 57 ++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 10 deletions(-) (limited to 'docs/buildroot-documentation.html') diff --git a/docs/buildroot-documentation.html b/docs/buildroot-documentation.html index 23c79ce23..35b824a7c 100644 --- a/docs/buildroot-documentation.html +++ b/docs/buildroot-documentation.html @@ -18,7 +18,7 @@
Usage and documentation by Thomas Petazzoni. Contributions from Karsten Kruse, Ned Ludd, Martin Herren.
-Last modification : $Date: 2004/12/27 19:01:52 $
+Last modification : $Id: buildroot-documentation.html,v 1.2 2004/12/28 19:15:20 andersen Exp $
toolchain/uClibc/uClibc.config-locale
. The former
is used if you haven't selected locale support in Buildroot
configuration, and the latter is used if you have selected
- locale support.
+ locale support.
As said above, Buildroot is basically a set of Makefiles that download,
configure and compiles software with the correct options. It also includes
- some patches for various softwares, mainly the ones involved in the
+ some patches for various software, mainly the ones involved in the
cross-compilation tool chain (gcc
, binutils
and
uClibc).
toolchain/
directory) contains
- the Makefiles and associated files for all softwares related to the
+ the Makefiles and associated files for all software related to the
cross-compilation toolchain : binutils
, ccache
,
gcc
, gdb
, kernel-headers
and
uClibc
.target
directory) contains the
- Makefiles and associated files for softwares related to the generation of
+ Makefiles and associated files for software related to the generation of
the target root filesystem image. Four types of filesystems are supported
: ext2, jffs2, cramfs and squashfs. For each of them, there's a
sub-directory with the required files. There is also a
@@ -347,8 +348,44 @@
this global variable, so that the needed tools gets compiled.You may want to compile your own programs or other software + that are not packaged in Buildroot. In order to do this, you can + use the toolchain that was generated by Buildroot.
+ +The toolchain generated by Buildroot by default is located in
+ build_ARCH/staging_dir/
. The simplest way to use it
+ is to add build_ARCH/staging_dir/bin/
to your PATH
+ environnement variable, and then to use
+ arch-linux-gcc
, arch-linux-objdump
,
+ arch-linux-ld
, etc.
For example, you may add the following to your
+ .bashrc
(considering you're building for the MIPS
+ architecture and that Buildroot is located in
+ ~/buildroot/
) :
+export PATH=$PATH:~/buildroot/build_mips/bin/ ++ +
Then you can simply do :
+ ++mips-linux-gcc -o foo foo.c ++ +
Important : do not try to move the toolchain to an other + directory, it won't work. There are some hard-coded paths in the + gcc configuration. If the default toolchain directory + doesn't suit your needs, please refer to the Using the uClibc toolchain outside of + buildroot section.
+By default, the cross-compilation toolchain is generated inside
build_ARCH/staging_dir/
. But sometimes, it may be useful to
@@ -412,7 +449,7 @@ config BR2_PACKAGE_FOO
fact, the name of the software is the the identifier of the target
inside the real Makefile that will do everything (download,
compile, install), and that we study below. Back to
- Makefile.in
, here is an example :
+ Makefile.in
, here is an example :
ifeq ($(strip $(BR2_PACKAGE_FOO)),y) @@ -486,7 +523,7 @@ endif
First of all, this Makefile example works for a single
- binary software. For other softwares such as libraries or more
+ binary software. For other software such as libraries or more
complex stuff with multiple binaries, it should be adapted. Look at
the other *.mk
files in the package
directory.