Kernel module ProgrammingFirst, the preparatory workVirtual machines: VMware Workstation 12Operating system: UbuntuCurrent kernel version: Linux-headers-4.4.0-22-genericIi. Knowledge of kernel modulesA module is a standalone program that can be compiled separately, but not run independently. It is linked to the kernel
Turn from: http://www.cnblogs.com/wang_yb/archive/2012/08/15/2640972.html
This article briefly introduces the basic concepts of kernel-related.
Main content: Single kernel and microkernel kernel version number
1. Single Kernel and microkernel
Principle
Advantage
Disadvantage
Single
How to add the graphics card module (private driver) of the old kernel for the new kernel-Linux general technology-Linux programming and kernel information. The following is a detailed description. Ask about the make localmodconfig command used by the newly compiled kernel. Because the system used for compilation is th
I. Linux configuration and compilation
Linux has the following advantages:
1. Clear temporary files, intermediate files, and configuration files
(1) make clean: delete most of the generated files, but keep the configuration file
(2) Make mrproper: delete all generated files and configuration files
(3) make distclean: Delete the patch and backup files of the editor based on make mrproper.
2. Determine the hardware and software configurations of the target system, such as the CPU type,
Bootloader and kernel with the start-up process--------------------------------------------The ARM9 board has a Norflash chip that stores the basic Bootlader code, which is the 0 address where the CPU executes the code. The 4kRam space inside the CPU acts as the stack and data segment storage at this time. Because it is Samsung's own chip, so the hardware above can be implemented to Nandflash before the 4K code automatically copied to the Iram (the im
Kernel Synchronization Method
1. atomic operation
Atomic operations can ensure that commands are executed in an atomic manner-the execution process is not interrupted. The kernel provides two sets of atomic operation interfaces, one for integer operations, and the other for separate bit operations.
Atomic operations on integers can only process atomic_t data.
In addition to the atomic Integer Ope
CentOS kernel compilation (kernel upgrade)
1. view the system kernel version
# Uname-r2.6.18-92. el5
2,# Wgetwget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.gzDownload linux-3.13.tar.gzKernel source code file
3, # cd/usr/src/linux-3.13
4. # make mrproperClear environment variables, that is, clear the c
Transferred from: http://blog.csdn.net/bullbat/article/details/7401688A common pattern in kernel programming is to initialize an activity outside the current thread, and then wait for the activity to end. The activity might be to create a new kernel thread or a new user-space process, a request for an existing process, or some type of hardware action, and so on. In this case, we can use semaphores to synchr
"copyright notice: respect for the original, reproduced please retain the source: blog.csdn.net/shallnet. The article is for academic communication only and should not be used for commercial purposes " the memory image of a process consists of the following parts: code snippet, data segment, BSS segmentand Stack segments. And the area of the memory map,memory-mapped function mmap (), which is responsible for mapping the contents of the file to the virtual memory space of the process, through rea
Modify the Linux kernel kernel boot picture (originally a small penguin picture).
Reprint please indicate the source: Http://blog.csdn.net/wang_zheng_kai
Navigation guidance and Control laboratory December 10, 2014
This article mainly introduces three parts of the content:
1 "How to make the Linux kernel required to boot picture (ppm format);"
2 The two ways to m
sigttou, or control by the ptrace System Call of other processes, temporarily handing over the CPU to the control process.? Task_swapping: process in which the process page is swapped out of memory.(2) unsigned long flags;Process flag:? Pf_alignwarn prints the alignwarn warning.? Pf_ptraced is monitored by the ptrace system call.? Pf_tracesys is tracking.? The pf_forknoexec process has just been created but has not been executed yet.? Pf_superpriv Super User Privilege.? Pf_dumpcore dumped core.
U-boot kernel, file system download mode, u-boot Kernel1 Preparation 1.1 TFTP server
The host computer uses the Ubuntu system. The installation method of the TFTP server is as follows:
$ Sudo apt-get install tftpd-hpa
Open the tftp configuration file in the path:/etc/default/tftpd-hpa, as shown below:
TFTP_USERNAME = "tftp"TFTP_DIRECTORY = ""TFTP_ADDRESS = "0.0.0.0: 69"TFTP_OPTIONS = "-l-c-s"
Here, TFTP_DIRECTORY indicat
Linux kernel ———— queueLinux kernel--queueDefined:[CPP]View Plaincopy
struct __kfifo{
unsigned int in; //Queue offset, write index
unsigned int out; //Queue offset, read index
unsigned int mask;
unsigned int esize;
void *data;
}
Use:Create a queue that creates and initializes a kfifo of size:[CPP]View Plaincopy
__kfifo_alloc Int (struct __kfifo *fifo, unsigned
Linux Kernel 32-bit System Call simulation layer Kernel Privilege Escalation Vulnerability
Release date:Updated on: 2010-09-17
Affected Systems:Linux kernel 2.6.xDescription:--------------------------------------------------------------------------------Cve id: CVE-2010-3301
Linux Kernel is the
Linus Torvalds has upgraded the Linux kernel to Kernel 4.0.2, new kernel patches and newer Bluetooth, USB, SCSI, ACPI drivers, increased NFS and EXT4, and improved ARM64 and PowerPC architectures.In addition to updated drivers, enhanced support for new devices and file systems also brings the long-awaited life patching feature, allowing users to update the
The long and dark Prehistoric Age finally came to setup. In the setup Assembly function, Linux completes the transformation from prehistoric civilization to modern civilization by setting the PE bit of the Cr0 register (switching from the real mode to the protection mode. During the setup period, Linux has learned that the available memory resources in the world are far more than 1 MB. At this time, Linux's desire to expand, the first step to satisfy its desire, it began to seize the first 8 MB
Kernel Address Space Distribution
Direct ing zone: The maximum m range starting from 3G in a linear space. It is a direct memory ing zone. The linear address and physical address in this region have a linear conversion relationship: linear address = 3G + physical address.
Dynamic Memory ing area: This area is allocated by the kernel function vmalloc. It features linear space continuity, but the correspond
1. Install the kernel source code package:. SRC. rpm and. RPM packages have different installation methods. You can use rpm-qpl to query RPM content.
# Rpm-IVH kernel-2.6.32-431.el6.src.rpm
Warning: User mockbuild does not exist-using root
Warning: group mockbuild does not exist-using root
Ignore directly.
Ii. kernel source code is not generated in/usr/
Operating system kernel (linux), operating system kernel linux
Kernel of the Operating System)
Is a group of programs that focus on managing all activities of the computer and all hardware in the drive system.
With the kernel, developers do not have to consider the machine language, all hardware-related paramet
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.