在ARM+Linux上移植NTP详解
sailor_forever sailing_9806@163.com 转载请注明
http://blog.csdn.net/sailor_8318/archive/2008/04/21/2310459.aspx
三、在主机环境下,设置—prefix、--exec-prefix等选项改变安装路径... 4
四、更改configure脚本,使其能够交叉编译,但无作用... 4
五、考虑直接更改makefile中的内核目录等,但未找到相关选项... 6
七、查找host和target等参数的使用方法,使用—host=arm-linux选项... 6
一、查看readme文件,了解相关资料
任何一个开源软件,readme是最直接的资料,因此是在开始正式工作前应看的第一个文件
A complete explanation of the configure, compile and install process, as
well as setting up an NTP subnet, is in the HTML pages in the ./html/
directory. For more information on NTP and how to get a working setup,
read WHERE-TO-START.
由此可知配置、编译、安装等环节都有相关资料,在./html/目录下;对于比较成熟的开源软件,其官方网站上都有相关资料的全面介绍,并且通常随源码包也带有很完善的相关说明资料,如开源无线网卡驱动MadWifi等对于每一个环节都有相关文档说明。
INSTALL Generic installation instructions for autoconf-based programs.
Unless you really know what you are doing, you should read the
directions in the HTML pages, starting with ./html/index.html.
开源软件的安装路径通常都是可指定的,而一般默认的路径都是“usr/local”
WHERE-TO-START Hints on what to read in order to get a working configuration.
除了readme之外最直接的参考资料
config.guess Script used to identify the machine architecture and operating system.
开源软件的configure脚本的唯一目的就是生成makefile,其将根据不同的体系结构生成特定的makefile;guess文件就是根据当前运行环境来确定系统的一些特定参数。
configure Script used to configure the distribution. See the HTML pages
(./html/index.html) for a complete description of the options
available.
通过给configure一些参数,就可以定制整个编译安装过程。也是在不同平台上移植的第一步。
二、查看INSTALL文件,如何配置编译
Basic Installation――默认的操作步骤
The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure').
If at some point `config.cache' contains results you don't want to keep, you may remove or edit it.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'.