Les détails sur ce paquet sont situés dans Section 12.3.2, “Contents of Linux.”
Le paquet Linux contient le noyau Linux.
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.
A number of vulnerabilities have come to light after the stable kernel team stopped supporting 2.6.24. The following patch addresses them:
patch -Np1 -i ../linux-2.6.24.7-security_fixes-1.patch
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.
The following patch includes spitfire.h outside of kernel space in elf.h. It also adds spitfire.h to the list of headers installed on the system.
patch -Np1 -i ../linux-2.6.24.7-elf_spitfire_fix-1.patch
Préparez la compilation en lançant la commande suivante :
To ensure that your system boots and you can properly run both 32 bit and 64 bit binaries, please make sure that you enable support for ELF and emulations for 32bit ELF into the kernel.
make mrproper ARCH=sparc64 CROSS_COMPILE=${CLFS_TARGET}-
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 en menu :
make ARCH=sparc64 CROSS_COMPILE=${CLFS_TARGET}- menuconfig
Compile the kernel image and modules:
make ARCH=sparc64 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
Udev 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 Udev:
alias char-major-XXX some-module
Install the modules, if the kernel configuration uses them:
make INSTALL_MOD_PATH=${CLFS} ARCH=sparc64 \ CROSS_COMPILE=${CLFS_TARGET}- modules_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 vmlinux ${CLFS}/boot/clfskernel-2.6.24.7
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-2.6.24.7
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-2.6.24.7
Les détails sur ce paquet sont situés dans Section 12.3.2, “Contents of Linux.”