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.
Previous article:6410 sound card wm9713 driver analysis
Next article:My MiniGUI transplant journey
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Solution to TI cc2538 serial port failure to program and bootloader failure to enter
- High frequency switching power supply
- Shenzhen Electronic Hardware Engineer Recruitment
- Fill block copper plating hazards!
- IC designer - the most promising IT profession in the next 10 years
- Chinese Academy of Sciences releases domestic open source RISC-V processor "Xiangshan": the first version is scheduled to be taped out in July
- Add chicken drumsticks to today's post! Come and have a look~
- Trump administration "blacklists" Xiaomi, Xiaomi using Qualcomm chips is a "military-related company"???
- 『Anxinke Bluetooth Development Board PB-02-Kit』-3: Start Docker
- Principle and design of high frequency planar transformer