how-openadk-works.txt 3.0 KB

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