在ARM+Linux上移植NTP详解

 

ARMLinux上移植NTP详解

sailor_forever sailing_9806@163.com 转载请注明

http://blog.csdn.net/sailor_8318/archive/2008/04/21/2310459.aspx

 

一、查看readme文件,了解相关资料... 1

二、查看INSTALL文件,如何配置编译... 2

三、在主机环境下,设置—prefix--exec-prefix等选项改变安装路径... 4

四、更改configure脚本,使其能够交叉编译,但无作用... 4

五、考虑直接更改makefile中的内核目录等,但未找到相关选项... 6

六、联想到gdbgdbserver,借鉴其参数... 6

七、查找hosttarget等参数的使用方法,使用—host=arm-linux选项... 6

八、安装bin文件及lib. 7

九、附录,相关configure参数解析... 8

 

一、查看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,其将根据不同的体系结构生成特定的makefileguess文件就是根据当前运行环境来确定系统的一些特定参数。

 

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'. 

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 14
    评论
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值