📄 building-the-system.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Building the System</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Manual Configuration"HREF="manual-configuration.html"><LINKREL="PREVIOUS"TITLE="Conflicts and constraints"HREF="conflicts-and-constraints.html"><LINKREL="NEXT"TITLE="Packages"HREF="ecos-packages.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="conflicts-and-constraints.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 28. Manual Configuration</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ecos-packages.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="BUILDING-THE-SYSTEM">Building the System</H1><P>Once a build tree has been generated with <BCLASS="COMMAND">ecosconfig</B>, building <SPANCLASS="PRODUCTNAME">eCos</SPAN> is straightforward:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ make</PRE></TD></TR></TABLE><P>The build tree contains the subdirectories, makefiles, and everything else that is needed to generate the default configuration for the selected architecture and platform. The only requirement is that the tools needed for that architecture, for example <BCLASS="COMMAND">powerpc-eabi-g++</B>, are available using the standard search path. If this is not the case then the <BCLASS="COMMAND">make</B> will fail with an error message. If you have a multiprocessor system then it may be more efficient to use:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ make -j <TTCLASS="REPLACEABLE"><I>n</I></TT></PRE></TD></TR></TABLE><P>where <TTCLASS="REPLACEABLE"><I>n</I></TT> is equal to the number of processors on your system.</P><P>Once the <BCLASS="COMMAND">make</B> process has completed, the install tree will contain the header files and the target library that are needed for application development. </P><P>It is also possible to build the system’s test casesfor the current configuration:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ make tests</PRE></TD></TR></TABLE><P>The resulting test executables will end up in a <TTCLASS="FILENAME">tests</TT> subdirectory of the install tree. </P><P>If disk space is scarce then it is possible to make the copyof the install tree for application development purposes, and thenuse: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ make clean</PRE></TD></TR></TABLE><P>The build tree will now use up a minimum of disk space — thebulk of what is left consists of configuration header files thatyou may have edited and hence should not be deleted automatically.However, it is possible to rebuild the system at any time withoutre-invoking <BCLASS="COMMAND">ecosconfig</B>, just byrunning <BCLASS="COMMAND">make</B> again. </P><P>Under exceptional circumstances it may be necessary to run <BCLASS="COMMAND">makeclean</B> for other reasons, such as when a new releaseof the toolchain is installed. The toolchain includes a number ofheader files which are closely tied to the compiler, for example <TTCLASS="FILENAME">limits.h</TT>,and these header files are not and should not be duplicated by <SPANCLASS="PRODUCTNAME">eCos</SPAN>.The makefiles perform header file dependency analysis, so that whena header file is changed all affected sources will be rebuilt duringthe next <BCLASS="COMMAND">make</B>. This is very usefulwhen the configuration header files are changed, but it also meansthat a build tree containing information about the locations ofheader files must be rebuilt. If a new version of the toolchainis installed and the old version is removed then this location informationis no longer accurate, and <BCLASS="COMMAND">make</B> willcomplain that certain dependencies cannot be satisfied. Under such circumstancesit is necessary to do a <BCLASS="COMMAND">make clean</B> first. </P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="conflicts-and-constraints.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="ecos-packages.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Conflicts and constraints</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="manual-configuration.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Packages</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -