移植thttpd web服务器

来源:互联网 发布:中国it网 编辑:程序博客网 时间:2024/05/04 19:06

移植thttpd web服务器到友善之臂mini2440开发板上(CPUs3c2440

1. 环境

硬件环境:

HostX86PC       

Target:davinci DM6446 (TI) 

软件环境:

Host:Federo (linux2.6.15)(完全安装)

Targetarm-linux                kernel:linux-2.6.10

Crosstool: arm-v5t-gcc-

 

2.      准备以下源码包(下载)---- thttpd-2.25b

http://www.acme.com/software/thttpd/

 

3.    交叉编译

(1) 准备工作

redhat linux 9.0下新建工作目录

mkdir /thttpd              工作目录

cd /thttpd                 进入工作目录

说明:把第2步下载的源码包放到该目录中,即/thttpd

 

(2) 交叉编译thttpd

解压

cd /thttpd/thttpd-2.25b

编译方式1(静态编译)

[root@localhost thttpd-2.25b]#

CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc ./configure –host=arm-linux

指定静态链接二进制文件,vi编辑器打开Makefile文件,修改如下:

LDFLAGS= -static

编译:

[root@localhost thttpd-2.25b]# make LDFLAGS=-static”

 

编译方式2(动态编译)

[root@localhost thttpd-2.25b]#

CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc ./configure –host=arm-linux

[root@localhost thttpd-2.25b]# make

 

4. 安装

    

..................................................................

 

 

5. 测试

目标板,即嵌入式开发板上使用/usr/sbin/thttpd –C /etc/thttpd/thttpd.conf命令启动了thttpd服务之后,那么,就可以进行测试,看是否成功移植了thttpd服务,直接用Internet Explorer浏览器在其地址栏输入如下内容(192.168.1.20为开发板的ip地址):

http://192.168.1.20

过一会儿之后,就能登陆上了thttpd web服务器。

原创粉丝点击