Embedded Web Server on S3C4510 - Transplantation of boa under uclinux

Publisher:haoyingLatest update time:2024-11-11 Source: cnblogsKeywords:S3C4510 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Under uClinux, there are three main Web Servers: httpd, thttpd and Boa. Httpd is the simplest Web Server with the weakest functions. It does not support authentication and CGI. Both Thttpd and Boa support authentication, CGI, etc., and have relatively complete functions. In order to implement dynamic Web technology, here we choose to implement a Boa Web Server that supports CGI and is very suitable for embedded systems.
Boa is a single-task http server with open source code and high performance. At present, the source code of boa is already included in the uClinux code. To implement Boa under uClinux, some configuration and modification of Boa is required. This is mainly achieved by modifying the boa.conf and mime.types files. The following configurations need to be modified.
(1) Create a directory
Since the default root file system romfs of uClinux is read-only, you cannot use commands such as mkdir to create a new directory. Therefore, you should create the directory to be used before compiling the kernel. This can be done by modifying /

uclinux-samsung/vendors/Samsung/4510b/makefile
ROMFS_DIRS=bin dev etc home lib mnt proc usr var and adding home/web home/web/cgi-bin

3.7 after
it. Then modify it in /uclinux-samsung/Vendors/Samsung/4510b/inittab and
add: boa:unknown:/bin/boac/home after: inet:unknown:/bin/inetd.


(2) Specify the root directory path of the Web server (SERVER_ROOT)

/uclinux-samsung/user/boa/src/directory, and
specify SERVER_ROOT by modifying the #define ERVER_ROOT "/home" statement in the define.h file.

(3) Modify the boa.conf file
3.1
Modify in ./uclinux-samsung/user/boa/src/boa.conf:
*Change user obody to User 0
Group ogroup to Group 0;

3.2
*Change DocumentRoot/var/www
to DocumentRoot/home/web,

3.4
*Change MimeTypes/etc/mime.types
to MimeTypes/home/web/mime.types;

3.5
Define the default homepage and the directory where the CGI program is located, that is,

DirectoryIndex index.html
ScriptAlias/cgi-bin/ /home/web/cgi-bin/


After specifying in this way, .index.htm is the default value of the homepage seen by remote browsing clients accessing the Web Server. The CGI program written in C is compiled into a binary file and placed in the /cgi-bin/ directory. The CGI program can be executed correctly.

3.6
Boa.conf and mime.types files must be placed in the root directory of the Web server, so copy the modified bao.conf and mime.types to the "./uclinux-samsung/romfs/home/" directory.


3.8
make menuconfig------>kernel--->user setting---->miscellaneous configuration--->generic cgi& cgihtml

After the configuration process, recompile the kernel and select the Boa option when compiling. Download the compiled kernel to the development board, start uClinux, complete the IP configuration, start Boa Web Server, and then you can access your web page through IE. If you want to automatically start Boa Web Server when starting uClinux, you can modify the rc file, enter the uclinux-samsung/vendors/Samsung/4510B directory, and add two lines in the run script rc:

ifconfig eth0 192.168.168.101 up
boa-c /home/&


After the modification, recompile the kernel and download it to the development board for operation. After running uClinux, you can access your web pages directly through IE without any configuration.

Keywords:S3C4510 Reference address:Embedded Web Server on S3C4510 - Transplantation of boa under uclinux

Previous article:6410 sound card wm9713 driver analysis
Next article:My MiniGUI transplant journey

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号