From d9775d584be450ffc38f4e702a2e3f89128bb8a1 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 15 Mar 2011 17:15:49 -0600 Subject: documentation/adt-manual/adt-command.xml: Initial draft of command line chapter This is the initial draft of the Using the Command Line chapter. (From OE-Core rev: 76bbb867d6e4e9c49c9d4a2d9c453d0cdf692c44) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/adt-manual/adt-command.xml | 91 ++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 41 deletions(-) (limited to 'documentation') diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml index d459d508a9..e57c15a983 100644 --- a/documentation/adt-manual/adt-command.xml +++ b/documentation/adt-manual/adt-command.xml @@ -1,55 +1,64 @@ - - -Yocto Project Kernel Architecture and Use Manual - -
- Introduction + +Using the Command Line - The Yocto Project presents the kernel as a fully patched, history-clean git - repository. - The git tree represents the selected features, board support, - and configurations extensively tested by Yocto Project. - The Yocto Project kernel allows the end user to leverage community - best practices to seamlessly manage the development, build and debug cycles. + Recall that earlier we talked about how to use an existing toolchain + tarball that had been installed into /opt/poky, + which is outside of the Poky build environment + (see + “Using an Existing Toolchain Tarball”). + And, that sourcing your architecture-specific environment setup script + initializes a suitable development environment. + This setup occurs by adding the compiler, QEMU scripts, QEMU binary, + a special version of pkgconfig and other useful + utilities to the PATH variable. + Variables to assist pkgconfig and autotools are also defined so that, + for example, configure.sh can find pre-generated + test results for tests that need target hardware on which to run. + These conditions allow you to easily use the toolchain outside of the + Poky build environment on both autotools-based projects and + makefile-based projects. + +
+Autotools-Based Projects - This manual describes the Yocto Project kernel by providing information - on its history, organization, benefits, and use. - The manual consists of two sections: - - Concepts - Describes concepts behind the kernel. - You will understand how the kernel is organized and why it is organized in - the way it is. You will understand the benefits of the kernel's organization - and the mechanisms used to work with the kernel and how to apply it in your - design process. - Using the Kernel - Describes best practices and "how-to" information - that lets you put the kernel to practical use. Some examples are "How to Build a - Project Specific Tree", "How to Examine Changes in a Branch", and "Saving Kernel - Modifications." - + For an autotools-based project you can use the cross-toolchain by just + passing the appropriate host option to configure.sh. + The host option you use is derived from the name of the environment setup + script in /opt/poky resulting from unpacking the + cross-toolchain tarball. + For example, the host option for an ARM-based target that uses the GNU EABI + is armv5te-poky-linux-gnueabi. + Note that the name of the script is + environment-setup-armv5te-poky-linux-gnueabi. + Thus, the following command works: + + $ configure ‐‐host-armv5te-poky-linux-gnueabi ‐‐with-libtool-sysroot=<sysroot-dir> + - For more information on the kernel, see the following links: - - - - - - - You can find more information on Yocto Project by visiting the website at - . - + This single command updates your project and rebuilds it using the appropriate + cross-toolchain tools.
- - - - - +
+Makefile-Based Projects + + For a makefile-based project you use the cross-toolchain by making sure + the tools are used. + You can do this as follows: + + CC=arm-poky-linux-gnueabi-gcc + LD=arm-poky-linux-gnueabi-ld + CFLAGS=”${CFLAGS} ‐‐sysroot=<sysroot-dir>” + CXXFLAGS=”${CXXFLAGS} ‐‐sysroot=<sysroot-dir>” + + +