构建嵌入式Web(goahead+sqlite3+matrixssl)服务器之一:移植sqlite

网上关于嵌入式goahead移植的资料有很多,大部分都是v2.5版本的,或者v3.1,其与最新的v3.5版本的有很大差异。关于v3.5的资料很少,走了不少弯路,在此一一记录。

第一部分:移植sqlite

sqlite的移植比较简单,不用修改源代码文件,直接配置编译即可。

sqlite版本为3.9.2

编译过程
1.下载
sqlite源代码
sqlite-autoconf-3090200.tar.gz
http://www.sqlite.org/download.html

2.编译脚本文件

 1 #!/bin/bash
 2
 3 # make-sqlite-autoconf-3090200.sh
 4
 5 # 关于sudo命令:
 6 # 编译时,若是使用sudo命令执行,则之前设置的当前用户的环境变量(如gcc路径)会丢失,所以在此添加环境变量
 7 # sudo编译会改变当前环境变量,所以在这里添加编译器的目录
 8 export PATH=$PATH:/home/kingsine/crosstools/arm-2011.03
 9 export PATH=$PATH:/home/kingsine/crosstools/arm-2011.03/bin
10
11 # 解压到temp目录
12 echo "tar source sqlite-autoconf-3090200.tar.gz"
13 tar -zxvf source/sqlite-autoconf-3090200.tar.gz
14 rm -rf temp
15 mv sqlite-autoconf-3090200 temp
16
17 # 升级默认配置文件,但当前没有对源代码做任何修改,故update下没有任何文件,为保持统一而保留
18 echo "update source"
19 cp -R update/* temp/
20
21 # 回到源代码目录
22 cd temp
23
24 # 该文件需要用sudo命令执行
25 # 配置编译
26 rm -rf /opt/sqlite3
27 ./configure --host=arm-none-linux-gnueabi --prefix=/opt/sqlite3 --disable-tcl
28 make CC=arm-none-linux-gnueabi-gcc CPP=arm-none-linux-gnueabi-gcc
29
30 # 安装到了/opt/sqlite3
31 make install
32
33 # 回到上级一目录
34 cd ..
35 # 拷贝编译结果文件到install目录
36 mkdir -p ./install/opt/sqlite3/
37 cp -R /opt/sqlite3/* ./install/opt/sqlite3/
38 # 修改权限
39 chmod -R 777 ./install/*
40
41 # 删除系统文件
42 #rm -rf /opt/sqlite3/

3.测试文件

  1 // sqlite_demo.c
  2
  3
  4 #include "stdio.h"
  5 #include "/opt/sqlite3/include/sqlite3.h"
  6
  7
  8 void print_node(void)
  9 {
 10     printf("        add [id] [msg(128)] ---- add item \n");
 11     printf("        show                ---- show all item \n");
 12     printf("        exit                ---- exit \n");
 13 }
 14
 15 int create_tabel(sqlite3 *db)
 16 {
 17     const char *sql_create_table = "create table t(id int primary key,msg varchar(128))";
 18 //    const char *sql_drop_table = "drop table if exists t";
 19     char *errmsg = 0;
 20     int ret = 0;
 21
 22     //简单的删除操作可以直接使用sqlite3_exec即可。这里不需要回调函数以及回调函数的参数。 当然需要可以关注sqlite3_exec返回的结果是否为SQLITE_OK的值。
 23     //sqlite3_exec(db,sql_drop_table,NULL,NULL,&errmsg);
 24     ret = sqlite3_exec(db, sql_create_table, NULL, NULL, &errmsg);
 25     if(ret != SQLITE_OK)
 26     {
 27         fprintf(stderr,"create table fail: %s\n",errmsg);
 28     }
 29
 30     return ret;
 31 }
 32
 33 int print_record(void *params,int n_column,char **column_value,char **column_name)
 34 {
 35     int i;
 36     for(i=0; i<n_column; i++)
 37     {
 38         printf("\t%s", column_value[i]);
 39     }
 40     printf("\n");
 41     return 0;
 42 }
 43
 44 int show_all(sqlite3 *db)
 45 {
 46     int ret = 0;
 47     char *errmsg = 0;
 48     ret = sqlite3_exec(db, "select * from t", print_record, NULL, &errmsg);
 49     if (ret != SQLITE_OK)
 50     {
 51         fprintf(stderr,"query SQL error: %s\n",errmsg);
 52     }
 53     return 0;
 54 }
 55
 56 int insert_node(sqlite3 *db, int id, char * msg)
 57 {
 58     int ret = 0;
 59     char *errmsg = 0;
 60     char cmd[256] = { 0 };
 61     sprintf(cmd, "insert into t(id,msg) values(%d,\‘%s\‘)", id, msg);
 62     printf("%s\n", cmd);
 63     ret = sqlite3_exec(db, cmd, NULL, NULL, &errmsg);
 64     printf("Insert a record %s\n",
 65            ret == SQLITE_OK ? "OK":"FAIL");
 66     return ret;
 67 }
 68
 69
 70 int main()
 71 {
 72     char *errmsg = 0;
 73     int ret = 0;
 74
 75     int index = 0;
 76     char msg[128] = { 0 };
 77
 78     sqlite3 *db = 0;
 79     ret = sqlite3_open("./sqlite3-demo.db",&db);
 80     if(ret != SQLITE_OK)
 81     {
 82         fprintf(stderr,"Cannot open db: %s\n",sqlite3_errmsg(db));
 83         return 1;
 84     }
 85     printf("Open database\n");
 86
 87     //简单的删除操作可以直接使用sqlite3_exec即可。这里不需要回调函数以及回调函数的参数。 当然需要可以关注sqlite3_exec返回的结果是否为SQLITE_OK的值。
 88     //sqlite3_exec(db,sql_drop_table,NULL,NULL,&errmsg);
 89     ret = create_tabel(db);
 90     for (index = 0; index < 10; index++)
 91     {
 92         sprintf(msg, "index%d --", index);
 93         insert_node(db, index, msg);
 94     }
 95     show_all(db);
 96
 97     sqlite3_free(errmsg);
 98     sqlite3_close(db);
 99
100     printf("Close database\n");
101
102     return 0;
103 }

 demo的Makefile文件,该make文件使用广泛的万能makefile文件;

makefile中需要注意:

-L/opt/sqlite3/lib
-lsqlite3

编译命令:

1 make CROSS_COMPILE=arm-none-linux-gnueabi- distclean
2 make CROSS_COMPILE=arm-none-linux-gnueabi- all
3
4 cp __install/sqlite_demo.elf ../../install/opt/sqlite3/demo/

附makefile文件:

  1 #############################################################################
  2
  3 #
  4
  5 # Generic Makefile for C/C++ Program
  6
  7 #
  8
  9 # License: GPL (General Public License)
 10
 11 # Author:  whyglinux <whyglinux AT gmail DOT com>
 12
 13 # Date:    2006/03/04 (version 0.1)
 14
 15 #          2007/03/24 (version 0.2)
 16
 17 #          2007/04/09 (version 0.3)
 18
 19 #          2007/06/26 (version 0.4)
 20
 21 #          2008/04/05 (version 0.5)
 22
 23 #
 24
 25 # Description:
 26
 27 # ------------
 28
 29 # This is an easily customizable makefile template. The purpose is to
 30
 31 # provide an instant building environment for C/C++ programs.
 32
 33 #
 34
 35 # It searches all the C/C++ source files in the specified directories,
 36
 37 # makes dependencies, compiles and links to form an executable.
 38
 39 #
 40
 41 # Besides its default ability to build C/C++ programs which use only
 42
 43 # standard C/C++ libraries, you can customize the Makefile to build
 44
 45 # those using other libraries. Once done, without any changes you can
 46
 47 # then build programs using the same or less libraries, even if source
 48
 49 # files are renamed, added or removed. Therefore, it is particularly
 50
 51 # convenient to use it to build codes for experimental or study use.
 52
 53 #
 54
 55 # GNU make is expected to use the Makefile. Other versions of makes
 56
 57 # may or may not work.
 58
 59 #
 60
 61 # Usage:
 62
 63 # ------
 64
 65 # 1. Copy the Makefile to your program directory.
 66
 67 # 2. Customize in the "Customizable Section" only if necessary:
 68
 69 #    * to use non-standard C/C++ libraries, set pre-processor or compiler
 70
 71 #      options to <MY_CFLAGS> and linker ones to <MY_LIBS>
 72
 73 #      (See Makefile.gtk+-2.0 for an example)
 74
 75 #    * to search sources in more directories, set to <SRCDIRS>
 76
 77 #    * to specify your favorite program name, set to <PROGRAM>
 78
 79 # 3. Type make to start building your program.
 80
 81 #
 82
 83 # Make Target:
 84
 85 # ------------
 86
 87 # The Makefile provides the following targets to make:
 88
 89 #   $ make           compile and link
 90
 91 #   $ make NODEP=yes compile and link without generating dependencies
 92
 93 #   $ make objs      compile only (no linking)
 94
 95 #   $ make tags      create tags for Emacs editor
 96
 97 #   $ make ctags     create ctags for VI editor
 98
 99 #   $ make clean     clean objects and the executable file
100
101 #   $ make distclean clean objects, the executable and dependencies
102
103 #   $ make help      get the usage of the makefile
104
105 #
106
107 #===========================================================================
108
109
110
111 ## Customizable Section: adapt those variables to suit your program.
112
113 ##==========================================================================
114
115 #-include ../Rules.make
116
117 # The pre-processor and compiler options.
118
119 MY_CFLAGS =
120
121
122
123 # The linker options.
124
125 MY_LIBS   = -L/opt/sqlite3/lib
126
127
128
129 # The pre-processor options used by the cpp (man cpp for more).
130
131 CPPFLAGS  = -Wall -g -O2
132
133
134
135 # The options used in linking as well as in any direct use of ld.
136
137 LDFLAGS   += -lrt -lsqlite3
138
139 # The directories in which source files reside.
140
141 # If not specified, only the current directory will be serached.
142
143 SRCDIRS   = ./include .
144
145 # The files that are not included during compilation.
146
147 EX_SRCS   =
148
149 # The executable file name.
150
151 # If not specified, current directory name or `a.out‘ will be used.
152
153 PROGRAM   = sqlite_demo
154
155
156
157 MY_INSTALLPROGRAM = ./__install/sqlite_demo.elf
158
159
160
161
162
163 ## Implicit Section: change the following only when necessary.
164
165 ##==========================================================================
166
167
168
169 # The source file types (headers excluded).
170
171 # .c indicates C source files, and others C++ ones.
172
173 #SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp
174
175 SRCEXTS = .c
176
177
178
179 # The header file types.
180
181 #HDREXTS = .h .H .hh .hpp .HPP .h++ .hxx .hp
182
183 HDREXTS = .h
184
185
186
187 # The pre-processor and compiler options.
188
189 # Users can override those variables from the command line.
190
191 #CFLAGS  = -g -O0 -Wall -mcpu=arm926ej-s -march=armv5t
192
193 CXXFLAGS= -g -O2
194
195
196
197 GNU_TOOLCHAIN_PREFIX = $(CROSS_COMPILE)
198
199 # The C  program compiler.
200
201 CC     = $(GNU_TOOLCHAIN_PREFIX)gcc
202
203 # The C++ program compiler.
204
205 # CXX    = $(GNU_TOOLCHAIN_PREFIX)g++
206
207 # Un-comment the following line to compile C programs as C++ ones.
208
209 # CC     = $(CXX)
210
211 # The command used to delete file.
212
213 RM     = rm -f
214
215
216
217 ETAGS = etags
218
219 ETAGSFLAGS =
220
221
222
223 CTAGS = ctags
224
225 CTAGSFLAGS =
226
227 #VERBOSE_COMMAND = noquiet
228
229 ## Quiet commands
230
231 ifeq ($(VERBOSE_COMMAND),)
232
233 Q           = @
234
235 Q_compile   = @echo ‘  CC  $< => [email protected]‘;
236
237 Q_link      = @echo ‘  LD  [email protected]‘;
238
239 Q_ar        = @echo ‘  AR  [email protected]‘;
240
241 Q_mkdir     =  echo ‘  MKDIR  $1‘;
242
243 Q_clean     = @echo ‘  CLEAN‘;
244
245 Q_distclean = @echo ‘  DISTCLEAN‘;
246
247 endif
248
249 ## Stable Section: usually no need to be changed. But you can add more.
250
251 ##==========================================================================
252
253 SHELL   = /bin/sh
254
255 EMPTY   =
256
257 SPACE   = $(EMPTY) $(EMPTY)
258
259 ifeq ($(PROGRAM),)
260
261   CUR_PATH_NAMES = $(subst /,$(SPACE),$(subst $(SPACE),_,$(CURDIR)))
262
263   PROGRAM = $(word $(words $(CUR_PATH_NAMES)),$(CUR_PATH_NAMES))
264
265   ifeq ($(PROGRAM),)
266
267     PROGRAM = a.out
268
269   endif
270
271 endif
272
273 ifeq ($(SRCDIRS),)
274
275   SRCDIRS = .
276
277 endif
278
279 ALL_SRS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS))))
280
281 SOURCES = $(filter-out $(EX_SRCS),$(ALL_SRS))
282
283 HEADERS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(HDREXTS))))
284
285
286
287 CFLAGS   = $(foreach i,$(SRCDIRS),-I$i)
288
289
290
291 SRC_CXX = $(filter-out %.c,$(SOURCES))
292
293 OBJS    = $(addsuffix .o, $(basename $(SOURCES)))
294
295 DEPS    = $(OBJS:.o=.d)
296
297
298
299 ## Define some useful variables.
300
301 DEP_OPT = $(shell if `$(CC) --version | grep "GCC" >/dev/null`; then 302
303                   echo "-MM -MP"; else echo "-M"; fi )
304
305 DEPEND      = $(CC)  $(DEP_OPT)  $(MY_CFLAGS) $(CFLAGS) $(CPPFLAGS)
306
307 DEPEND.d    = $(subst -g ,,$(DEPEND))
308
309 COMPILE.c   = $(Q_compile)$(CC)  $(MY_CFLAGS) $(CFLAGS)   $(CPPFLAGS) -c
310
311 COMPILE.cxx = $(Q_compile)$(CXX) $(MY_CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c
312
313 LINK.c      = $(Q_link)$(CC)  $(MY_CFLAGS) $(CFLAGS)   $(CPPFLAGS) $(LDFLAGS)
314
315 LINK.cxx    = $(Q_link)$(CXX) $(MY_CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
316
317
318
319 .PHONY: all objs tags ctags clean distclean help show
320
321
322
323 # Delete the default suffixes
324
325 .SUFFIXES:
326
327
328
329 all: $(PROGRAM)
330
331
332
333 # Rules for creating dependency files (.d).
334
335 #------------------------------------------
336
337
338
339 %.d:%.c
340
341     @echo -n $(dir $<) > [email protected]
342
343     @$(DEPEND.d) $< >> [email protected]
344
345
346
347 %.d:%.C
348
349     @echo -n $(dir $<) > [email protected]
350
351     @$(DEPEND.d) $< >> [email protected]
352
353
354
355 %.d:%.cc
356
357     @echo -n $(dir $<) > [email protected]
358
359     @$(DEPEND.d) $< >> [email protected]
360
361
362
363 %.d:%.cpp
364
365     @echo -n $(dir $<) > [email protected]
366
367     @$(DEPEND.d) $< >> [email protected]
368
369
370
371 %.d:%.CPP
372
373     @echo -n $(dir $<) > [email protected]
374
375     @$(DEPEND.d) $< >> [email protected]
376
377
378
379 %.d:%.c++
380
381     @echo -n $(dir $<) > [email protected]
382
383     @$(DEPEND.d) $< >> [email protected]
384
385
386
387 %.d:%.cp
388
389     @echo -n $(dir $<) > [email protected]
390
391     @$(DEPEND.d) $< >> [email protected]
392
393
394
395 %.d:%.cxx
396
397     @echo -n $(dir $<) > [email protected]
398
399     @$(DEPEND.d) $< >> [email protected]
400
401
402
403 # Rules for generating object files (.o).
404
405 #----------------------------------------
406
407 objs:$(OBJS)
408
409
410
411 %.o:%.c
412
413     $(COMPILE.c) $< -o [email protected]
414
415
416
417 %.o:%.C
418
419     $(COMPILE.cxx) $< -o [email protected]
420
421
422
423 %.o:%.cc
424
425     $(COMPILE.cxx) $< -o [email protected]
426
427
428
429 %.o:%.cpp
430
431     $(COMPILE.cxx) $< -o [email protected]
432
433
434
435 %.o:%.CPP
436
437     $(COMPILE.cxx) $< -o [email protected]
438
439
440
441 %.o:%.c++
442
443     $(COMPILE.cxx) $< -o [email protected]
444
445
446
447 %.o:%.cp
448
449     $(COMPILE.cxx) $< -o [email protected]
450
451
452
453 %.o:%.cxx
454
455     $(COMPILE.cxx) $< -o [email protected]
456
457
458
459 # Rules for generating the tags.
460
461 #-------------------------------------
462
463 tags: $(HEADERS) $(SOURCES)
464
465     $(ETAGS) $(ETAGSFLAGS) $(HEADERS) $(SOURCES)
466
467
468
469 ctags: $(HEADERS) $(SOURCES)
470
471     $(CTAGS) $(CTAGSFLAGS) $(HEADERS) $(SOURCES)
472
473
474
475 # Rules for generating the executable.
476
477 #-------------------------------------
478
479 $(PROGRAM):$(OBJS)
480
481 ifeq ($(SRC_CXX),)              # C program
482
483     $(LINK.c)   $(OBJS) $(MY_LIBS) -o [email protected]
484
485     @echo Type ./[email protected] to execute the program.
486
487 else                            # C++ program
488
489     $(LINK.cxx) $(OBJS) $(MY_LIBS) -o [email protected]
490
491     @echo Type ./[email protected] to execute the program.
492
493 endif
494
495     cp -f $(PROGRAM)  $(MY_INSTALLPROGRAM)
496
497 ifndef NODEP
498
499 ifneq ($(DEPS),)
500
501   sinclude $(DEPS)
502
503 endif
504
505 endif
506
507
508
509 install:
510
511     cp -f $(PROGRAM)  $(MY_INSTALLPROGRAM)
512
513 clean:
514
515     $(Q_clean)$(RM) $(OBJS) $(PROGRAM) $(PROGRAM).elf
516
517
518
519 distclean: clean
520
521     $(Q_distclean)$(RM) $(DEPS) TAGS
522
523
524
525 # Show help.
526
527 help:
528
529     @echo ‘Generic Makefile for C/C++ Programs (gcmakefile) version 0.5‘
530
531     @echo ‘Copyright (C) 2007, 2008 whyglinux <[email protected]>‘
532
533     @echo
534
535     @echo ‘Usage: make [TARGET]‘
536
537     @echo ‘TARGETS:‘
538
539     @echo ‘  all       (=make) compile and link.‘
540
541
542
543     @echo ‘  NODEP=yes make without generating dependencies.‘
544
545     @echo ‘  objs      compile only (no linking).‘
546
547     @echo ‘  tags      create tags for Emacs editor.‘
548
549     @echo ‘  ctags     create ctags for VI editor.‘
550
551     @echo ‘  clean     clean objects and the executable file.‘
552
553     @echo ‘  distclean clean objects, the executable and dependencies.‘
554
555     @echo ‘  show      show variables (for debug use only).‘
556
557     @echo ‘  help      print this message.‘
558
559     @echo
560
561     @echo ‘Report bugs to <whyglinux AT gmail DOT com>.‘
562
563
564
565 # Show variables (for debug use only.)
566
567 show:
568
569     @echo ‘PROGRAM     :‘ $(PROGRAM)
570
571     @echo ‘SRCDIRS     :‘ $(SRCDIRS)
572
573     @echo ‘HEADERS     :‘ $(HEADERS)
574
575     @echo ‘SOURCES     :‘ $(SOURCES)
576
577     @echo ‘SRC_CXX     :‘ $(SRC_CXX)
578
579     @echo ‘OBJS        :‘ $(OBJS)
580
581     @echo ‘DEPS        :‘ $(DEPS)
582
583     @echo ‘DEPEND      :‘ $(DEPEND)
584
585     @echo ‘COMPILE.c   :‘ $(COMPILE.c)
586
587     @echo ‘COMPILE.cxx :‘ $(COMPILE.cxx)
588
589     @echo ‘link.c      :‘ $(LINK.c)
590
591     @echo ‘link.cxx    :‘ $(LINK.cxx)
592
593
594
595 ## End of the Makefile ##  Suggestions are welcome  ## All rights reserved ##
596
597 #############################################################################

时间: 2024-12-09 09:57:07

构建嵌入式Web(goahead+sqlite3+matrixssl)服务器之一:移植sqlite的相关文章

嵌入式web服务器

现在在嵌入式设备中所使用的web服务器主要有:boa.thttpd.mini_httpd.shttpd.lighttpd.goaheand.appweb和apache等. Boa 1.介绍 Boa诞生于1991年,作者Paul Philips.是开源的,应用很广泛,特别适合于嵌入式设备,网上流行程度很广.它的官方网站说boa是最受人喜爱的嵌入式web服务器.功能较为强大,支持认证,cgi等.Boa 是一个单任务的HTTP SERVER,它不像传统的web服务器那样为每个访问连接开启一个进程,也不

嵌入式web server——Goahead移植摘要

前言 在嵌入式设备中,在没有液晶显示的情况下,可以使用web来访问设备,查看设备的运行状态以及进行参数设置,类似于路由器设置.网上有很多关于各种web server的优劣的评论,在此不讨论,只是介绍其中的Goahead在linux下移植的一些要点. 移植环境 arm + linux 2.6,交叉编译器arm-uclibc-gcc 移植要点 1.把src目录下的certs.utils.goahead-openssl目录都删除掉. 2.把osdep里面的osdep.h移到外层src去. 3.把goa

实验五(简单嵌入式WEB服务器实验)问题总结

实验五问题总结 问题链接:<信息安全系统设计基础>实验五实验报告 虽然将07_httpd文件中全部拷贝进了bc中,文件夹中拥有Makefile文件,但是还是无法通过make得到该文件夹中copy和httpd的可执行文件.解决:第一次是觉得Makefile文件中的PATH路径不对,将其改成了/home/bc/07_httpd存盘退出后发现还是无法执行,第二次我们直接使用gcc对其单步进行编译:armv4l-unknow-linux-gcc –E copy.c –o copy.iarmv4l-un

信息安全系统设计基础实验五:简单嵌入式 WEB 服务器实验 (20135229,20135234)

北京电子科技学院(BESTI) 实     验    报     告 课程:信息安全系统设计                         班级:1352 姓名:马启扬 吕松鸿     学号:20135234 20135229 成绩:             指导教师:娄嘉鹏      实验日期:2015.11  实验密级:       预习程度:               实验时间:15:30—17:00  仪器组次:       必修/选修:必修        实验序号:05    实验

三种嵌入式web服务器(Boa / lighttpd / shttpd)的 linux移植笔记

一:移植Boa(web服务器)到嵌入式Linux系统 一.Boa程序的移植 1.下载Boa源码    下载地址: http://www.boa.org/    目前最新发行版本: 0.94.13   (几年没更新版本了)    下载 boa-0.94.13.tar.gz, 注意:若从boa上下载的是boa-0.94.13.tar.tar,解压方式一样    解压: 2.生成Makefile文件   进入boa-0.94.13,直接运行src/configure文件 [[email protect

实验5 简单嵌入式WEB服务器实验 实验报告 20135303 20135326

北京电子科技学院(BESTI) 实     验    报     告 课程:信息安全系统设计基础                班级:  1353 姓名:20135303 魏昊卿 学号:20135326 王亦可 成绩:             指导教师: 娄嘉鹏             实验日期:2015.12.03 实验密级:         预习程度:                     实验时间:15:30~18:00 仪器组次:          必修/选修:必修          

嵌入式Linux上通过boa服务器实现cgi/html的web上网【转】

转自:http://blog.csdn.net/tianmohust/article/details/6595996 版权声明:本文为博主原创文章,未经博主允许不得转载. 嵌入式Linux上通过boa服务器实现cgi/html的web上网简介: 第一步 Boa程序的移植 1.下载Boa源码 2.生成Makefile文件 3.修改Makefile文件 4.编译 第二步 Boa的配置 第三步boa的执行 1.将根文系统ramdisk在电脑主机上mount &nda  嵌入式linux上通过boa服务

嵌入式开发之web服务器---boa移植

近段时间在做ti8148的编解码器又涉及到boa web服务器的移植.在移植到ARM开发板的过程中,遇到很多的问题.原先的自带thttpd 由于功能没有boa完善,比如在ubuntu下面的utf-8编码的网页在thttpd中给客户浏览器显示的是默认ios欧洲乱码,但是boa显示正常,就干掉了 现将移植步骤整理如下:(其中涉及到个人习惯和路径问题,视各自情况而定) 1.下载源码: 下载网址http://www.boa.org/boa-0.94.13.tar.gz,但实际上下载的包为boa-0.94

嵌入式web服务

:boa.thttpd.mini_httpd.shttpd.lighttpd.goaheand.appweb和apache等. Boa 1.介绍 Boa诞生于1991年,作者Paul Philips.是开源的,应用很广泛,特别适合于嵌入式设备,网上流行程度很广.它的官方网站说boa是最受人喜爱的嵌入式web服务器.功能较为强大,支持认证,cgi等.Boa 是一个单任务的HTTP SERVER,它不像传统的web服务器那样为每个访问连接开启一个进程,也不会为多个连接开启多个自身的拷贝.Boa对所有