7.11. Linux-3.10.14

Le paquet Linux contient le noyau Linux.

7.11.1. Installation de the kernel

[Avertissement]

Avertissement

Un noyau temporaire compilé de façon croisée sera ici construit. Lors de sa configuration, sélectionnez un jeu d'options minimal requis pour démarrer la machine cible et construire le système final. Ainsi, aucun support pour le son, les imprimantes, etc ne sera nécessaire.

Essayez d'éviter aussi si possible l'utilisation de modules et n'utilisez pas l'image du noyau finale pour la production de systèmes.

La construction du noyau implique quelques étapes — la configuration, la compilation et l'installation. Lisez le fichier README dans l'arborescence des sources du noyau pour des méthodes alternatives de à celle utilisée par le livre pour configurer le noyau.

Préparez la compilation en lançant la commande suivante :

make mrproper

Ceci garantit que l'arborescence du noyau est absolument propre. L'équipe du noyau recommande que cette commande soit exécutée avant chaque compilation du noyau. Ne pensez pas que l'arborescence des sources est propre après la décompression.

Configurez le noyau avec l'interface du menu :

make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig

Compilez l'image et les modules du noyau :

make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}-

Si vous ne pouvez pas vous passer des modules du noyau, vous pouvez avoir besoin d'un fichier /etc/modprobe.conf. Vous trouverez des informations concernant les modules et la configuration du noyau dans la documentation du noyau dans le répertoire Documentation de l'arborescence des sources du noyau. La page de man modprobe.conf peut aussi être intéressante.

Be very careful when reading other documentation relating to kernel modules because it usually applies to 2.4.x kernels only. As far as we know, kernel configuration issues specific to Hotplug and Eudev are not documented. The problem is that Udev will create a device node only if Hotplug or a user-written script inserts the corresponding module into the kernel, and not all modules are detectable by Hotplug. Note that statements like the one below in the /etc/modprobe.conf file do not work with Eudev:

alias char-major-XXX some-module

Install the modules, if the kernel configuration uses them:

make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \
    INSTALL_MOD_PATH=${CLFS} modules_install

Installez le firmware si la configuration du noyau en utilise un :

make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \
   INSTALL_FW_PATH=${CLFS}/lib/firmware firmware_install

After kernel compilation is complete, additional steps are required to complete the installation. Some files need to be copied to the ${CLFS}/boot directory.

Issue the following command to install the kernel:

cp -v arch/i386/boot/bzImage ${CLFS}/boot/vmlinuz-clfs-3.10.14

System.map is a symbol file for the kernel. It maps the function entry points of every function in the kernel API, as well as the addresses of the kernel data structures for the running kernel. Issue the following command to install the map file:

cp -v System.map ${CLFS}/boot/System.map-3.10.14

The kernel configuration file .config produced by the make menuconfig step above contains all the configuration selections for the kernel that was just compiled. It is a good idea to keep this file for future reference:

cp -v .config ${CLFS}/boot/config-3.10.14

Les détails sur ce paquet sont situés dans Section 13.3.2, « Contents of Linux. »