nios2: allow to play with ld.so
[openadk.git] / docs / using.txt
blobd45babaddd4de362e4d52dae745c1d04e6c65ec9
1 // -*- mode:doc; -*-
2 // vim: set syntax=asciidoc:
4 Using OpenADK
5 -------------
7 OpenADK has a nice configuration tool similar to the one you can
8 find in the http://www.kernel.org/[Linux kernel] or in
9 http://www.busybox.net/[Busybox]. Note that you can *and should build
10 everything as a normal user*. There is no need to be root to configure
11 and use OpenADK. The first step is to run the configuration
12 assistant:
14 --------------------
15  $ make menuconfig
16 --------------------
18 For each menu entry in the configuration tool, you can find associated
19 help that describes the purpose of the entry.
21 image::openadk-menu.png[]
23 First of all you need to choose if you want to build a Linux firmware
24 or a bare-metal toolchain. Linux is choosen as default.
26 image::openadk-arch.png[]
28 After that you should select your target architecture.
30 image::openadk-system.png[]
32 Now you can select your target system, endianess, cpu and other stuff.
34 image::openadk-task.png[]
36 If you want to compile some predefined appliance tasks, you can select it in +Tasks+.
37 You can later simply add your own tasks, which is a collection of options, packages,
38 kernel modules or features, runtime configuration and more.
40 When you are ready exit and save. You can always redefine the
41 configuration using +make menuconfig+.
43 Once everything is configured, the configuration tool generates a
44 +.config+ file that contains the description of your configuration. It
45 will be used by the Makefiles to do what's needed.
47 Let's go:
49 --------------------
50  $ make
51 --------------------
53 You *should never* use +make -jN+ with OpenADK: it does not support 'top-level
54 parallel make'. Instead, use the +ADK_MAKE_JOBS+ option in +Global settings+ to
55 tell OpenADK to run each package compilation with +make -jN+.
57 The `make` command will generally perform the following steps:
59 * download source files
60 * configure, build and install required host tools
61 * configure, build and install the cross-compiling toolchain
62 * build a kernel image, if selected
63 * build/install selected target packages
64 * build a bootloader, if selected
65 * create a root filesystem in selected format
67 OpenADK output is stored in several subdirectories: 
69 * +firmware/+ where all the images and packages are stored.
71 * +build_<system>_<libc>_<arch>_<abi>/+ where all the components except for the
72   cross-compilation toolchain are built. The directory contains one
73   subdirectory for each of these components.
75 * +target_<system>_<libc>_<arch>_<abi>/+ which contains a hierarchy similar to a root filesystem
76   hierarchy. This directory contains the installation of the
77   cross-compilation toolchain and all the userspace packages selected
78   for the target. However, this directory is 'not' intended to be
79   the root filesystem for the target: it contains a lot of development
80   files, unstripped binaries and libraries that make it far too big
81   for an embedded system. These development files are used to compile
82   libraries and applications for the target that depend on other
83   libraries.
85 * +root_<system>_<libc>_<arch>_<abi>/+ which contains the complete root filesystem for
86   the target. One exception, it doesn't have the correct
87   permissions (e.g. setuid for the busybox binary) for some files. 
88   Therefore, this directory *should not be used on your target*.  
89   Instead, you should use one of the images or archives built in the 
90   +firmware/+ directory. If you need an
91   extracted image of the root filesystem for booting over NFS, then
92   use the tarball image generated in +firmware/+ and extract it as
93   root. Compared to +build_*/+, +target_*/+ contains only the files and
94   libraries needed to run the selected target applications: the
95   development files are (exception: if any dev packages are selected)
96   not present, the binaries are stripped.
98 * +host_<gnu_host_name>/+ contains the installation of tools compiled for the host
99   that are needed for the proper execution of OpenADK
101 * +host_build_<gnu_host_name>/+ contains the build directories of tools compiled for the host
102   that are needed for the proper execution of OpenADK
104 * +toolchain_<system>_<libc>_<arch>_<abi>>/+ contains just the cross-compilation toolchain.
105   Can be used together with +target_<system>_<libc>_<arch>_<abi>/+ for other projects. Toolchain
106   is relocatable.
108 * +toolchain_build_<system>_<libc>_<arch>_<abi>/+ contains the build directories for the various
109   components of the cross-compilation toolchain.
111 * +pkg_<system>_<libc>_<arch>_<abi>/+ contains stamp files and file lists for the various components.
113 The command, +make menuconfig+ and +make+, are the
114 basic ones that allow to easily and quickly generate images fitting
115 your needs, with all the applications you enabled.
117 More details about the "make" command usage are given in
118 xref:make-tips[].