Chinaunix首页 | 论坛 | 博客
  • 博客访问: 316646
  • 博文数量: 57
  • 博客积分: 146
  • 博客等级: 入伍新兵
  • 技术积分: 769
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-29 14:57
文章分类
文章存档

2014年(39)

2013年(13)

2012年(5)

我的朋友

分类: LINUX

2014-05-26 10:44:20

The Linux kernel makes devices appear as files in the folder /dev.

In the boot folder (/boot), users will see a "vmlinux" or a "vmlinuz" file. Both are compiled Linux kernels. The one that ends in a "z" is compressed. The "vm" stands for virtual memory.


The root of the kernel source code contains the folders listed below:

arch - This folder contains a Kconfig which sets up some settings for compiling the source code thatbelongs in this folder. Each supported processor architecture is in the corresponding folder. So, thesource code for Alpha processors belong in the alpha folder.


block – This folder holds code for block-device drivers. Block devices are devices that accept and send data in blocks. Data blocks are chunks of data instead of a continual stream.


crypto - This folder contains the source code for many encryption algorithms. For example,“sha1_generic.c” is the file that contains the code for the sha1 encryption algorithm.


Documentation - This folder contains plain-text documents that provide information on the kernel and many of the files. If a developer needs information, they may be able to find the needed information in here.


drivers - This directory contains the code for the drivers. A driver is software that controls a piece of hardware.


firmware - The firmware folder contains code that allows the computer to read and understand signals from devices. For illustration, a webcam manages its own hardware, but the computer must understand the signals that the webcam is sending the computer. The Linux system will then use the vicam firmware to understand the webcam. Otherwise, without firmware, the Linux system does not know how to process the information that the webcam is sending.


fs - This is the FileSystem folder. All of the code needed to understand and use filesystems is here.Inside this folder, each filesystem's code is in its own folder.

For instance, the ext4 filesystem's code is in the ext4 folder.


include - The include folder contains miscellaneous header files that the kernel uses. The name for thefolder comes from the C command "include" that is used to import a header into C code uponcompilation.


init - The init folder has code that deals with the startup of the kernel (INITiation). The main.c file is the core of the kernel. This is the main source code file the connects all of the other files.


ipc - IPC stands for Inter-Process Communication. This folder has the code that handles the communication layer between the kernel and processes.


kernel - The code in this folder controls the kernel itself.


lib - the library folder has the code for the kernel's library which is a set of files that that the kernel will need to reference.


mm - The Memory Management folder contains the code for managing the memory. Memory is not randomly placed on the RAM. Instead, the kernel places the data on the RAM carefully. The kernel does not overwrite any memory that is being used or that holds important data.


net - The network folder contains the code for network protocols. This includes code for IPv6 and Appletalk as well as protocols for Ethernet, wifi, bluetooth, etc. Also, the code for handling network bridges and DNS name resolution is in the net directory.


samples - This folder contains programming examples and modules that are being started. Assume a new module with a helpful feature is wanted, but no programmer has announced that they would work on the project. Well, these modules go here. This gives new kernel programmers a chance to help by going through this folder and picking a module they would like to help develop.


scripts - This folder has the scripts needed for compiling the kernel. It is best to not change anything in this folder. Otherwise, you may not be able to configure or make a kernel.


security - This folder has the code for the security of the kernel. It is important to protect the kernel from computer viruses and hackers. Otherwise, the Linux system can be damaged.


sound - This directory has sound driver code for sound/audio cards.


tools - This directory contains tools that interact with the kernel.


usr - Remember the vmlinuz file and similar files mentioned in the previous article? The code in this folder creates those files after the kernel is compiled.


virt - This folder contains code for virtualization which allows users to run multiple operating systems at once.With virtualization, the guest operating system is acting like any other application within the Linux operating system (host system).

阅读(654) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~