A 20135211&20135216 of the basic experiment of information security system design

Source: Internet
Author: User

Beijing Institute of Electronic Technology (BESTI)Lab Report Cover

Courses: Fundamentals of information Security system designclass: 1352name: (rank by contribution size) Lihangyi's Liu Weihan School Number: (Ranked by contribution size) 20135211 20135216AchievementsTeacher Guidance: Lou Jia PengDate of Experiment: 2015.11.10Experimental ClassificationPreview LevelExperimental Time: 15:30-17:30Instrument Group Times: 11Compulsory/Elective: CompulsoryExperiment Serial Number: 1 Experiment name : s3c2410-based embedded development experiment purposes and requirements : 1. Be familiar with the Linux development environment and learn the configuration and use of the s3c2410-based Linux development environment.           2. Using Linux's ARMV4L-UNKNOWN-LINUX-GCC compilation, use NFS-based download debugging to understand the basic process of embedded development.             3. (required) Correct use of the cable and other experimental equipment, and pay attention to protect the experimental chamber. The lab is sent back after the experiment is over.   experimental instrument :-(name)               (model)              (qty)

                   -Embedded development platform UP-NETARM2410-CL 1 

                    -pc                                                          1

Body One, experimental content:

Based on mastering the methods and configuration of embedded development platform, this experiment requires the use of Windows Xp,linux (Red Hat), arm three systems, and the installation of ARM systems in a Linux system. The ARM platform is then used to compile the C language source files in the Linux system and execute the generated executable files in the Windows system.

Second, the experimental process: 1. Connecting the ARM Development Board
    • After receiving the test chamber, first open the test box to check the power cord, network cable, and the line, the socket line is not missing, and then remove the host after the protection plate, so that the socket behind the host to facilitate connection with the test box;
    • Make sure that the switch in the test chamber is in the off position. The network cable and the line of the experiment box are connected with the corresponding position on the main machine (unplug the previous network cable from the host). Plug the power cord into the power strip. Plug one end of the socket line at Port 0 of the arm board, and the other end is plugged into the host's corresponding location.
2. Build HyperTerminal
    • Under the Windows XP System of the lab machine, go to "start"--"All Programs"--"accessories"--"communication"-"HyperTerminal", double-click to open;
    • After opening, the program will automatically create a new communication terminal, in the popup dialog box, the terminal directly named Arm (icon selection by default), other settings are not mandatory, and click "OK". In the Properties dialog box that pops up, the baud rate is set to 115200, the data bit is set to 8, no parity, the stop bit is 1, and the data flow control is set to none.
3. Start the experimental platform
    • After the above setting is complete, the platform switch can be opened (switch is the dial type, from off to on). The connection information is displayed immediately in the arm-Super-Terminal dialog box (the time the information is displayed here depends on the machine, and some group machines wait longer after the connection);
    • Continue waiting until the interface appears as shown. Enter the Ifconfig command to record the IP of the arm machine as: 192.168.0.121.
4. Modify the IP of the Windows XP system so that it is in the same network segment as the IP of the arm machine
    • Open the "Control Panel" in Windows XP system--"network connection"-"Local Area Connection", double-click to view the status of the local connection, click "Properties", in the "General" tab, double-click the "Internet Protocol (TCP/IP)" that appears, View and modify the native IP (IP set in the experiment is 192.168.0.55);
    • Open the Vmvare virtual machine platform and import the red HAT.VMI file under C drive into the Linux environment in the "Import existing virtual machines" option. Then click "Start Here"-"System Settings"-"Network" (double-click), in the pop-up Network Configuration dialog box, click on "Edit"--"device", go to "Ethernet Service" tab, under "Manually set IP", modify Red Hat IP (IP set in the experiment is 192.168.0.234);
    • After modifying the IP, restart the virtual machine, IP to start the role. Use Ifconfig confirmation on the command line after reboot
5. Installing the arm compiler in red Hat
    • Back to the XP system, click "Start"-"Run", enter the ip:\192.168.0.234 of the virtual machine, will be prompted to enter the user name and Password dialog box, enter the user name BC, password 123456 Then make sure to go to the folder (BC) shared with the virtual machine (Samba Server dialog box);
    • The Linux virtual machine can operate the software installation package by extracting the software installation package, which is included in the Armv4l-tools package, into the BC folder (or copying to this point).
    • Go to the virtual machine, enter "CD/HOME/BC" (carriage return) and "CD Armv4l-tools" (carriage return), you can enter into the folder containing install.sh. (You can enter the LS command to view the existing file directory, to determine if the path contains a install.h file), and then enter the./install.sh in the command line, the installation script will automatically establish the directory, configure the compilation environment.

