port crda
[openadk.git] / docs / how-openadk-works.txt
blobacafc7587eb530301a13e2f2c761bad82de5dccd
1 // -*- mode:doc; -*-
2 // vim: set syntax=asciidoc:
4 How OpenADK works
5 -----------------
7 As mentioned above, OpenADK is basically a set of Makefiles that
8 download, configure, and compile software with the correct options. It
9 also includes patches for various software packages and the Linux kernel. 
11 There is basically one Makefile per software package. Makefiles are split into
12 many different parts.
14 * The +toolchain/+ directory contains the Makefiles
15   and associated files for all software related to the
16   cross-compilation toolchain: +binutils+, +gcc+, +gdb+,
17   +kernel-headers+ and +libc+.
19 * The +target/+ directory contains the definitions for all the processor
20   architectures that are supported by OpenADK. +target/linux+ contains
21   the meta-data for the Linux kernel configuration abstraction layer and
22   the kernel patches
24 * The +package/+ directory contains the Makefiles and
25   associated files for all user-space tools and libraries that OpenADK can
26   compile and add to the target root filesystem or to the host directory. There
27   is one sub-directory per package.
29 * The +mk/+ directory contains some globally used Makefiles with
30   the suffix +.mk+, these are used in all other Makefile via include
32 * The +adk/+ directory contains the Makefiles and
33   associated files for software related to the generation of the
34   host tools needed for +make menuconfig+ system
36 * The +scripts/+ directory contains shell scripts for the creation of
37   meta-data in OpenADK, install scripts and image creation scripts
39 The main Makefile performs the following steps before the configuration
40 is done:
42 * Call the +prereq+ target to check if the host system have all required
43   software installed. It creates the +prereq.mk+ Makefile. 
45 * Compile and run the OpenADK tools to generate the meta-data for the menu
46   based configuration and creates the +package/Depends.mk+ Makefile to handle the 
47   dependencies
49 * Starts the menu based configuration system via +make menuconfig+
51 The main Makefile performs the following steps, once the
52 configuration is done (it is mainly a wrapper for +mk/build.mk+):
54 * Create all the output directories: +host_<gnu_host_name>+, +target_<arch>_<libc>+, 
55   +build_<arch>_<libc>+, +pkg_<arch>_<libc>+, etc. 
57 * Call the +scan-pkgs.sh+ script to find any needed optional host software, needed to compile
58   software the user has configured 
60 * Call the +create-menu+ script to generate meta-data for available systems and package collections
62 * Generate the host tools required for different tasks (encrypting passwords,
63   compressing data, extracting archives, creating images, ..)
65 * Generate the cross-compilation toolchain (binutils, gcc, libc, gdb)
67 * Compile the Linux kernel
69 * Compile all the userspace packages, the boot loader and external kernel modules
71 * Generate the firmware images or archives
73 * Output a target specific help text