summaryrefslogtreecommitdiff
path: root/docs/buildroot-documentation.html
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-12-28 19:15:20 +0000
committerEric Andersen <andersen@codepoet.org>2004-12-28 19:15:20 +0000
commita161b51c54a859dd24edef1b05db1ab20d903df3 (patch)
tree7f46bf8e098556f0ab4045841473b3f42131bd02 /docs/buildroot-documentation.html
parentb5a211c68eb8f6a5c00910eb96c5339c37df65ab (diff)
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
Diffstat (limited to 'docs/buildroot-documentation.html')
-rw-r--r--docs/buildroot-documentation.html57
1 files changed, 47 insertions, 10 deletions
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 @@
<p>Usage and documentation by Thomas Petazzoni. Contributions from
Karsten Kruse, Ned Ludd, Martin Herren.</p>
- <p><small>Last modification : $Date: 2004/12/27 19:01:52 $</small></p>
+ <p><small>Last modification : $Id: buildroot-documentation.html,v 1.2 2004/12/28 19:15:20 andersen Exp $</small></p>
<ul>
<li><a href="#about">About Buildroot</a></li>
@@ -30,8 +30,9 @@
<li><a href="#custom_uclibc">Customizing the uClibc
configuration</a></li>
<li><a href="#buildroot_innards">How Buildroot works</a></li>
- <li><a href="#toolchain_standalone">Using the uClibc toolchain without
- Buildroot</a></li>
+ <li><a href="#using_toolchain">Using the uClibc toolchain</a></li>
+ <li><a href="#toolchain_standalone">Using the uClibc toolchain
+ outside of Buildroot</a></li>
<li><a href="#downloaded_packages">Location of downloaded packages</a></li>
<li><a href="#add_software">Extending Buildroot with more
Software</a></li>
@@ -246,7 +247,7 @@
<code>toolchain/uClibc/uClibc.config-locale</code>. 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.</li>
<li>Run the compilation of Buildroot again</li>
@@ -262,7 +263,7 @@
<p>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 (<code>gcc</code>, <code>binutils</code> and
uClibc).</p>
@@ -277,13 +278,13 @@
sub-directory per tool.</li>
<li><b>toolchain</b> (in the <code>toolchain/</code> 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 : <code>binutils</code>, <code>ccache</code>,
<code>gcc</code>, <code>gdb</code>, <code>kernel-headers</code> and
<code>uClibc</code>.</li>
<li><b>target</b> (in the <code>target</code> 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.</li>
</ol>
+ <h2><a name="using_toolchain" id="using_toolchain"></a>Using the
+ uClibc toolchain</h2>
+
+ <p>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.</p>
+
+ <p>The toolchain generated by Buildroot by default is located in
+ <code>build_ARCH/staging_dir/</code>. The simplest way to use it
+ is to add <code>build_ARCH/staging_dir/bin/</code> to your PATH
+ environnement variable, and then to use
+ <code>arch-linux-gcc</code>, <code>arch-linux-objdump</code>,
+ <code>arch-linux-ld</code>, etc.</p>
+
+ <p>For example, you may add the following to your
+ <code>.bashrc</code> (considering you're building for the MIPS
+ architecture and that Buildroot is located in
+ <code>~/buildroot/</code>) :</p>
+
+<pre>
+export PATH=$PATH:~/buildroot/build_mips/bin/
+</pre>
+
+ <p>Then you can simply do :</p>
+
+<pre>
+mips-linux-gcc -o foo foo.c
+</pre>
+
+ <p><b>Important</b> : do not try to move the toolchain to an other
+ directory, it won't work. There are some hard-coded paths in the
+ <i>gcc</i> configuration. If the default toolchain directory
+ doesn't suit your needs, please refer to the <a
+ href="#toolchain_standalone">Using the uClibc toolchain outside of
+ buildroot</a> section.</p>
+
<h2><a name="toolchain_standalone" id="toolchain_standalone"></a>Using the
- uClibc toolchain without buildroot</h2>
+ uClibc toolchain outside of buildroot</h2>
<p>By default, the cross-compilation toolchain is generated inside
<code>build_ARCH/staging_dir/</code>. 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 <i>Makefile</i> that will do everything (download,
compile, install), and that we study below. Back to
- <code>Makefile.in</code>, here is an example :
+ <code>Makefile.in</code>, here is an example :</p>
<pre>
ifeq ($(strip $(BR2_PACKAGE_FOO)),y)
@@ -486,7 +523,7 @@ endif
</pre>
<p>First of all, this <i>Makefile</i> 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 <code>*.mk</code> files in the <code>package</code>
directory.</p>