world leader in high performance signal processing
Trace: » build-system

uClinux-dist Build System

The uClinux distribution is made up of many files and directories. Here we will explain each piece so that you can drill down to the pieces that you wish to customize.

Tree Overview

The view from the top level:

Kconfig Overview

The uClinux-dist build system is based on Kconfig. This is the same configuration system that is used in the Linux kernel. It allows you to easily add configuration options, documentation, dependencies, and integrate into Makefiles. As documented in the vendor configuration page, there are three sets of configuration files:

  • top level vendor/board selection
  • uClinux-dist options
  • Linux kernel options

Top level vendor/board

  • .config
  • autoconf.h
  • Makefile
  • Kconfig
  • config/kconfig/*
  • config/mkconfig
  • config/setconfig
  • vendors/*/*

The top level Makefile creates the top level Kconfig by using the config/mkconfig script. This will be generated on the fly based on all the vendors in the top level vendors/ and all the boards in each vendors sub-directory. It then invokes a kconfig interface program from config/kconfig/ to prompt the user. When done, the saved selections will be written to .config and autoconf.h. Finally, default uClinux-dist and Linux kernel settings are found with the config/setconfig script (usually taken from the vendor/board/ directory).

uClinux-dist options

  • Makefile
  • config/.config
  • config/autoconf.h
  • config/kconfig/*
  • config/Kconfig
  • lib/Kconfig
  • user/Kconfig
  • vendor/Kconfig

The top level Makefile once again invokes a kconfig interface program from config/kconfig/, but this time it uses the Kconfig files from the lib/, user/, and vendor/ directory. This lets the user select the libraries and applications that should be compiled. The saved selections are then written to config/.config and config/autoconf.h.

Linux Kernel options

  • Makefile
  • linux-2.6.x/.config
  • linux-2.6.x/*

The top level Makefile simply passes control to the Linux kernel directory. It has its own copy of kconfig and related files. Since this is a huge directory unto itself, we won't cover it in detail as there are plenty of books that do this already. The saved selections are simply saved into linux-2.6.x/.config.

Build Overview

The top level Makefile will build up the kernel, libraries, applications, and images as selected by the user. Each package will be compiled in its own sub-directory. Compiled libraries will be locally installed into the top level staging/ directory so that other packages can easily find and link against them. Files that are meant to be used on the board itself will be copied into the romfs/ directory. This is used as the rootfs directory and images are created in images/.

For information on make targets, visit the targets page.