Basic experiment of information security system design 120,135,233 Yeung Kwong

Source: Internet
Author: User

Cover

Courses: Fundamentals of information Security system designclass: 1352name: (rank by contribution size) Yeung KwongSchool Number: (Ranked by contribution size) 20135233AchievementsTeacher Guidance: Lou Jia PengDate of Experiment: 2015.11.10 Experimental ClassificationPreview LevelExperimental Time: 15:30-17:30Instrument Group Times: 33Compulsory/Elective: CompulsoryExperiment Serial Number: 1Experiment Name: Embedded development based on s3c2410purpose and requirements of the experiment:   1. Be familiar with the Linux development environment and learn the configuration and use of 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)

< Span class= "Apple-converted-space" >< Span class= "Apple-converted-space" >< Span class= "Apple-converted-space" >< Span class= "Apple-converted-space" >< Span class= "Apple-converted-space" >                   -Embedded development platform UP-NETARM2410-CL 1&NBSP;

-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). Display the connection information immediately in the arm-Super-terminal dialog box;
    • 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 bashprofiles;
    • Modify the PATH variable to path= $PATH: $HOME/bin:/opt/host/armv4l/bin/;
    • 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.

 

Three, the principle of experiment understanding the various options of the 1.mount command
Mount-t Nfs-o nolock 192.168.0.234:/root/bc/host
"-T NFS" specifies that the file system type is a file network share type, "-O nolock" closes the file lock, "192.168.0.234:" For the device to be hooked up, "/root/bc/host" means to mount the device/root/ The files in the BC directory are in the native host folder.
2. Set the meaning of the IP?

Only systems 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. Because the subnet mask for three systems is 255.255.255.0 (meaning that the first three decimal segments of each IP address are identified network segments), the IP of the three systems is modified to be the same as the first three segments.

What is the function of 3.arm machine?

Arm is a Linux embedded development platform, and after the host is connected to it, it realizes the operation of the ARM board through the mainframe via HyperTerminal. The principle is as follows: when a PC running Linux (host) is developed, it uses the cross-compilation, assembly, and connection tools on the host to form an executable binary code and then downloads the executable to run on the target machine. 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.

Four, the difficulty of the experiment process 1.arm machine can not connect the XP system properly

Just started to connect all the lines, found that HyperTerminal did not respond, and later found that should be 0, instead of 1, after the opening, re-open arm machine can be.

2. Unable to install Armv4l-tools

The previous several times has been playing into armv41, so always cannot install, later teacher said after, change to L, can install.

3. The meaning of "armv4l-unknown-linux" does not understand

Armv4l-unknown-linux: This is the Cross compiler (ARM-LINUX-GCC) compile command for the Development Board program compilation.

Five, experimental thoughts

The experiment in general is still very smooth, and it let me understand that theoretical learning can not be separated from practice, practice once many just "know" the knowledge into the "will use" knowledge, the configuration and use of the Linux development environment has a more profound consciousness, can be proficient in compiling, running the program.
In addition, teacher, you see me this experiment with the report is a person wrote, add points bai ?

Basic experiment of information security system design 120,135,233 Yeung Kwong

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.