issue88:labo_linux_2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue88:labo_linux_2 [2015/01/28 15:28] – d52fr | issue88:labo_linux_2 [2015/01/29 14:27] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
It should also be said that in those good old days, most if not all Linux users were in fact computer people by trade or by interests. ** | It should also be said that in those good old days, most if not all Linux users were in fact computer people by trade or by interests. ** | ||
- | Il y a longtemps | + | Il y a longtemps, très loin d'ici, la compilation du noyau d'un système GNU/Linux était ce qu'on appelle un rite de passage. Vous ne pouviez pas vous qualifier vous-même de passionné de Linux tant que vous n' |
- | Je dois dire aussi que dans ces bons vieux jours, la plupart sinon tous les utilisateurs de Linux étaient des informaticiens professionnels ou amateurs. | + | Je dois dire aussi que, au bon vieux temps, la plupart sinon tous les utilisateurs de Linux étaient des informaticiens, professionnels ou amateurs. |
**Then came along several important steps towards making a GNU/Linux system more readily accessible to the average user. The first was the distribution, | **Then came along several important steps towards making a GNU/Linux system more readily accessible to the average user. The first was the distribution, | ||
Ligne 11: | Ligne 11: | ||
A second important step that also sets the GNU/Linux world at an advantage from other operating systems - at least to my mind - is the package manager. Being able to install software packages written by different authors or projects, all directly from a common repository, definitely makes system software management easier on the administrator – be it of a single machine, and all the more so when a park of several hundred computers must be set up in the same fashion. ** | A second important step that also sets the GNU/Linux world at an advantage from other operating systems - at least to my mind - is the package manager. Being able to install software packages written by different authors or projects, all directly from a common repository, definitely makes system software management easier on the administrator – be it of a single machine, and all the more so when a park of several hundred computers must be set up in the same fashion. ** | ||
- | Puis il y a eu plusieurs étapes vers la réalisation d'un système GNU/Linux d'un accès plus facile | + | Puis il y a eu plusieurs étapes vers la réalisation d'un système GNU/Linux d'un accès plus facile |
- | Un second pas important, qui donna un avantage au monde GNU/Linux par rapport aux autres systèmes – au moins dans mon esprit | + | Un second pas important, qui donna un avantage au monde GNU/Linux par rapport aux autres systèmes – selon moi, s' |
**Finally, a third step happened with the Ubuntu distribution, | **Finally, a third step happened with the Ubuntu distribution, | ||
- | Finalement, une troisième étape | + | Enfin, une troisième étape |
**At this point where we stand today, each and every GNU/Linux distribution offers at least one Linux kernel, or a main default kernel plus different optional kernels for those who need them. It has been years since most of us have actually needed to compile a kernel in anger, just to make a system work. So the question can be posed: is there really any more a valid reason for a user of a modern distribution to know how to do so? | **At this point where we stand today, each and every GNU/Linux distribution offers at least one Linux kernel, or a main default kernel plus different optional kernels for those who need them. It has been years since most of us have actually needed to compile a kernel in anger, just to make a system work. So the question can be posed: is there really any more a valid reason for a user of a modern distribution to know how to do so? | ||
Ligne 23: | Ligne 23: | ||
This is the point I will try to reply to in this first part of the series. We will give some insight into what a kernel is, what it does and why it may in some cases be necessary to change it. In a second installment, | This is the point I will try to reply to in this first part of the series. We will give some insight into what a kernel is, what it does and why it may in some cases be necessary to change it. In a second installment, | ||
- | Au point où nous en sommes de nos jours, toute distribution GNU/Linux offre un noyau Linux, ou à défaut | + | Au point où nous en sommes de nos jours, toute distribution GNU/Linux offre au moins un noyau Linux, ou un noyau principal |
- | C'est à cette question que je vais essayer de répondre dans la première partie de cette série. Nous allons donner un aperçu de ce qu'est un noyau, de ce qu'il fait et de pourquoi | + | C'est à cette question que je vais essayer de répondre dans la première partie de cette série. Nous allons donner un aperçu de ce qu'est un noyau, de ce qu'il fait et des raisons pour lesquelles |
- | Ensuite, nous configurerons | + | |
**WHAT IS THE LINUX KERNEL? | **WHAT IS THE LINUX KERNEL? | ||
Ligne 36: | Ligne 35: | ||
1. Managing the processes and their access to CPUs. | 1. Managing the processes and their access to CPUs. | ||
- | In a modern multiprocessing environment, | + | In a modern multiprocessing environment, |
- | 2. Managing memory. | + | QU’EST-CE QUE LE NOYAU LINUX ? |
- | Once more, in a multiprocessing environment, | + | Un de premiers diagrammes que nos étudiants en système d' |
- | 3. Managing access to Input/ | + | Il est important de comprendre le but de chaque couche : le noyau lui-même est un morceau de logiciel de très bas niveau ; autrement dit, c'est lui qui assure la liaison directe avec le matériel et gère les fonctionnalités les plus basiques de l'OS. Parmi lesquelles : |
+ | |||
+ | 1. La gestion des traitements et leur accès au CPU | ||
+ | |||
+ | Dans un environnement multi-traitements, | ||
+ | |||
+ | **2. Managing memory. | ||
+ | |||
+ | Once more, in a multiprocessing environment, | ||
+ | |||
+ | 2. Gérer la mémoire | ||
+ | |||
+ | Une fois encore, dans un environnement multi-traitements, | ||
+ | |||
+ | **3. Managing access to Input/ | ||
Much in the same way as CPUs and memory, hardware devices must be shared between many processes. For example, we could consider a USB port to which a printer has just been connected. Which process gets to manage this? It is the kernel that must recognize the type of driver required for this model of printer, activate it and grant it exclusive access to the USB port while the hardware remains connected. | Much in the same way as CPUs and memory, hardware devices must be shared between many processes. For example, we could consider a USB port to which a printer has just been connected. Which process gets to manage this? It is the kernel that must recognize the type of driver required for this model of printer, activate it and grant it exclusive access to the USB port while the hardware remains connected. | ||
Ligne 48: | Ligne 61: | ||
All this can get quite involved as modern computers include new hardware types with passing time. So it is understandable that operating system kernels are just about the largest and most complex type of computer program the average user will encounter. | All this can get quite involved as modern computers include new hardware types with passing time. So it is understandable that operating system kernels are just about the largest and most complex type of computer program the average user will encounter. | ||
- | On the other hand, a kernel that works really well is a necessity for any computing device. Otherwise, conflicts between different running programs could not be solved, hardware would cease to be available to the software, the hard drives themselves could not be accessed, etc. | + | On the other hand, a kernel that works really well is a necessity for any computing device. Otherwise, conflicts between different running programs could not be solved, hardware would cease to be available to the software, the hard drives themselves could not be accessed, etc.** |
- | Going back to the “onion” diagram, each successive layer can request the services of layers situated inwards of themselves. System libraries and programs are respectively formed of libraries that contain much-used routines on one hand, and simple programs that any operating system would need on the other. An example of the first is the glibc library, that most if not all programs in a GNU/Linux will require. This contains many often-used routines such as writing a character string on screen, accessing a file, or writing to a network port. An example of a system program could be the mkfs.ext4 utility to format an ext4 partition. These libraries and programs will at some point need to access physical system resources, be it memory or a hardware device. At that point they will request this service from the inner kernel layer, using what is called a “system call”. | + | 3. Gérer les accès aux dispositifs d' |
- | This request may or may not succeed, depending on whether the requested resource is at that time available to the kernel. Certain security policies may also be in place, restricting access to resources depending on the type of program on the identity of the user on behalf of whom it is executing. In any case, the program making the request cannot directly access the resource without checking whether the kernel has granted access, although some programs have been seen to do so. The ‘not taking access for granted’ is one of the differences between well-written | + | D'une façon assez voisine qu' |
+ | |||
+ | Tout ceci peut devenir relativement compliqué puisque, au fur et à mesure, les ordinateurs modernes incorporent de nouveaux types de matériels. Ainsi, affirmer que le noyau d'un système d' | ||
+ | |||
+ | D' | ||
+ | |||
+ | **Going back to the “onion” diagram, each successive layer can request the services of layers situated inwards of themselves. System libraries and programs are respectively formed of libraries that contain much-used routines on one hand, and simple programs that any operating system would need on the other. An example of the first is the glibc library, that most if not all programs in a GNU/Linux will require. This contains many often-used routines such as writing a character string on screen, accessing a file, or writing to a network port. An example of a system program could be the mkfs.ext4 utility to format an ext4 partition. These libraries and programs will at some point need to access physical system resources, be it memory or a hardware device. At that point they will request this service from the inner kernel layer, using what is called a “system call”. ** | ||
+ | |||
+ | Pour revenir au diagramme de l'« oignon », chaque couche successive peut demander les services des couches situées plus à l' | ||
+ | |||
+ | **This request may or may not succeed, depending on whether the requested resource is at that time available to the kernel. Certain security policies may also be in place, restricting access to resources depending on the type of program on the identity of the user on behalf of whom it is executing. In any case, the program making the request cannot directly access the resource without checking whether the kernel has granted access, although some programs have been seen to do so. The ‘not taking access for granted’ is one of the differences between well-written | ||
Many libraries and system programs will be needed on all computers running a given version of the operating system. | Many libraries and system programs will be needed on all computers running a given version of the operating system. | ||
- | Continuing outwards in the diagram, we find the user programs. These may vary from installation to installation, | + | Continuing outwards in the diagram, we find the user programs. These may vary from installation to installation, |
- | This explains many of the package dependencies that arise when installing new software: the maintainers of the web browser will have introduced a dependency on the openssl package, to make sure that the openssl is installed and with an appropriate version number when the browser fires up a HTTPS connection. | + | Cette demande peut réussir ou pas, selon que la ressource soit disponible au noyau ou non à ce moment-là. Certaines règles de sécurité peuvent aussi être en place, pour restreindre l' |
- | Some readers may have noticed that purists - such as myself - tend to refer to our operating system as the “GNU/ | + | Beaucoup de bibliothèques et de programmes système seront nécessaires sur tous les ordinateurs utilisant une version donnée du système d’exploitation. |
- | On the other hand, some of the most important bits of the operating system software have been developed in conjunction with the GNU Project at www.gnu.org, which is now sponsored by the Free Software Foundation (FSF). This includes the C language compiler, gcc. The GNU Project also has its own kernel, the GNU Hurd, which is quite different from the Linux kernel, and in some respects perhaps more advanced. So, by combining different kernels and keeping the rest of the operating system software, we can obtain our well-known GNU/Linux, but also GNU/FreeBSD with the FreeBSD kernel or GNU/Hurd that combines the GNU system software with the also GNU Hurd kernel. | + | En poursuivant la découverte du diagramme vers l’extérieur, nous trouvons les programmes utilisateur. Ils peuvent varier d’une installation à l’autre, en fonction de l’utilisation spécifique du système. Ils auront aussi besoin des services des couches plus intérieures, à la fois du noyau et aussi des « libraries » (bibliothèques) système. Par exemple, un navigateur internet devra demander de la mémoire libre au noyau quand il démarre, pour stocker les pages internet auxquelles il accède. Mais si l’utilisateur doit accéder à une page Web par l’intermédiaire d’un protocole sécurisé HTTPS, le navigateur demandera aussi les services de la librarie openssl et de ses routines pour établir un canal sécurisé avec le serveur – pour encoder et décoder les données. |
- | What does not help clarify the situation is that, for some time now, the Linux kernel is also released under the very same GNU General Public License | + | |
- | WHY COMPILE YOUR OWN KERNEL? | + | **This explains many of the package dependencies that arise when installing new software: the maintainers of the web browser will have introduced a dependency on the openssl package, to make sure that the openssl is installed and with an appropriate version number when the browser fires up a HTTPS connection. |
+ | |||
+ | Some readers may have noticed that purists - such as myself - tend to refer to our operating system as the “GNU/ | ||
+ | |||
+ | Ceci explique les nombreuses dépendances qui apparaissent quand un nouveau logiciel est installé : | ||
+ | |||
+ | Certains lecteurs auront peut-être remarqué que les puristes – dont je suis – ont tendance à faire référence au système d’exploitation comme le système « GNU/ | ||
+ | |||
+ | **On the other hand, some of the most important bits of the operating system software have been developed in conjunction with the GNU Project at www.gnu.org, | ||
+ | What does not help clarify the situation is that, for some time now, the Linux kernel is also released under the very same GNU General Public License (GPL) as the GNU Project software. So let us just take away that the kernel and the accompanying software of the GNU/Linux are released by different teams and leave it at that. Needless to say, many user programs have been developed in further projects, unrelated either to the Linux project or to GNU. Their software may be released under GPL, or other licenses such as the Apache license, the BSD license, or others - even commercial licenses.** | ||
+ | |||
+ | D’un autre côté, une partie des éléments les plus importants du système d’exploitation ont été développés en collaboration avec le projet GNU (www.gnu.org), | ||
+ | |||
+ | Ce qui n'aide pas à simplifier la situation est que, depuis pas mal de temps, le noyau Linux est publié sous la même licence GNU General Public License (GPL) [Licence publique générale - Wikipedia] que le logiciel du projet GNU. Alors contentons-nous de nous rappeler que le noyau et le logiciel conjoint de GNU/Linux sont publiés par des équipes différentes et restons-en là. Il va sans dire que beaucoup de programmes utilisateur ont été développés dans des projets ultérieurs, | ||
+ | |||
+ | |||
+ | **WHY COMPILE YOUR OWN KERNEL? | ||
Now that we know what the Linux kernel is, we can discuss a bit why it could be interesting for the user of a modern system to compile his or her very own kernel. | Now that we know what the Linux kernel is, we can discuss a bit why it could be interesting for the user of a modern system to compile his or her very own kernel. | ||
- | There are several reasons for this. A first point that must be made is that not all processors are equal. If we stay within the Intel product line, basically we can find two different CPU families. The first is based on the 80386 (or “i386”) model released in 1985. This was a 32-bit processor, meaning that numerical operations could be executed on operands 32-bits in length. It also means that memory addresses could use 32-bits, so each process could “address” (use) up to 2^32 address locations. This translates to a memory space of up to 4GBytes, which seemed extraordinarily large at the time. | + | There are several reasons for this. A first point that must be made is that not all processors are equal. If we stay within the Intel product line, basically we can find two different CPU families. The first is based on the 80386 (or “i386”) model released in 1985. This was a 32-bit processor, meaning that numerical operations could be executed on operands 32-bits in length. It also means that memory addresses could use 32-bits, so each process could “address” (use) up to 2^32 address locations. This translates to a memory space of up to 4GBytes, which seemed extraordinarily large at the time.** |
- | Over the years, succeeding derivatives of the i386 (the i486, Pentium, Pentium Pro, Pentium II and III, the Pentium IV and finally the Atom) incorporated more and more features. However, these processors of the “Intel Architecture, | + | POURQUOI COMPILER SON PROPRE NOYAU ? |
+ | |||
+ | Maintenant que nous savons ce qu’est un noyau, étudions un peu pourquoi il pourrait être intéressant pour l' | ||
+ | |||
+ | Il y a plusieurs raisons à cela. Le premier point, c’est que tous les processeurs ne sont pas égaux. Si vous restez dans la ligne de produits Intel, on peut à première vue distinguer 2 familles différentes de CPU. La première est basée sur le modèle 80386 (ou « i386 ») commercialisé en 1985. C’était un processeur 32-bit, ce qui veut dire que les calculs pouvaient être effectués avec des opérandes de 32 bits de long. Cela signifie aussi que les adresses mémoire étaient sur 32 bits ; ainsi, chaque traitement pouvait « adresser » (utiliser) jusqu’à 2^32 adresses mémoire. Ceci correspond à un espace mémoire de 4 Goctets, ce qui semblait extrêmement grand pour l’époque. | ||
+ | |||
+ | **Over the years, succeeding derivatives of the i386 (the i486, Pentium, Pentium Pro, Pentium II and III, the Pentium IV and finally the Atom) incorporated more and more features. However, these processors of the “Intel Architecture, | ||
This backwards compatibility was also maintained when AMD developed the 64-bit architecture that is now used in 64-bit personal computer systems. Processors include both AMD's own line of processors, but also Intel' | This backwards compatibility was also maintained when AMD developed the 64-bit architecture that is now used in 64-bit personal computer systems. Processors include both AMD's own line of processors, but also Intel' | ||
- | GNU/Linux distributions contain kernels that are compiled for a certain model of processor. Nowadays, most 32-bit kernels are compiled using the “i686” instruction set of the Pentium Pro CPU model. | + | GNU/Linux distributions contain kernels that are compiled for a certain model of processor. Nowadays, most 32-bit kernels are compiled using the “i686” instruction set of the Pentium Pro CPU model. |
- | At the time of writing, the two kernel packages available for Ubuntu 14.04 are: http:// | + | Au fil des années, des dérivés successifs du i386 (les i486, Pentium, Pentium Pro, Pentium II et III, Pentium IV, et enfin Atom) ont incorporé de plus en plus de fonctionnalités. Cependant ces processeurs d’« architecture Intel 32 bits » ou famille IA32 perpétuaient la compatibilité ascendante de leur jeu d’instructions. Ce qui veut dire, par exemple, que le i486, par comparaison au i386, ajoutait une fonctionnalité nouvelle ce qui ajoutait de nouvelles instructions. Cependant il comprenait parfaitement toutes les instructions du i386 ; ainsi un programme compilé pour le i386 utilisait juste le jeu i386 et tournait sur les deux processeurs, |
+ | |||
+ | La compatibilité ascendante a été aussi maintenue par AMD quand il a développé l’architecture 64-bit qui est maintenant utilisée dans les ordinateurs individuels 64-bit. Ces processeurs comprennent la propre ligne des processeurs AMD, mais aussi la gamme Intel Core Duo, Core i3, i5 et i7. Ils peuvent fonctionner sur 32 bits, comme un processeur 32-bit – ce qui explique pourquoi, par exemple, Windows XP 32-bit pouvait être utilisé encore récemment sur les machines modernes. Cependant, pour profiter de l’avantage du jeu d’instructions sur 64 bits, nous avons besoin de compiler expressément les programmes et le noyau pour cette architecture. Ils seront alors capables d’exécuter des calculs avec des opérandes de 64 bits de long et utiliser des adresses mémoires plus étendues dans un espace mémoire plus vaste. | ||
+ | |||
+ | Les distributions Gnu/Linux contiennent des noyaux qui sont compilés pour un certain modèle de processeur. De nos jours, la plupart des noyaux 32-bits sont compilés avec le jeu d’instructions « i686 » du modèle de CPU Pentium Pro. | ||
+ | |||
+ | **At the time of writing, the two kernel packages available for Ubuntu 14.04 are: http:// | ||
http:// | http:// | ||
Ligne 85: | Ligne 135: | ||
• a i686 kernel will work on later models, but will not be optimized since the more recent instructions available on an Atom processor (that was released in 2008) will not be used by the kernel. | • a i686 kernel will work on later models, but will not be optimized since the more recent instructions available on an Atom processor (that was released in 2008) will not be used by the kernel. | ||
- | An example of this is the famous “Physical Address Extension” (PAE) instruction set. This extension of the original IA32 instruction set allowed processors to connect to and use larger memory address sizes than the 32-bit limit set by the i386. | + | An example of this is the famous “Physical Address Extension” (PAE) instruction set. This extension of the original IA32 instruction set allowed processors to connect to and use larger memory address sizes than the 32-bit limit set by the i386.** |
- | Originally presented in the Pentium Pro generation of Intel processors, PAE became standard in most Pentium-III desktop and all Pentium-IV and Core series. This should include most personal computers that have been sold during the last ten years. So most people will not need to worry if our favorite distribution (Ubuntu) is activating PAE by default in its kernels since version 12.10, and so making PAE presence mandatory in the CPU. Ubuntu 14.04 will no longer work on processors without it, though other (earlier) distributions may run. | + | A l’heure où j’écris, les deux paquets de noyaux disponibles pour Ubuntu 14.04 sont : |
+ | http:// | ||
- | Even if we exclude users of really old hardware, a certain class of laptop that is still current in terms of usability suffers from the lack of PAE. Laptops built on Intel’s Pentium M (“M” for “Mobile”) processors present several advantages on later Pentium IV, M or Core CPUs. This processor class is based on the Pentium III, which is known to be internally less complex that later Pentium IVs. In practice, they compute faster when run at the same clock speed, and so are more energy efficient and manage laptop battery life better. | + | http:// |
- | So it makes sense for owners of computers, such as the original eeePC or some of the first 17” laptops, to try and keep them going - especially since, with a lightweight distribution such as Lubuntu or Xubuntu, they are still well up to most normal web browsing or office tasks. | + | Cela signifie deux choses : |
+ | • un noyau i686 ne fonctionnera pas du tout, ou fera planter la machine, sur des modèles anciens, parce qu’un i386, i486 ou Pentium ne comprendra pas certaines instructions utilisées ; | ||
+ | • un noyau i686 fonctionnera sur les modèles récents, mais il ne sera pas optimisé car certaines instructions récentes disponibles sur un processeur Atom (commercialisé en 2008) ne seront pas utilisées par le noyau. | ||
+ | |||
+ | Un exemple en est le fameux jeu d’instructions de l’ « extension des adresses physiques » [PAE = Physical Adress Extension]. Cette extension au jeu d’instructions original IA32 permettait aux processeurs de se connecter et d’utiliser des tailles d’adresse mémoire plus grandes qu’avec le jeu limité des 32-bits du i386. | ||
+ | |||
+ | **Originally presented in the Pentium Pro generation of Intel processors, PAE became standard in most Pentium-III desktop and all Pentium-IV and Core series. This should include most personal computers that have been sold during the last ten years. So most people will not need to worry if our favorite distribution (Ubuntu) is activating PAE by default in its kernels since version 12.10, and so making PAE presence mandatory in the CPU. Ubuntu 14.04 will no longer work on processors without it, though other (earlier) distributions may run. | ||
+ | |||
+ | Even if we exclude users of really old hardware, a certain class of laptop that is still current in terms of usability suffers from the lack of PAE. Laptops built on Intel’s Pentium M (“M” for “Mobile”) processors present several advantages on later Pentium IV, M or Core CPUs. This processor class is based on the Pentium III, which is known to be internally less complex that later Pentium IVs. In practice, they compute faster when run at the same clock speed, and so are more energy efficient and manage laptop battery life better. ** | ||
+ | |||
+ | Proposé à l’origine dans la génération Pentium Pro des processeurs Intel, PAE devint un standard dans beaucoup de PC Pentium-III, | ||
+ | |||
+ | Même si nous excluons les utilisateurs de très vieux matériels, une certaine partie des portables qui sont encore d’usage courant souffre de cette absence du PAE. Les portables construits sur les processeurs Intel Pentium M (« M » pour « Mobile ») présentent plusieurs avantages sur des processeurs plus récents Pentium IV, M ou série Core. Cette classe de processeurs est basée sur le Pentium III, qui est connue pour son architecture interne moins complexe que celle du Pentium IV plus récent. En pratique, elle calcule plus vite pour une même vitesse d’horloge, | ||
+ | |||
+ | **So it makes sense for owners of computers, such as the original eeePC or some of the first 17” laptops, to try and keep them going - especially since, with a lightweight distribution such as Lubuntu or Xubuntu, they are still well up to most normal web browsing or office tasks. | ||
Several solutions can be found on the web, for example those described in “Enabling PAE” (https:// | Several solutions can be found on the web, for example those described in “Enabling PAE” (https:// | ||
- | The same could be said for earlier processors. The Debian project still supported i386 kernel until recently, though the new base line is the i486 instruction set (see http:// | + | The same could be said for earlier processors. The Debian project still supported i386 kernel until recently, though the new base line is the i486 instruction set (see http:// |
- | As for more recent machines, there are also arguments in favor of compiling your own kernel. The standard i686 kernel will work quite well on modern hardware, but will not be able to use the more recent architecture developments. This is the point of view of the Gentoo distribution, | + | On comprend mieux pourquoi certains propriétaires de PC, comme les eeePC originaux ou certains des premiers portables 17", essaient de les garder en état de marche – en particulier parce que, avec des distributions légères comme Lubuntu ou Xubuntu, ils sont toujours bien taillés pour la navigation internet ou les tâches bureautiques. |
+ | |||
+ | Plusieurs solutions peuvent être trouvées sur le Web, notamment celles décrites dans « Enabling PAE » [Activer PAE] (https:// | ||
+ | |||
+ | On pourrait dire la même chose des processeurs plus anciens. Le projet Debian supportait le noyau i386 jusqu’à récemment, alors que la nouvelle référence est le jeu d’instructions i486 (voir http:// | ||
+ | |||
+ | **As for more recent machines, there are also arguments in favor of compiling your own kernel. The standard i686 kernel will work quite well on modern hardware, but will not be able to use the more recent architecture developments. This is the point of view of the Gentoo distribution, | ||
Even if we do not need a complete new kernel, in some cases, when a user needs to use relatively new hardware, it becomes necessary to compile at least the relevant driver. Graphics controllers and wireless communication devices are among the potential candidates. The new driver is a modular part of the kernel, that plugs into the existing kernel to give it the capabilities to handle the hardware. | Even if we do not need a complete new kernel, in some cases, when a user needs to use relatively new hardware, it becomes necessary to compile at least the relevant driver. Graphics controllers and wireless communication devices are among the potential candidates. The new driver is a modular part of the kernel, that plugs into the existing kernel to give it the capabilities to handle the hardware. | ||
- | And finally, perhaps the best reason for compiling a kernel is simply because it can be done. Few other mainstream operating system users can say they have compiled a main part of their systems – but we can. Along the way, we will also be learning a lot about how our computer and its software actually work. | + | And finally, perhaps the best reason for compiling a kernel is simply because it can be done. Few other mainstream operating system users can say they have compiled a main part of their systems – but we can. Along the way, we will also be learning a lot about how our computer and its software actually work.** |
+ | Quant aux machines récentes, il y a aussi des arguments en faveur de la compilation de votre propre noyau. Le noyau standard i686 fonctionnera très bien sur du matériel récent, mais ne sera pas capable d’utiliser les développements récents de l’architecture. C’est le point de vue de la distribution Gentoo, qui permet à l’utilisateur de compiler chaque paquet logiciel installé (http:// | ||
- | THE NECESSARY HARDWARE | + | Même si nous n’avons pas besoin d’un nouveau noyau complet, dans certains cas, quand l’utilisateur veut utiliser un matériel assez nouveau, il devient nécessaire de compiler au moins le pilote concerné. Les contrôleurs graphiques et les dispositifs de communication sans fil sont parmi les candidats potentiels. Le nouveau pilote est une partie modulaire du noyau qui se branche au noyau existant pour lui donner les capacités de gérer le matériel. |
+ | |||
+ | Et au final, peut-être la meilleure raison de compiler un noyau est simplement parce qu’on peut le faire. Peu d’utilisateurs des systèmes d’exploitation dominants peuvent dire qu’ils ont compilé une partie importante de leur système, mais nous, on peut le dire. Pendant toute la série, nous allons aussi apprendre beaucoup sur le fonctionnement réel de notre ordinateur et de ses logiciels. | ||
+ | |||
+ | |||
+ | **THE NECESSARY HARDWARE | ||
In the next few episodes, we will be going through the process of first obtaining the source code, and then actually compiling and installing a kernel. I will be using a fresh installation of Ubuntu 14.04 on a Core i5 laptop to perform example operations. The reader is encouraged to go ahead and do the same. However, the usual caveats apply: installing a new kernel is a major operation on your system. Though things should usually go well, there is some potential for breaking stuff, and needing to reinstall the system from scratch. So this is definitely a process that you should not do on a production machine. | In the next few episodes, we will be going through the process of first obtaining the source code, and then actually compiling and installing a kernel. I will be using a fresh installation of Ubuntu 14.04 on a Core i5 laptop to perform example operations. The reader is encouraged to go ahead and do the same. However, the usual caveats apply: installing a new kernel is a major operation on your system. Though things should usually go well, there is some potential for breaking stuff, and needing to reinstall the system from scratch. So this is definitely a process that you should not do on a production machine. | ||
Ligne 110: | Ligne 187: | ||
On the other hand, compiling a kernel will need some raw CPU power. Though it should be possible on a low consumption processor (such as a small netbook), it will benefit greatly from a heavyweight laptop or desktop CPU. An Intel Core Duo, Core i3 or similar is probably the slowest processor that could be recommended for this purpose. You should also be aware that the source code itself and the kernel files once compiled can take up to 20GB of disk space (mostly in the /usr directory), and plan accordingly. | On the other hand, compiling a kernel will need some raw CPU power. Though it should be possible on a low consumption processor (such as a small netbook), it will benefit greatly from a heavyweight laptop or desktop CPU. An Intel Core Duo, Core i3 or similar is probably the slowest processor that could be recommended for this purpose. You should also be aware that the source code itself and the kernel files once compiled can take up to 20GB of disk space (mostly in the /usr directory), and plan accordingly. | ||
- | Whatever route you choose to go, please do make sure your own data is backed up before proceeding. | + | Whatever route you choose to go, please do make sure your own data is backed up before proceeding.** |
+ | |||
+ | LE MATERIEL NECESSAIRE | ||
+ | |||
+ | Dans les tout prochains épisodes, nous allons parcourir les étapes pour obtenir d’abord le code source et ensuite compiler et installer un noyau. J’utiliserai une nouvelle installation de Ubuntu 14.04 sur un portable Core i5 pour réaliser des opérations à titre d' | ||
+ | |||
+ | D’autre part, la compilation du noyau va consommer une grosse puissance CPU. Bien que ce soit toujours possible sur un système faible consommation (genre petit portable), vous y gagnerez en utilisant le CPU d’un gros portable ou d’un PC de bureau. Un Intel Core Duo, Core i3 ou équivalent est probablement le processeur le plus lent recommandable pour cette activité. Vous devez aussi savoir que le code source lui-même et les fichiers du noyau occuperont jusqu’à 20 Go d’espace disque (principalement dans le répertoire /usr) ; préparez-vous en conséquence. | ||
+ | |||
+ | Quelle que soit la voie que vous choisissez, veuillez vous assurer que vos données sont sauvegardées avant de commencer. |
issue88/labo_linux_2.1422455298.txt.gz · Dernière modification : 2015/01/28 15:28 (modification externe)