Linux Kernel Release 5.x (3/4)

https://www.kernel.org/doc/html/latest/admin-guide/README.html

Docs » The Linux kernel user’s and administrator’s guide » Linux kernel release 5.x < http://kernel.org/ >

Compiling the kernel

Make sure you have at least gcc 4.6 available. For more information, refer to Documentation/process/changes.rst. Please note that you can still run a.out user programs with this kernel.

Stellen Sie sicher, dass mindestens gcc 4.6 verfügbar ist. Weitere Informationen finden Sie unter Dokumentation / Prozess / Änderungen. Beachten Sie, dass dieser Kernel das Benutzerprogramm ./a.out ausführen kann.

Do a make to create a compressed kernel image. It is also possible to do make install if you have lilo installed to suit the kernel makefiles, but you may want to check your particular lilo setup first.

To do the actual install, you have to be root, but none of the normal build should require that. Don’t take the name of root in vain.

Führen Sie make aus, um ein komprimiertes Kernel-Image zu erstellen. Wenn das Kernel-Makefile manuell gestartet wird, können Sie es mit make install auf lilo installieren. Es wird jedoch empfohlen, zuerst das spezifische lilo-Setup zu überprüfen.

Sie müssen root sein, wenn Sie tatsächlich installieren. Dies wird beim Bauen nicht benötigt. Verschwenden Sie nicht Ihren Stammnamen. Erstellen Sie als Sektenbenutzer und installieren Sie ihn einfach als Stamm.

If you configured any of the parts of the kernel as modules, you will also have to do make modules_install.

Wenn Sie einen Teil des Kernels als Modul festgelegt haben, führen Sie modules_install aus.

Verbose kernel compile/build output:

Normally, the kernel build system runs in a fairly quiet mode (but not totally silent). However, sometimes you or other kernel developers need to see compile, link, or other commands exactly as they are executed. For this, use “verbose” build mode. This is done by passing V=1 to the make command, e.g.:

make V=1 all

To have the build system also tell the reason for the rebuild of each target, use V=2. The default is V=0.

Details zur Kernel-Kompilierungs- / Build-Ausgabe.

Normalerweise arbeitet das Kernel-Build-System in einem sehr leisen Modus (obwohl es nicht vollständig leise ist). Manchmal möchten Sie oder der Kernel-Entwickler jedoch nach Kompilierungen, Links oder anderen Befehlen suchen, die Sie benötigen. Verwenden Sie dazu den "ausführlichen" Build-Modus. Dies sollte "V = 1" an den Befehl make übergeben: zum Beispiel

make V=1 all

Verwenden Sie V = 2, damit das Build-System Ihnen auch den Grund für die Neuerstellung jedes Ziels angibt. Der Standardwert ist V = 0.

Keep a backup kernel handy in case something goes wrong. This is especially true for the development releases, since each new release contains new code which has not been debugged. Make sure you keep a backup of the modules corresponding to that kernel, as well. If you are installing a new kernel with the same version number as your working kernel, make a backup of your modules directory before you do a make modules_install.

Alternatively, before compiling, use the kernel config option “LOCALVERSION” to append a unique suffix to the regular kernel version. LOCALVERSION can be set in the “General Setup” menu.

Wenn etwas schief geht, behalten Sie den Backup-Kernel. Dies ist besonders nützlich, wenn Ihr neuer Code etwas enthält, das Sie nicht debuggen konnten, z. B. eine Entwicklungsversion. Erstellen Sie auch eine Sicherungskopie des Moduls, das diesem Kernel entspricht. Wenn der neue Kernel versucht, dieselbe Version wie die zu installierende zu installieren, erstellen Sie eine Sicherungskopie des Modulverzeichnisses, bevor Sie make modules_install ausführen.

In order to boot your new kernel, you’ll need to copy the kernel image (e.g. …/linux/arch/x86/boot/bzImage after compilation) to the place where your regular bootable kernel is found.

Um einen neuen Kernel zu booten, kopieren Sie das Kernel-Image (z. B. linux / arch / x86 / boot / bzImage, das nach der Kompilierung generiert wurde) an einen Speicherort, an dem Sie normalerweise den bootfähigen Kernel finden.

