20145221 High &20145326 Cai "the foundation of Information Security system Design" experiment of five simple embedded web server

Source: Internet
Author: User

20145221 High &20145326 Cai "the foundation of Information Security system Design" experiment of five simple embedded web server

Purpose and requirements of the experiment
    • Master the process of implementing a simple Web server in the arm Development Board.
    • Learn the socket network programming on the arm Development Board.
    • Learn the call of the signal () function in a Linux environment.
Principle of experiment
    • On a Linux PC, the ARM-LINUX-GCC compiler is used to compile executable code for the Linux arm platform.

    • Learn the fundamentals of multi-threaded programming.

    • Learn the use of Pthread library functions.

Configuration of the experimental process development environment

Reference Experiment One

Read the experiment code and copy it to the shared folder. Modify the makefile with reference to the experimental instruction book:

Compiling the application

Enter the 07_httpd folder, run make to generate the executable file httpd, and then enter

    • Armv4l-unknown-linux-gcc-o. /BIN/HTTPD HTTPD.O Copy.o-lpthread

    • Armv4l-unknown-linux-gcc-o httpd HTTPD.O Copy.o-lpthread

When you view the folder again, you can see that the httpd executable has been generated.

Download Debug

Use the NFS service to download the httpd to HyperTerminal and copy the test page for debugging, and then wait for the interface to connect.

Native test

Enter http://192.168.0.121 in the desktop browser to observe the results of the connection request in the client's browser and the print information for the server on the Development Board.

    • The result of the connection request in the client's browser is as follows:

    • Print information on the server on the Development Board:

Problems encountered and their solutions
    • The makefile file should be modified according to the experiment Instruction book.

    • Make compilation problems and solutions

Problem: error127 appears during make.

FIX: Found the reason, is the environment variable configuration has a problem, is the copy code when a Rules.mak Mak type file is not copied together, resulting in the make command can not be used, reconfigure the normal make.

Experience

After the experiment was completed and the relevant environment variables were well configured, the process was relatively smooth. There is no big problem, but if the experiment instruction book is carefully studied in advance, the experimental results should be better. This semester the basic experiment of information security design is over, in these five experiments, our team to solve problems and the ability to practice has been improved, the operating system and related ARM board development has a deeper understanding and understanding. Thanks for the teacher's guidance and help!!!

20145221 High &20145326 Cai "the foundation of Information Security system Design" experiment of five simple embedded web server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.