Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 664c05250964d29fcf1d0bb310959fbc > files > 41

mandrake-doc-fr-10.0-5.1.100mdk.noarch.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Décompactage des sources
    du noyau, correction éventuelle du noyau</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.0"><link rel="home" href="index.html" title="Manuel de référence"><link rel="up" href="compiling-kernel-chapter.html" title="Chapitre 13. Compilation et mise en place de
nouveaux noyaux"><link rel="previous" href="ch13s02.html" title="A partir des sources du noyau"><link rel="next" href="compiling-conf.html" title="Configuration du noyau"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Décompactage des sources
    du noyau, correction éventuelle du noyau</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch13s02.html">Précédent</a> </td><th width="60%" align="center">Chapitre 13. Compilation et mise en place de
nouveaux noyaux</th><td width="20%" align="right"> <a accesskey="n" href="compiling-conf.html">Suivant</a></td></tr></table><hr></div><div class="sect1" lang="fr"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="compiling-unpack"></a>Décompactage des sources
    du noyau, correction éventuelle du noyau</h2></div></div><div></div></div><p><a name="BId-compiling-kernel-chapter-pa81"></a>Les sources du noyau sont
   à placer dans <tt class="filename">/usr/src</tt>. Il vous faut donc vous
   placer dans ce répertoire puis y décompresser les sources :</p><a name="BId-compiling-kernel-chapter-sc1"></a><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">
$ cd /usr/src
$ mv linux linux.old
$ tar xjf /path/to/linux-2.6.1.tar.bz2</pre></td></tr></table><p><a name="BId-compiling-kernel-chapter-pa83"></a>La
   commande <span><b class="command">mv linux linux.old</b></span> est
   nécessaire : en effet, vous disposez peut-être déjà des
   sources d'une autre version du noyau. Cette commande fait en sorte
   que vous ne les écrasiez pas. Dès l'archive décompressée, vous
   disposez d'un répertoire <tt class="filename">linux-&lt;version&gt;</tt> (
   où <tt class="literal">&lt;version&gt;</tt> désigne le numéro de version du
   noyau) avec les sources du nouveau noyau. Vous pouvez créer un lien
   (<span><b class="command">ln -s linux-&lt;version&gt; linux</b></span>) pour des
   raisons de commodité.</p><p><a name="BId-compiling-kernel-chapter-pa84"></a>Maintenant, les
   <span class="foreignphrase"><i class="foreignphrase">patches</i></span>. Supposons que vous vouliez
   effectivement <a name="BId-compiling-kernel-chapter-gt4" href="glossary.html#term-patch-to-patch"><i class="glossterm"> « <span class="quote">patcher</span> »</i></a>
   (corriger) du <tt class="literal">2.6.1</tt> vers le
   <tt class="literal">2.6.3</tt> et avez téléchargé les
   <span class="foreignphrase"><i class="foreignphrase">patches</i></span> nécessaires pour ce
   faire : rendez-vous dans le répertoire
   <tt class="filename">linux</tt> nouvellement créé, puis appliquez les
   <span class="foreignphrase"><i class="foreignphrase">patches</i></span> :

   <a class="indexterm" name="BId-compiling-kernel-chapter-it1"></a>
   
         <a name="BId-compiling-kernel-chapter-sc2"></a></p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">
$ cd linux
$ bzcat -dc /path/to/patch-2.6.2.bz2 | patch -p1
$ bzcat -dc /path/to/patch-2.6.3.bz2 | patch -p1
$ cd ..</pre></td></tr></table><p>
  
   De façon générale, passer d'une version <tt class="literal">2.6.x</tt> à
   une version <tt class="literal">2.6.y</tt> requiert que vous appliquiez
   tous les
   <span class="foreignphrase"><i class="foreignphrase">patches</i></span><tt class="literal">2.6.x+1</tt>,
   <tt class="literal">2.6.x+2</tt>, ..., <tt class="literal">2.6.y</tt> dans
   l'ordre. Pour retourner à la version précédente de
   <tt class="literal">2.6.y</tt> à <tt class="literal">2.6.x</tt>, répétez
   exactement la même procédure mais en appliquant les
   <span class="foreignphrase"><i class="foreignphrase">patches</i></span> dans l'ordre inverse et avec
   l'option <tt class="option">-R</tt> de <span><b class="command">patch</b></span>
   (<span class="foreignphrase"><i class="foreignphrase">Reverse</i></span>, soit inverse). Ainsi, pour
   repasser du noyau <tt class="literal">2.6.3</tt> au noyau
   <tt class="literal">2.6.1</tt>, vous feriez :

         <a name="BId-compiling-kernel-chapter-sc3"></a></p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">
$ bzcat /path/to/patch-2.6.3.bz2 | patch -p1 -R
$ bzcat /path/to/patch-2.6.2.bz2 | patch -p1 -R</pre></td></tr></table><p> 
</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Astuce</th></tr><tr><td colspan="2" align="left" valign="top"><p><a name="BId-compiling-kernel-chapter-pa85"></a>Si vous souhaitez tester si un correctif s'appliquera
      correctement avant de l'appliquer vraiment, ajoutez l'option
      <tt class="option">--dry-run</tt> à la commande
      <span><b class="command">patch</b></span>.</p></td></tr></table></div><p><a name="BId-compiling-kernel-chapter-pa86"></a>Ensuite, dans un souci de
   clarté (et aussi pour s'y retrouver), vous pouvez renommer
   <tt class="filename">linux</tt> pour refléter la version du noyau et
   créer un lien symbolique :

<a name="BId-compiling-kernel-chapter-sc4"></a></p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">
$ mv linux linux-2.6.3
$ ln -s linux-2.6.3 linux</pre></td></tr></table><p>
  
Il est maintenant temps de passer à la configuration. Pour ce faire,
   placez-vous dans le répertoire des sources :

<a name="BId-compiling-kernel-chapter-sc5"></a></p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">
$ cd linux
</pre></td></tr></table><p>
 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch13s02.html">Précédent</a> </td><td width="20%" align="center"><a accesskey="u" href="compiling-kernel-chapter.html">Niveau supérieur</a></td><td width="40%" align="right"> <a accesskey="n" href="compiling-conf.html">Suivant</a></td></tr><tr><td width="40%" align="left" valign="top">A partir des sources du noyau </td><td width="20%" align="center"><a accesskey="h" href="index.html">Sommaire</a></td><td width="40%" align="right" valign="top"> Configuration du noyau</td></tr></table></div></body></html>