Booting a kernel directly from a floppy without the assistance of a bootloader such as LILO, is no longer supported.

Das Booten des Kernels direkt von einer Diskette ohne die Unterstützung eines Bootloaders wie LILO wird nicht mehr unterstützt.

If you boot Linux from the hard drive, chances are you use LILO, which uses the kernel image as specified in the file /etc/lilo.conf. The kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or /boot/bzImage. To use the new kernel, save a copy of the old image and copy the new image over the old one. Then, you MUST RERUN LILO to update the loading map! If you don’t, you won’t be able to boot the new kernel image.

Wenn Sie Linux von einem Festplattentreiber starten möchten, können Sie LILO verwenden. Hier wird das Kernel-Image in /etc/lilo.conf geschrieben. Die Kernel-Image-Datei lautet normalerweise / vmlinuz, / boot / vmlinuz, / baimage oder / boot / bzImage. Um den neuen Kernel zu verwenden, erstellen Sie eine Kopie des alten Images und überschreiben Sie das alte mit dem neuen Image. Führen Sie dann LILO erneut aus! !! Bitte aktualisieren Sie die Karte. Wenn Sie dies nicht tun, können Sie es nicht mit dem neuen Kernel-Image starten.

Reinstalling LILO is usually a matter of running /sbin/lilo. You may wish to edit /etc/lilo.conf to specify an entry for your old kernel image (say, /vmlinux.old) in case the new one does not work. See the LILO docs for more information.

Die Neuinstallation von LILO erfolgt normalerweise unter Ausführen von / sbin / lilo. Durch Bearbeiten von /etc/lilo.conf können Sie auch den Eintrag des alten Kernel-Images angeben, falls das neue Kernel-Image nicht gestartet wird (/vmlinux.old). Weitere Informationen finden Sie in den LILO-Dokumenten.

After reinstalling LILO, you should be all set. Shutdown the system, reboot, and enjoy!

Nach der Neuinstallation von LILO können Sie loslegen. Fahren Sie Ihr System herunter, starten Sie es neu und haben Sie Spaß!

If you ever need to change the default root device, video mode, ramdisk size, etc. in the kernel image, use the rdev program (or alternatively the LILO boot options when appropriate). No need to recompile the kernel to change these parameters.

Wenn Sie das Standard-Root-Gerät, den Videomodus, die RAM-Disk-Größe usw. für das Kernel-Image ändern müssen, verwenden Sie das Programm rdev (oder bei Bedarf die LILO-Startoption). Sie müssen Ihren Kernel nicht neu kompilieren, um diese Parameter zu ändern.

Reboot with the new kernel and enjoy.

Starten Sie mit dem neuen Kernel neu und haben Sie Spaß!


Ursprünglich ist es Teil des Quellcodes des Linux-Kernels, daher wird es als GPLv2 behandelt (Anerkennung, dass es sein sollte).

https://www.kernel.org/doc/html/latest/index.html

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.

https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing

Recommended Posts

Linux Kernel Release 5.x (2/4)
Linux Kernel Release 5.x (3/4)
Linux Kernel Release 5.x (4/4)
Linux Kernel Release 5.x (1/4)
Inu x Memo
Kompilieren des Linux-Kernels (Linux 5.x unter Ubuntu 20.04)
Informationen zu Linux-Kernelparametern
Überprüfen Sie die Linux-Kernelversion
Über den Prozess, den der Linux-Kernel mit x86-Mikrocode verarbeitet
Linux Kernel Build für DE10nano
Selbst erstellter Linux-Kernel mit Clang
[LINUX-Kernel neu erstellen] Upgrade (4.18.0 → 5.8.8)
Dokumentation zum Linux-Kernel-Speichermodell
Linux-Kernel, sein 29-jähriger Verlaufsbericht
Probieren Sie den Linux-Kernel-Sperrmechanismus aus
[Linux] [Kernelmodul] Erstellen Sie kthread im Kernelmodul
Linux
Quellanalyse von Linux (Kernel): Systemaufruf
X86 Assembler unter Linux (Verknüpfung mit C)