Linux system startup process details-What happened after power-on-linux Kernel Analysis (0)
This article references the following articles:
A deep understanding of the linux Startup Process
Mbr (Master Boot Record ))
The process from powering on the computer to executing the main function of the Operating System
Detail
Basic synchronization mechanism of the kernel:Key features of the preemption kernel: a process running in the kernel state that may be replaced by another process during kernel functions execution.Kernel preemption: Linux 2.6 Allows users to configure the kernel to be very e
/proc/kallsyms records the names and addresses of all the exported symbols in the kernel
We need to compile 2 kernel modules, and then one of the kernel modules to call functions in another kernel module
The HELLO.C code is as follows
#include
From this we can see that we have called 2 functions Add_integar and Sub
Do you want to know how to become a Linux kernel developer? Or your boss tells you, "Write a Linux driver for this device. "The purpose of this document is to describe the process you need to go through and instruct you how to work with the community to teach you all the knowledge you need to know for these purposes. This article also explains why the community w
Kernel synchronizationSynchronous introductionThe concept of synchronizationCritical section: Also known as a critical segment, is the code snippet that accesses and operates shared data.Competition conditions: 2 or more than 2 threads are executed simultaneously in the critical section, which constitutes a competitive condition.The so-called synchronization, in fact, prevent the formation of competitive conditions in the critical area.If the critical
since you are dealing with kernel modules, it is natural to understand the dependencies between the modules provided by the kernel. Basically, the kernel module is placed at/lib/modules/$ (uname-r)/kernel, which is divided into several directories:Arch: Options related to the hardware platform, such as the CPU level.Cr
Reading Notes on "laruence's Linux house dish": Linux kernel compilation and management1. kernel introduction and obtain kernel source code 1.1 What is kernel: kernel is the bottom laye
program. The purpose of this interrupt service program is to load the first sector of the floppy disk program into the specified location of memory.The main boot loader job is to find and load the secondary boot loader (kernel loader)It completes this task by parsing the partition table and locating the active partition when it finds an active partition. It will continue to scan the partitions in the remaining partition table. In order to confirm tha
other words, in the modern kernel, virtual space (logical space) and linear space are almost a concept, and the following are not distinguished.For example, even if a and B processes simultaneously access the 0x0804800 address of their linear space, the segmented paging address transformation mechanism maps the linear address of the 0x0804800 to a different physical address. And this process, the process itself is invisible, A and b all think they ha
Tag:linux kernel cat>/etc/sysctl.confNet.ipv4.ip_forward = 0 means to turn on the routing function, 0 is off, 1 is onnet.ipv4.conf.all.rp_filter=1 is "tell" kernel enhanced inbound filtering (ingress filtering) and outbound filtering (egress filtering)Net.ipv4.conf.default.rp_filter = 1 Turn on reverse path filteringnet.ipv4.conf.default.accept_source_route = 0 packages that handle passive routesKERNEL.SY
Linux kernel space and user spatial information interaction methodThe author of this article :Kang Hua : Master of Computer Science, mainly engaged in the Linux operating system core, Linux technology standards, computer security, software testing and other fields of research and development work, is now working in the
***********************************************************************
* Many of the following steps are very elementary commands or explanations, because I am a novice to Linux,
* In the process of compiling a lot of detours, spent a lot of time to find solutions, so
* The corresponding commands are written out, I hope to be the same as the introduction of the soon and want to
* The novice to compile the kernel
wise, tan eldest brother, you are not a person in the fight!The implementation of the linked list in the kernel is located in the Include/linux/list.h file, and the definition of the linked list data structure is simple.+ struct List_head {A struct list_head *next, *prev;23};The List_head structure contains two pointers to the list_head structure, prev and next, so that the linked list in the
Because the Linux kernel changes very quickly, each iteration between the data structure, the interface is likely to change, so for our write kernel module compatibility brings some problems, often in a version of the module can be compiled normally, the other module on the compilation failed, this time we need to do the kern
able to be run.The data structure used by the kernel timer (different kernel timing events are connected in the form of a doubly linked list):struct Timer_list {struct list_head entry;//list header unsigned long expires;//delay time struct tvec_base *base;void (*function) (uns igned long); The target function is called unsigned Long data when the timing time arrives; The data that the target function carri
This article is done original, reproduced please specify the source, respect for the original.Writing this article, I refer to some blogs on the Internet:Http://bbs.chinaunix.net/thread-3634524-1-1.htmlHttp://www.bkjia.com/gjrj/800182.htmlAlso refer to the "Linux driver development in detail" 3.4 chapters, to achieve the establishment of their own drive directory.The driving example in this article is: Linux
doubly linked list
The difference between the traditional linked list and the Linu kernel list:
Figure A
Figure II
It can be seen that there is no commonality between the various links in the traditional list, because each data domain is different, and the structure of the linked list is embedded into the data domain structure in the Linux
Install Linux Kernel 4.15 RC1 on Ubuntu, Linux Mint, Elementary OS, and other Ubuntu derivative versionsInstallation instructions:
Since it is very difficult to compile Linux kernel, Canonical has packaged all kernel versions into
In the previous section, we introduced two methods for driver entry into the kernel: module and direct compilation into the kernel, and introduced the module'sOne way to compile: In an independent folder, use makefile with the kernel source code path.
So how to directly compile the driver into the kernel?
What is
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.