boa-0.94.13 移植到 ARM
2016-03-30 10:31
351 查看
/article/8882095.html
1.
程序移植
2.
配置
3.
测试
1.
程序移植
<1>
解压源码,配置
furtherchan@further:~/work/boa_porting/boa-0.94.13$
src/configure
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
Makefile
CC = arm-linux-gcc
CPP = arm-linux-gcc -E
<2>
编译
furtherchan@further:~/work/boa_porting/boa-0.94.13$ make
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o y.tab.o y.tab.c
src/boa_grammar.y:30:19: error: parse.h: No such file or
directory
y.tab.c: In function 'yyparse':
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/boa_grammar.y
#
出错,修改头文件包含路径。
flex
src/boa_lexer.l
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o lex.yy.o lex.yy.c
src/boa_lexer.l:28:19: error: parse.h: No such file or
directory
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/boa_lexer.l
#
出错,修改头文件包含路径。
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o util.o src/util.c
src/util.c:100:1: error: pasting "t" and
"->" does not give a valid preprocessing token
make: *** [util.o] Error 1
#
去掉其中(./src/compat.h)的
”##”
。furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/compat.h
furtherchan@further:~/work/boa_porting/boa-0.94.13$ make
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o util.o src/util.c
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o sublog.o
src/sublog.c
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o timestamp.o
src/timestamp.c
arm-linux-gcc
-o boa
y.tab.o lex.yy.o alias.o boa.o buffer.o cgi.o cgi_header.o config.o escape.o
get.o hash.o ip.o log.o mmap_cache.o pipe.o queue.o read.o request.o response.o
select.o signals.o util.o sublog.o timestamp.o -g
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o index_dir.o
src/index_dir.c
arm-linux-gcc
-o
boa_indexer index_dir.o escape.o -g
#
编译成功
furtherchan@further:~/work/boa_porting/boa-0.94.13$ file
boa
boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
furtherchan@further:~/work/boa_porting/boa-0.94.13$
arm-linux-strip boa
furtherchan@further:~/work/boa_porting/boa-0.94.13$ file
boa
boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped
2.
配置
<1>
配置
boa.conf
,如下
Port 80
User 0
Group 0
ErrorLog /var/boa_error_log
DocumentRoot /
var/
www
UserDir public_html
DirectoryIndex index.html
DirectoryMaker /usr/lib/boa/boa_indexer
KeepAliveMax 1000
KeepAliveTimeout 10
MimeTypes /etc/mime.types
DefaultType text/plain
CGIPath /bin:/usr/bin:/usr/local/bin
Alias /doc /usr/doc
ScriptAlias /cgi-bin/ /
var/
www/cgi-bin/
ServerName
www.your.org.here
<2>
配置开发板环境
创建目录
furtherchan@further:~/rootfs$ mkdir etc/boa
furtherchan@further:~/rootfs$ mkdir
/var/
www
furtherchan@further:~/rootfs$ mkdir
/var/
www/cgi-bin
拷贝文件
furtherchan@further:~/rootfs$ cp
/home/furtherchan/work/boa_porting/boa-0.94.13/boa.conf ./etc
furtherchan@further:~/rootfs$ cp -v
/home/furtherchan/work/boa_porting/boa-0.94.13/boa ./bin
furtherchan@further:~/rootfs$ cp /etc/mime.types ./etc
3.
测试
<1>
程序
#
include
<
stdio
.
h
>
#
include
<
stdlib
.
h
>
int
main
(
void
)
{
printf
(
"Content-type: text/html/n/n"
);
printf
(
"/n"
);
printf
(
"CGI
test
/n"
);
printf
(
"/n"
);
printf
(
"
);
printf
(
"/n"
);
printf
(
"/n"
);
exit
(
0
);
}
furtherchan@further:~/rootfs/www/cgi-bin$ arm-linux-gcc -o
hello hello.c
<2>
打开网页
http:// 板子
IP/cgi_bin/hello
1.
程序移植
2.
配置
3.
测试
1.
程序移植
<1>
解压源码,配置
furtherchan@further:~/work/boa_porting/boa-0.94.13$
src/configure
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
Makefile
CC = arm-linux-gcc
CPP = arm-linux-gcc -E
<2>
编译
furtherchan@further:~/work/boa_porting/boa-0.94.13$ make
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o y.tab.o y.tab.c
src/boa_grammar.y:30:19: error: parse.h: No such file or
directory
y.tab.c: In function 'yyparse':
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/boa_grammar.y
#
出错,修改头文件包含路径。
flex
src/boa_lexer.l
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o lex.yy.o lex.yy.c
src/boa_lexer.l:28:19: error: parse.h: No such file or
directory
furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/boa_lexer.l
#
出错,修改头文件包含路径。
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o util.o src/util.c
src/util.c:100:1: error: pasting "t" and
"->" does not give a valid preprocessing token
make: *** [util.o] Error 1
#
去掉其中(./src/compat.h)的
”##”
。furtherchan@further:~/work/boa_porting/boa-0.94.13$ vim
src/compat.h
furtherchan@further:~/work/boa_porting/boa-0.94.13$ make
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o util.o src/util.c
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o sublog.o
src/sublog.c
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o timestamp.o
src/timestamp.c
arm-linux-gcc
-o boa
y.tab.o lex.yy.o alias.o boa.o buffer.o cgi.o cgi_header.o config.o escape.o
get.o hash.o ip.o log.o mmap_cache.o pipe.o queue.o read.o request.o response.o
select.o signals.o util.o sublog.o timestamp.o -g
arm-linux-gcc
-g -O2
-pipe -Wall -I.
-c -o index_dir.o
src/index_dir.c
arm-linux-gcc
-o
boa_indexer index_dir.o escape.o -g
#
编译成功
furtherchan@further:~/work/boa_porting/boa-0.94.13$ file
boa
boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
furtherchan@further:~/work/boa_porting/boa-0.94.13$
arm-linux-strip boa
furtherchan@further:~/work/boa_porting/boa-0.94.13$ file
boa
boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped
2.
配置
<1>
配置
boa.conf
,如下
Port 80
User 0
Group 0
ErrorLog /var/boa_error_log
DocumentRoot /
var/
www
UserDir public_html
DirectoryIndex index.html
DirectoryMaker /usr/lib/boa/boa_indexer
KeepAliveMax 1000
KeepAliveTimeout 10
MimeTypes /etc/mime.types
DefaultType text/plain
CGIPath /bin:/usr/bin:/usr/local/bin
Alias /doc /usr/doc
ScriptAlias /cgi-bin/ /
var/
www/cgi-bin/
ServerName
www.your.org.here
<2>
配置开发板环境
创建目录
furtherchan@further:~/rootfs$ mkdir etc/boa
furtherchan@further:~/rootfs$ mkdir
/var/
www
furtherchan@further:~/rootfs$ mkdir
/var/
www/cgi-bin
拷贝文件
furtherchan@further:~/rootfs$ cp
/home/furtherchan/work/boa_porting/boa-0.94.13/boa.conf ./etc
furtherchan@further:~/rootfs$ cp -v
/home/furtherchan/work/boa_porting/boa-0.94.13/boa ./bin
furtherchan@further:~/rootfs$ cp /etc/mime.types ./etc
3.
测试
<1>
程序
#
include
<
stdio
.
h
>
#
include
<
stdlib
.
h
>
int
main
(
void
)
{
printf
(
"Content-type: text/html/n/n"
);
printf
(
"/n"
);
printf
(
"CGI
test
/n"
);
printf
(
"/n"
);
printf
(
"
Hello,world.
/n");
printf
(
"/n"
);
printf
(
"/n"
);
exit
(
0
);
}
furtherchan@further:~/rootfs/www/cgi-bin$ arm-linux-gcc -o
hello hello.c
<2>
打开网页
http:// 板子
IP/cgi_bin/hello
相关文章推荐
- Linux目录递归改变文件名大小写
- 微软铁杆兄弟诺基亚开发基于Linux的手机
- 为什么32位系统内存最多为4G?
- configure: error: ZLIB extension requires zlib &gt;= 1.0.9
- grub 引导 Win 7
- BOA+PHP+SQLite之SQLite
- Java多线程学习
- 关于App的一些迷思以及一些动画效果开源库的推荐
- 2021
- Linux时间子系统之(六):POSIX timer
- osv 编译和执行单个apps分析
- 本软件计算生活多少秒
- 最大间隔多超平面分类器(多线性SVM分类器)介绍及Matlab实现
- Linux下模拟http的get/post请求(curl or wget)
- jpql 入门
- Linux下模拟http的get/post请求(curl or wget)
- C++ 对象复制 内存拷贝
- BOA+PHP+SQLite之PHP
- BOA+PHP+SQLite之BOA
- 在Linux下为PHP5.3.8配置Zend Guard