how-openadk-works.txt 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 can
  20. compile and add to the target root filesystem or to the host directory. There
  21. is one 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 +adk/+ directory contains the Makefiles and
  25. associated files for software related to the generation of the
  26. host tools needed for +make menuconfig+ system
  27. * The +scripts/+ directory contains shell scripts for the creation of
  28. meta-data in OpenADK, install scripts and image creation scripts
  29. The main Makefile performs the following steps before the configuration
  30. is done:
  31. * Call the +prereq+ target to check if the host system have all required
  32. software installed. It creates the +prereq.mk+ Makefile.
  33. * Compile and run the OpenADK tools to generate the meta-data for the menu
  34. based configuration and creates the +package/Depends.mk+ Makefile to handle the
  35. dependencies
  36. * Starts the menu based configuration system via +make menuconfig+
  37. The main Makefile performs the following steps, once the
  38. configuration is done (it is mainly a wrapper for +mk/build.mk+):
  39. * Create all the output directories: +host_<gnu_host_name>+, +target_<arch>_<libc>+,
  40. +build_<arch>_<libc>+, +pkg_<arch>_<libc>+, etc.
  41. * Call the +scan-pkgs.sh+ script to find any needed optional host software, needed to compile
  42. software the user has configured
  43. * Call the +create-menu+ script to generate meta-data for available systems and package collections
  44. * Generate the host tools required for different tasks (encrypting passwords,
  45. compressing data, extracting archives, creating images, ..)
  46. * Generate the cross-compilation toolchain (binutils, gcc, libc, gdb)
  47. * Compile the Linux kernel
  48. * Compile all the userspace packages, the boot loader and external kernel modules
  49. * Generate the firmware images or archives
  50. * Output a target specific help text