您的位置:首页 > 理论基础 > 计算机网络

移植thttpd web服务器

2009-06-17 15:08 211 查看
移植thttpd web服务器到友善之臂mini2440开发板上(CPU是s3c2440)
1. 环境
硬件环境:
Host:X86PC       
Target:davinci DM6446 (TI) 
软件环境:
Host:Federo (linux2.6.15)(完全安装)
Target:arm-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服务器。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息