Kernel linux что это
Kernel (Русский)
Ядро Linux — ядро операционной системы, соответствующее стандартам POSIX, составляющее основу операционных систем семейства Linux.
Дистрибутив Arch Linux основан на ядре Linux. Помимо основной стабильной (stable) версии в Arch Linux можно использовать некоторые альтернативные ядра. В статье описываются доступные в официальных репозиториях версии ядер, возможные патчи, а также способы, которыми пользователи могут скомпилировать собственное ядро.
Contents
Официальные ядра
Помощь при работе с официальными ядрами можно найти на форуме и в баг-трекере.
Компиляция
Скомпилировать собственное ядро можно двумя способами:
/Arch Build System Преимущества — наличие готового PKGBUILD для пакета linux и удобство системы управления пакетами. /Традиционная компиляция Ручная загрузка архива файлов с исходными кодами ядра и их компиляция.
Некоторые из перечисленных пакетов могут быть также доступны в двоичном виде в неофициальных репозиториях.
Ядра kernel.org
Неофициальные ядра
Отладка регрессий
Прежде всего проверьте ядро linux-mainline AUR на предмет того, не была ли проблема уже решена. В прикреплённом комментарии указан репозиторий с уже собранными ядрами, так что собирать ядро вручную не придётся.
Если проблема проявляется не слишком часто, то имеет смысл попробовать LTS-ядро ( linux-lts ). Старые версии LTS-ядер можно найти в архиве Arch Linux.
Kernel module (Русский)
Модули ядра — это отдельные кусочки кода, которые могут быть загружены и выгружены из ядра по мере необходимости. Они расширяют функциональность ядра без необходимости перезагрузки системы.
Contents
Обзор
Чтобы создать модуль ядра, вы можете прочитать The Linux Kernel Module Programming Guide. Модуль можно сконфигурировать как вкомпилированный, а можно как загружаемый. Чтобы иметь возможность динамически загружать или выгружать модуль, его необходимо сконфигурировать как загружаемый модуль в настройке ядра (в этом случае строка, относящаяся к модулю должна быть отмечена буквой M ).
Получение информации
Чтобы узнать, какие модули ядра загружены в настоящий момент:
Чтобы показать информацию о модуле:
Чтобы вывести список опций, с которыми загружен модуль:
Чтобы отобразить настройки для всех модулей:
Чтобы отобразить настройки для отдельного модуля:
Чтобы узнать зависимости модуля (или его псевдонима), включая сам модуль:
Автоматическое управление модулями
Сегодня все необходимые загрузки модулей делаются автоматически с помощью udev, поэтому если вам не нужно загружать какие-либо модули, не входящие в стандартное ядро, вам не придётся прописывать модули, требующиеся для загрузки в каком-либо конфигурационном файле. Однако, бывают случаи, когда вам необходимо загружать свой модуль в процессе загрузки или наоборот не загружать какой-то стандартный модуль, чтобы ваш компьютер правильно функционировал.
Смотрите modules-load.d(5) для дополнительной информации.
Управление модулями вручную
Альтернативный вариант выгрузки модуля:
Настройка параметров модуля
Чтобы передать параметр модулю ядра, вы можете воспользоваться конфигурационным файлом в modprobe или использовать командную строку ядра.
С помощью файлов в /etc/modprobe.d/
С помощью командной строки ядра
Если модуль вкомпилирован в ядро, вы также можете передать параметры модулю с помощью командной строки ядра. Для всех стандартных загрузчиков, подойдёт следующий синтаксис:
Просто добавьте это в загрузчике в строку с ядром, как описано в параметрах ядра.
Создание псевдонимов
У некоторых модулей есть алиасы, которые используются для их автоматической загрузки, когда они потребуются определённой программе. Отключение этих алиасов может предотвратить их автоматическую загрузку, при этом остаётся возможность из загрузки вручную.
Запрет загрузки
В терминах модулей ядра blacklisting означает механизм, предотвращающий загрузку какого-то модуля. Это может понадобиться, например если вам не нужна работа какого-то оборудования или если загрузка данного модуля вызывает проблемы: например, могут быть два модуля ядра, которые пытаются управлять одним и тем же оборудованием, и их совместная загрузка приводит к конфликту.
С помощью файлов в /etc/modprobe.d/
Можно изменить такое поведение. Команда install заставляет modprobe запускать вашу собственную команду вместо вставки модуля в ядро как обычно. Поэтому вы можете насильно сделать так, чтобы модуль никогда не загружался:
Это запретит данный модуль и все модули, зависящие от него.
С помощью командной строки ядра
Вы также можете запрещать модули из загрузчика.
Kernel
According to Wikipedia:
The Linux kernel is an open-source monolithic Unix-like computer operating system kernel.
Arch Linux is based on the Linux kernel. There are various alternative Linux kernels available for Arch Linux in addition to the latest stable kernel. This article lists some of the options available in the repositories with a brief description of each. There is also a description of patches that can be applied to the system’s kernel. The article ends with an overview of custom kernel compilation with links to various methods.
Contents
Officially supported kernels
Community support on forum and bug reporting is available for officially supported kernels.
Compilation
Following methods can be used to compile your own kernel:
/Arch Build System Takes advantage of the high quality of existing linux PKGBUILD and the benefits of package management. /Traditional compilation Involves manually downloading a source tarball, and compiling in your home directory as a normal user.
Some of the listed packages may also be available as binary packages via Unofficial user repositories.
kernel.org kernels
Unofficial kernels
Debugging regressions
Try linux-mainline AUR to check if the issue is already fixed upstream. The stickied comment also mentions a repository which contains already built kernels, so it may not be necessary to build it manually, which can take some time.
It may also be worth considering trying the LTS kernel ( linux-lts ) to debug issues which did not appear recently. Older versions of the LTS kernel can be found in the Arch Linux Archive.
If the issue still persists, bisect linux-git AUR and report the bug on the kernel bugzilla. It is important to try the «vanilla» version without any patches to make sure it is not related to them. If a patch causes the issue, report it to the author of the patch.
The Linux Kernel Archives
If you have questions, comments or concerns about the F.A.Q. please contact us at webmaster@kernel.org.
Is Linux Kernel Free Software?
Linux kernel is released under GNU GPL version 2 and is therefore Free Software as defined by the Free Software Foundation. You may read the entire copy of the license in the COPYING file distributed with each release of the Linux kernel.
What does «stable/EOL» and «longterm» mean?
As kernels move from the «mainline» into the «stable» category, two things can happen:
If the kernel version you are using is marked «EOL,» you should consider upgrading to the next major version as there will be no more bugfixes provided for the kernel version you are using.
Please check the Releases page for more info.
Why is an LTS kernel marked as «stable» on the front page?
Long-term support («LTS») kernels announced on the Releases page will be marked as «stable» on the front page if there are no other current stable kernel releases. This is done to avoid breaking automated parsers monitoring kernel.org with an expectation that there will always be a kernel release marked as «stable.»
Linus has tagged a new release, but it’s not listed on the front page!
Linus Torvalds PGP-signs git repository tags for all new mainline kernel releases, however a separate set of PGP signatures needs to be generated by the stable release team in order to create downloadable tarballs. Due to timezone differences between Linus and the members of the stable team, there is usually a delay of several hours between when the new mainline release is tagged and when PGP-signed tarballs become available. The front page is updated once that process is completed.
Is there an RSS feed for the latest kernel version?
Why are there files that are dated tomorrow?
Can I get an account on kernel.org?
Kernel.org accounts are usually reserved for subsystem maintainers or high-profile developers. It is absolutely not necessary to have an account on kernel.org to contribute to the development of the Linux kernel, unless you submit pull requests directly to Linus.
If you are listed in the MAINTAINERS file or have reasons to believe you should have an account on kernel.org because of the amount of your contributions, please refer to the accounts wiki page for the procedure to follow.
I have cool project X, can you guys mirror it for me?
Probably not. Kernel.org deals with the Linux kernel, various distributions of the kernel and larger repositories of packages. We do not mirror individual projects, software, etc as we feel there are better places providing mirrors for those kinds of repositories. If you feel that kernel.org should mirror your project, please contact ftpadmin@kernel.org with the following information:
The Kernel.org admin team will then review your request and talk to you about it. As with any kind of account on kernel.org it’s up to the discretion of the admin team.
How does kernel.org provide its users access to the git trees?
We are using an access control system called gitolite, originally written and maintained by Sitaram Chamarty. We chose gitolite for a number of reasons:
As well at the time of deployment the code had undergone an external code review.
-rc kernel patches are generated from the base stable release.
For example: to create the 2.6.14-rc5 kernel, you must:
Where can I find kernel 2.4.20-3.16?
Kernel version numbers of this form are distribution kernels, meaning they are modified kernels produced by distributions. Please contact the relevant distributor; or check out https://mirrors.kernel.org/.
See the Releases page for more info on distribution kernels.
I need help building/patching/fixing Linux kernel/modules/drivers!
Please see the Kernel Newbies website.
There is also a wealth of knowledge on many topics involving Linux at The Linux Documentation Project (http://www.tldp.org)
For finding or reporting bugs, look through the archives for the various Linux mailing lists, and if no specific list seems appropriate, try the browsing the Linux Kernel Mailing List.
What happened to ftp.kernel.org?
FTP service was terminated on March 1, 2017. All content that used to be available via ftp.kernel.org can be accessed by browsing https://www.kernel.org/pub/. If you would like to use a command-line tool for accessing these files, you can do so with lftp:
When will the next kernel be released?
What will go into the next release?
It is hard to predict with certainty, but you can either take a peek at linux-next or read the Linux Weather Forecast, where Jonathan Corbet provides a broad forecast of what will likely be included into the next mainline release.
Other resources
Social
The Linux Kernel documentationВ¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Licensing documentationВ¶
The following describes the license of the Linux kernel source code (GPLv2), how to properly mark the license of individual files in the source tree, as well as links to the full license text.
User-oriented documentationВ¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system.
Firmware-related documentationВ¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Application-developer documentationВ¶
The user-space API manual gathers together documents describing aspects of the kernel interface as seen by application developers.
Introduction to kernel developmentВ¶
These manuals contain overall information about how to develop the kernel. The kernel community is quite large, with thousands of developers contributing over the course of a year. As with any large community, knowing how things are done will make the process of getting your changes merged much easier.
Kernel API documentationВ¶
These books get into the details of how specific kernel subsystems work from the point of view of a kernel developer. Much of the information here is taken directly from the kernel source, with supplemental material added as needed (or at least as we managed to add it — probably not all that is needed).