20135202 Shang, 20135220 talk about sensitivity-Experiment 4

Source: Internet
Author: User

Beijing Institute of Electronic Technology (BESTI)

Real Inspection report

Course: Information Security system Design Basic class: 1352

Name: Shang, talk about the more sensitive

School Number: 20135202,20135220

Score: Instructor: Lou Jia Peng Experimental Date: 2015.11.17

Experiment level: Preview degree: Experiment time: 15:30-18:00

Instrument Group: Compulsory/Elective: compulsory Test number: 4

Experiment Name: Introduction to Kernel-driven design-module-driven experiment

Experimental purposes and Requirements:(1) Learn The principle of driving design under LINUX

( 2 Master the process of driving development and debugging by using module mode.                 

Experimental instrument:

Name

Model

Number

Arm

Up-tech

1

PC Machine

Xp

1

Virtual machines

REDHAT

1

Experiment contents, steps and experience:

    1. The understanding of the experiment process, the understanding of the knowledge point in the experiment instruction book.

(1) What is the difference between using GCC to compile and use cross-compilation?

GCC compilation is just a compilation under Linux, then you need to use the following command to build the device node:

#mknod/dev/demo C 254 0

If you use a cross-compiler, you do not need to establish a device node.

(2) How to test the driver?

The first step is to insert the driver module DEMO.O, then you can use the Lsmod command to see if the module has been inserted, you can also use the Rmmod command to unload the module when you do not use it. Then run the test program to see if the results are consistent with what you expect.

    1. The problems encountered during the experiment and the solutions.

(1) The insertion of the driver module failed as follows:

[Email protected] 01_demo]#./test_demo

# # # #DEMO Device Open fail####

This is mainly because, because the manual compilation of code is too cumbersome, we chose to use make method, will be slightly modified makefile can be used, but we mistakenly default to make using cross-compiling, but actually with the GCC compiled, so the lack of device node establishment, After this step, it succeeded.

(2) Compile failed

After reviewing the instructions, it was found that a Linux connection could not be established under/USR/SRC, and the following command could be used to solve the problem.

[Email protected] 01_demo]# cd/usr/src/

[Email protected] src]# LN-SF linux-2.4.20-8 Linux

[[email protected] src]# ls

Debug Linux linux-2.4 linux-2.4.20-8 redhat

For ln directives:

The usage of the LN directive is to concatenate, using the format is ln [options] Source dist, here we use the meaning of the SF parameter is:

-F: Delete the file with the Dist file name first when linking

-S: Soft link. (soft link, also known as symbolic link, this file contains the path name of another file, which is characterized by the ability to link files of different file systems and even links to nonexistent files.) )

20135202 Shang, 20135220 talk about sensitivity-Experiment 4

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.