📄 makesystem.tex
字号:
\chapter{The RTAI Makefile System}% ----------------------------------------------------------------------------\section{Description of the Build System}\subsection{Motivations}The RTAI build system is a merge of Linux's 2.5 Kconfig withautoconf/automake/libtool. The following requirements led to suchmixed system:\begin{itemize}\item GUI-based configuration.\item Cross-compilation support.\item Compilation of C and C++ kernel modules.\item Full shared library support (C/C++).\item C++ compilation of hosts programs.\item Compilation of GUI (X-based).\item Script-based configuration (for automatic mode).\item Initial support for profile-based configurations.\item Reliable (host) feature detection framework.\end{itemize}% ----------------------------------------------------------------------------\subsection{Dynamics}The dynamics of the system is as follows:=> Kconfig/Menuconfig-based configuration (GUI-aided) \$ make menuconfig,xconfig,gconfig | | 1. Produces rtai-core/config/kconfig/.rtai\_config (Kconfig format: CONFIG\_RTAI\_FEATURE=<value> or unset) | 2. Runs ./configure --with-kconfig-file=rtai-core/config/kconfig/.rtai\_config v=> Script level configuration (automatic or manual). The configurescript can either be controlled by individual options passed to it, orfed with a configuration file in Kconfig format. Automatic mode (spawned right after kconfig): ./configure --with-kconfig-file=rtai-core/config/kconfig/.rtai\_config Manual mode (from the user CLI): ./configure --enable-feature-x --with-param-y=n | | 1. Applies a set of reasonable defaults for unset parameters. | 2. Auto-detects host features as required. | 3. Produces config.h and Makefiles. v=> Compilation \$ make% ----------------------------------------------------------------------------\subsection{Bootstrapping}RTAI needs to be configured prior to being built, but theconfiguration tool cannot rely on autoconf-generated Makefiles tobuild itself. Therefore, the GUI-aided configuration system whichdepends on dynamically built programs is bootstrapped by a simple"makefile" (note the small caps) at the root of the source tree.The bootstrap makefile traps the targets needed to build and run theKconfig tool (make menuconfig|xconfig|gconfig), and invokes theself-contained rtai-core/config/kconfig/Makefile.kc makefile which inturn builds and run the configuration GUI as required. Upon return ofthe GUI-based configuration session, the bootstrap makefile (re)runsautoconf's "configure" script as needed to take the configurationchanges into account.Once the configuration script has been run successfully at least once,there is no more need to use the bootstrap makefile located in thesource tree, since the top-level autoconf-generated Makefile will beavailable in the build tree, and handle the menuconfig, xconfig,gconfig and other targets appropriately (actually, menuconfig, xconfigand gconfig are silently passed to the boostrap makefile by theautoconf-generated one so that we do not duplicate rather complexrules uselessly).% ----------------------------------------------------------------------------\subsection{Dependencies}The build system is based on:\begin{itemize}\item Kconfig as extracted from Linux 2.5.69 development version. TheX-based configuration front-ends either needs Qt (xconfig) or GTK2(gconfig), and the dialog-based one depends on ncurses.\item Autoconf >= 2.57\item Automake >= 1.7.3\item Libtool >= 1.4.3\end{itemize}% ----------------------------------------------------------------------------\subsection{Configuration Variables}The following variables are substituted by autoconf into eachautomake-controlled Makefile.\paragraph{@RTAI\_TARGET\_ARCH@} The canonical name of the target architecture for which RTAI is built. Currently, "i386" is the only supported architecture.\paragraph{@RTAI\_BUILTIN\_MODLIST@}A white-space separated list of (otherwise modular) featuresto be integrated into the RTAI scheduler(s). Each name foundin this list is canonicalised relatively to the rtai-core/directory, and can be one of:\begin{itemize}\item trace (LTT support)\item math (In-kernel libm support)\item ipc/bits (event flags support)\item ipc/fifos (FIFOS support)\item ipc/netrpc (NETRPC support)\item ipc/tbx (Typed mailboxes support)\item ipc/shmem (Shared memory support)\item rtmem (Dynamic memory management)\item tasklets (Tasklets support)\item usi (User-space interrupts support)\item watchdog (Task watchdog support)\end{itemize}\paragraph{@RTAI\_KMOD\_CFLAGS@} Basic CFLAGS used to compile kernel modules written in C.\paragraph{@RTAI\_KMOD\_CXXFLAGS@} Basic CFLAGS used to compile kernel modules written in C++.\paragraph{@RTAI\_USER\_CFLAGS@} Basic CFLAGS used to compile user-space programs.\paragraph{@RTAI\_FP\_CFLAGS@}Additional CFLAGS used to compile objects including mathoperations. This variable's value depends onCONFIG\_RTAI\_FPU\_SUPPORT to determine whether we should ask GCCto use hardware-assisted or software-emulated floating-pointsupport.\paragraph{@RTAI\_COMPAT\_CFLAGS@}When the compatibility mode is activated, this variablecontains additional directives that basically help findingcompatibility headers. Otherwise, this variable is empty.\paragraph{@RTAI\_MVM\_LDADD@, @RTAI\_MVM\_CFLAGS@ @RTAI\_MVM\_CXXFLAGS@ @RTAI\_MVM\_GCC\_TARBALL@}Specific flags to compile and link the Xenomaisimulator. These are not used outside of the virtual machineenvironment.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -