/PRINTK (can be viewed or modified)/******* symbol symbols Each module relies on the example *****/--------/********hello.c*********/----#include #include Module_license ("GPL");Module_author ("Junroc Jinx");Module_description ("Hello,world module!");Module_alias ("A simple Modle test");extern int Add_integar (int a,int b);extern int Sub_integar (int a,int b);static int __init Hello_init (){int res = Add_integar (n);return 0;}static void __exit Hello_exit (){int res = Sub_integar (2,1);}Module_i
Linux Kernel development-Process Control and Linux kernel development process
This chapter mainly analyzes the definition, status, data structure, and other concepts of processes from the perspective of code.
Process Definition
A
A deep understanding of the Linux kernel Chinese Version 2 (pdf)-Linux general technology-Linux programming and kernel information. The following is a detailed description. I sent a message last summer.
Today, I accidentally en
Linux kernel development.Must-see books, "Linux Device Drivers", "Understanding Thelinux Kernel", "Linux Kernel Development" (respectively, Ldd,ulk, LKD). Ldd,ulk, I bought a paper ver
Features of Linux kernel development
Compared with applications in a user spaceProgramThere are many differences in development and kernel development. The most important differences include:
1) The C library cannot be accesse
Linux Kernel development-process scheduling and Linux kernel Process Scheduling
This section briefly introduces the knowledge about process scheduling in kernel development.
What is
Before trying kernel development, you need to have a general understanding of the kernel. Main Content: Obtain the kernel source code. The kernel source code is structured and compiled. kernel
Communication code
Kernel
A core subsystem such as a scheduler
Lib
Same kernel function
Mm
Memory management subsystem and VMS
Net
Network subsystem
Samples
Example, demo code
Scripts
Scripts used to compile the kernel
Security
in our daily life that requires root to be deleted.During the installation of the Linux kernel, it is important to note that to use the Linux GUI you need to download and install QT.Summary: Android porting is primarily a Linux kernel migration.
Yang Chinese translator: Jong Triplex Chung Chen Qi Maggie Chen Cong Wang Cong The following is the text---------------------------------------------------------------------How to participate in Linux kernel development---------------------This is the ultimate secret to clean sweep about how to participate in Linux
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 carries ...};
Init_t
Loader to do two things, let's start with the first item, load the kernel into memory:1. Load the kernel into memory.2. Jump into protected mode.When you first compile a no-kernel:NASM Boot.asm-o Boot.binNASM Loader.asm-o Loader.binDD if=boot.bin of=a.img bs=512 count=1 conv=notruncsudo mount-o loop a.img/mnt/hgfs/sudo cp loader.bin/mnt/hgfs/-Vsudo umount/mnt/hgfs/The results of the operation are as follows
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
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
Linux Kernel series-10. Operating System Development kernel HelloWorld, linuxhelloworld
A. Let's first try assembly programming in Linux. For details, refer to the code.
[Section. data]; data in strHellodb "Hello, world! ", 0 AhSTRLENequ $-strHello [section. text]; Code in t
]; Code in this global _start; We must export the _start to allow the linker to identify the global myprint; Export this function in order for BAR.C to use _start:pushdword [num2nd]; '. Pushdword [num1st]; | Callchoose; | Choose (num1st, num2nd); Addesp, 8; /MOVEBX, 0moveax, 1; sys_exitint0x80; system calls; void Myprint (char* msg, int len) Myprint:movedx, [ESP + 8]; LENMOVECX, [ESP + 4]; MSGMOVEBX, 1moveax, 4; sys_writeint0x80; System call RET1. Because the function myprint () is used in bar
the old GDT */The function first copies all the original GDT in the loader to the new GDT, and then replaces the contents of the gdt_ptr with the new GDT's base address and bounds. sgdt--holds the global descriptor, the value of gdt_ptr[2] is itself an address, so the front strap (void*) represents a pointer. memcpy is used with void* because it requires a byte copy of one byte.Compile:NASM Boot.asm-o Boot.binNASM Loader.asm-o Loader.binNasm-f Elf-o KERNEL.O kernel.asmNasm-f Elf-o STRING.O str
"Linux device Driver development in detail: Based on the latest Linux 4.0 kernel" China-pub today on-line into the pre-sale stage: http://product.china-pub.com/4733972650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/30/wKiom1XISFmwMoxqABlXLgvpEio656.jpg "title=" Linux
"Linux device Driver development in detail: Based on the latest Linux 4.0 kernel" China-pub today on-line into the pre-sale stage: http://product.china-pub.com/4733972Recommended Order OneTechnology is changing rapidly, industry earthshaking, rolling the red dust, disappearing things too much, the birth of new things i
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.