6. Configure Environment variables
    • Use "Vi/root/.bash profile" in the virtual machine toenter the bashprofiles (the file is a hidden system file that can be viewed with ls-a);
    • Modify the path variable to path= $PATH: $HOME/bin:/opt/host/armv4l/bin/(that is, add a path);
    • Save the file, then execute: source/root/.bash_profile, then armv4l-unknown-linux-gcc will be automatically searched, can be entered on the terminal.
7. Writing and Compiling files
    • In the virtual machine into the folder/ROOT/BC, in this directory to write hello.c file (vi hello.c can create and edit hello.c file, edit the end of the input: Wq save and exit);
    • Compile the hello.c with the command armv4l-unknown-linux-gcc hello.c-o Hello, and generate the hello executable file;
    • You can use the LS command to see if the hello.c and Hello executables appear in the BC folder.
8. Download and debug
    • Mount the shared folder in the XP Hyper Terminal, establish communication between the board and the virtual machine (mounted in the previous step, only need to check the following hello.c and hello files with the LS command on the arm command line in the current system's BC folder);
    • In the ARM command line, enter the command "Mount-t nfs-o nolock 192.168.0.234:/HOME/BC (space)/host" to complete the download;
    • Enter the./hello command to execute the hello file.  

Third, the experimental principle of understanding 1. How do I view an IP address?

The first thing to understand is the meaning of IP. Each terminal (host) on the network has an IP address that uniquely identifies the host. In other words, there is no IP, no IP address, and nature can not be viewed (some teams are not connected to the network cable, resulting in the XP host host is not connected to the IP address can not be viewed). then, since the IP address is related to the network connection, it is natural to view the IP in Network connections. Because the host is not connected via a wireless connection in this experiment, it should be viewed in "Local Area Connection".

2. Why make the first three bits of IP in xp,arm,red hat three systems consistent?

In this experiment, only the system within the same LAN can pass data to each other, so the IP of the three systems that need to pass data to each other is configured in the same network segment. According to the subnet mask of the three systems are 255.255.255.0 (meaning that each IP address the first three decimal segments are identified network segment), it is natural to change the IP of three systems to the first three paragraphs consistent.

What is the function of 3.arm machine?

We have a general understanding of arm by looking at the materials of the experimental package. arm is essentially a Linux embedded development platform, and after the host is connected to it, it implements the operation of the ARM board via the host by downloading relevant software (such as HyperTerminal Companion software). The principle of this development system, which consists of the arm machine and the host, the host, is as follows: The PC running Linux (host) uses the cross-compilation, assembly, and connection tools on the host to form the executable binary code (this executable code cannot be executed on the host, And can only be executed on the target board, and then download the executable to the target machine to run. Debugging a lot of methods, you can use the serial port, Ethernet port, etc., the specific use of which debugging method can be based on the target processor to provide support to make a choice.

Iv. difficulties in the experimental process 1. About the inability of the arm machine to connect to the XP system

In the experiment, many groups have had this problem. In the course of our help with other teams debugging, we found the following reasons:

    • The connection between the arm machine and the host is wrong (should be connected to port No. 0);
    • There is no connection cable or network cable Connection error (some teams found that the host connected to a network cable, there is no arm machine and the host through the network cable connection, some groups are mistakenly the telephone line as a network cable);
2. The "Cannot find this network path" issue after entering the ip:\192.168.0.234 of the virtual machine in step 5th

This happens, there must be a problem with the network connection. This problem has arisen in our team during the experiment. After checking the cable connection confirmation, we checked the arm machine, Linux virtual machine and XP IP separately. found that it was in the configuration of the XP system's IP when the problem occurred: the XP system when configuring IP, in turn, opened a number of dialog boxes, after configuring the IP, click OK and close the dialog box to make the newly modified IP take effect.

3. When compiling hello.c, "not found" is indicated?

This problem occurs when you modify PATH environment variable paths without modifying the success. There are two solutions:

    • Enter the Bash_profile file again, modify and save the path;
    • Add a path directly to hello.c before GCC compiles/opt/host/armv4l/bin/

A 20135211&20135216 of the basic experiment of information security system design

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.