   HowTo   (kernel)  Linux
  Brian Ward, bri@cs.uchicago.edu
  v1.0, 5  1999

           , 
  compilation, ,     /  ix86.
  ______________________________________________________________________

  Table of Contents

























































  1. 

     1.1   ! (  )
     1.2     

  2.  ,    

     2.1 ,  ,   ;
     2.2      ;
     2.3   hardware    ;
     2.4    gcc  libc ;
     2.5    module     (loadable);
     2.6     ;
     2.7   ;

  3.      

     3.1    (source) 
     3.2   source 
     3.3   
        3.3.1     (    Pr)
        3.3.2    MFM/RLL, IDE, cdrom (Block Devices)
        3.3.3   ( )
        3.3.4 System V IPC ( )
        3.3.5   processor (    processor)
        3.3.6  SCSI
        3.3.7   
        3.3.8   (Filesystems)
           3.3.8.1 ,    filesystems !
        3.3.9   (Character devices)
        3.3.10 
        3.3.11   
        3.3.12   
     3.4  , ; (  Makefile)

  4.  compile  

     4.1    
     4.2   compile
     4.3    "make"
     4.4   

  5.  (patching)  

     5.1    (patch)
     5.2     
     5.3   .orig 
     5.4  patches

  6.  

     6.1 kbd
     6.2 util-linux
     6.3 hdparm
     6.4 gpm

  7.  

     7.1 make clean
     7.2    
     7.3     ,    
     7.4   compile  
     7.5       boot
     7.6     LILO,   /  boot 
     7.7  "warning: bdflush not running"
     7.8      IDE/ATAPI CD-ROM  
     7.9       routing
     7.10  firewalling     1.2.0
     7.11 "Not a compressed kernel Image file"
     7.12      (console terminal)     1.3.x
     7.13     compile,    
     7.14   

  8.      2.0.x, 2.2.x

  9. Modules

     9.1   utilities   modules
     9.2 Modules      

  10.   

     10.1      make  patch
     10.2     
     10.3   

  11.   HOWTOs     

  12. 

     12.1 
     12.2  
     12.3 
     12.4 Copyright,  ,   


  ______________________________________________________________________

  [1m1.  [0m

        ; ,   
     '   :



    "!   -46.5.6     
      2.8.193,       1.0.9!"

      driver '     ,   
      .

             compile '  .

    " [4m[24m  README    
     ;"

     ,   .

         ,    ' 
             .


  [1m1.1.    ! (  )[0m

           
     GNU tar, find,  xargs.    
  ,       .  ,
         
  (filesystem)  / .  ,     
    (       /)
     mount,      /etc/fstab (
     ).     , 
   ,    partition    , 
      ,    
   Linux,    .


        ""    
       2.2.9 ,       
    '   .     
          ,
      . ,   
  ,     .    
      ,    .


      source     Linux,  
  ""    "".     
      .     1.2.x , 
  2.0.x ,    2.2.x .     ( 
       )     
  bugs.     (2.1.x , 2.3.x , )  
   ,       
   (    bugs) .  !



  [1m1.2.      [0m

       ,     , 
    ,       ( 
  ),     (   
   text,  ).   (   ) 
       ("),      
     :       
     ,       
   ,         
     .      ( , 
      " "   
     )  '   
  ,       ,   
        '  . '  ,
         "make config",  
  "make config",  "make config." .  (... :  ,  
      ,      
    .)



  [1m2.   ,    [0m


  [1m2.1.  ,  ,   ;[0m

     *nix's       
    hardware. ,    (    
   )       (processes), 
         ( ,  ) 
      . ,     
     ,     
   hardware.


  ,         
   ,         
     .


  [1m2.2.       ;[0m

            
    hardware (,   drivers
  ),     , 
   '  ,    ' 
  ,        
  .      , 
       drivers      bugs.



  [1m2.3.    hardware    ;[0m

    Hardware-HOWTO. ,     
  config.in  source   Linux,     
  ,   make config.      
  hardware        ,  
       Linux.   drivers 
  (     PCMCIA     )
   modules   (loadable),    
       .



  [1m2.4.     gcc  libc ;[0m

    README,     source   Linux, o
  Linus      gcc. , ,   
     libc,      
  gcc      '   libc .   
   ,    '   
  .



  [1m2.5.     module     (loadable);[0m

   modules      ,  
   (linked)   .   compile
  ,            
   ( ),   .  
  ,          
      .   drivers
  ,    drivers   PCMCIA   
    QIC-80/40,  modules  .



  [1m2.6.      ;[0m

        / . , 
   source   Linux   14 Mytes 
   2.2.9 .       
  ,   67 MB.



  [1m2.7.    ;[0m

    /,  compilation    ,
  ' ,  .  AMD K6-2/300     
    2.2.x    .   
   compilation   Pentiums, 486s,  386s, 
     ,    ...

     ,      compile 
   /   ,      
    (      ,
    utilities    , ),   
    image     .



  [1m3.       [0m


  [1m3.1.     (source) [0m

      source   anonymous ftp 
  ftp.kernel.org,  dir /pub/linux/kernel/vx.y,  x.y  
    ( 2.2),  -   -    
     ,     . 
     linux-x.y.z.tar.gz,  x.y.z   
   .    sites     
    .bz2, .      bzip2. ( 
    ,      .)


       ftp.xx.kernel.org,  xx  
     .  ,  ftp.at.kernel.org  
   ,   ftp.us.kernel.org   .



  [1m3.2.    source [0m

   login  ( su ) root,   cd  directory
  /usr/src.    source    ( 
    ),     dir   linux,
         source.    
          ,   
  directory.          
  /  ,   '     dir.   uname
  -r      . ,   uname -r 
  1.0.9,     (   mv) linux  linux-1.0.9.
     ,     
  directory.   , ,     
  source ,     directory linux 
  /usr/src.


  ,   /usr/src,       tar
  zxpvf linux-x.y.z.tar.gz. (    .tar,  .gz 
  ,  tar xpvf linux-x.y.z.tar.)      
       source .   , 
     linux directory   /usr/src.   cd 
  linux,      README.     
    INSTALLING the kernel ( =   ).
        -  
  (symbolic links)       , 
    .o, .


     .bz2    bzip2 (  ' 
   http://www.muraroa.demon.co.uk/),  :



       bz2cat linux-x.y.z.tar.bz2 | tar xvf -


  [1m3.3.    [0m

   :       / 
       README  Linus.


    make config,    /usr/src/linux,  
  script ,     .  script 
    bash,     bash  
  /bin/bash,  /bin/sh,   $BASH.


  ,        make
  config,           
  .  make menuconfig    
  . ,   , ,   
     ,    ' 
   '  .    X-Windows, 
     make xconfig, ,     Tk ("click-
  o-rama" - Nat).  make menuconfig     
  (n)curses     text .   
      :      
    ,         
  .


    make menuconfig  make xconfig,   
   .


  ,   '   ,   y (yes,
  ),  n (no, ).  drivers     
   m.   "module",   /   
  compile,      ,   module 
  .         m, 
  "maybe". ( = .)        
    ,    .   
   ,    "  ".  
  make menuconfig,       
  .


    2.0.x (  )    "?",
         .  
         .
        ,  
    ,      .



  [1m3.3.1.      ( [0m
  [1m  Pr)[0m

       (.   386  486SX
  /),  '  y   .  
  ,  ' '   y,  
   -    ,   
    ' .      
      no,      yes
   .   ,   .






  [1m3.3.2.     MFM/RLL, IDE, cdrom (Block[0m
  [1mDevices)[0m

     .      
      PC,    
   .   driver   
  SCSI. '  '   .


       drivers "old () disk-only" 
  "new () IDE".       '  .
          driver   
      (.     ),
        (.  
  )   cd-rom IDE/ATAPI.   driver is 4k 
    ,     "",   
  (       bugs)   
      ,     hardware
  ( EIDE).



  [1m3.3.3.    ( )[0m

   ,  '  y    /  
   '   (   Internet),   
    SLIP, PPP, term, ,    
    Internet. ,     (  X
  Windows)   ,     /  
     ,  '  y. , 
        TCP/IP.  y
   ,     .



  [1m3.3.4.  System V IPC ( )[0m

        IPC (Interprocess Communication,
   )   ,    Perl.
     ,     Perl
    IPC     processes    
   ,       ( 
    DOOM),      '  n,  
     .



  [1m3.3.5.    processor (    proces-[0m
  [1msor)[0m

  (   :    -m486  
     486.)


  ,   compile    
  . ,       
  ,   .     
  ,         compile
   .     "386"   '   
    ix86 /.






  [1m3.3.6.   SCSI[0m

     SCSI devices,  y.    
   ,   cd-rom, ,   
  SCSI  .   ,   SCSI-
  HOWTO.



  [1m3.3.7.    [0m

     ,      SLIP  PPP, 
         Internet,  y.  script
         ,    
  .



  [1m3.3.8.    (Filesystems)[0m

  ,  script        
  filesystems :


    (minix) -      minix
  filesystems,      ,   
      .   
    " ",     
     minix filesystem,      
    .


   second extended -     filesystem  Linux. 
      ,     y.


   msdos -       MS-DOS partitions 
    ,    mount  MS-DOS ,  y.


      filesystems    .


   /proc - (    Bell Labs, .)  
  proc filesystem  '   :     
  filesystem       (processes). 
       (process listers),
     ps.      cat /proc/meminfo,  cat
  /proc/devices.   (shells),   rc,  
  /proc/self/fd  (  /dev/fd   )   - 
  (I/O).       y .  
    Linux  ' .


   NFS -   /    '  ,   
    filesystems   /    NFS,
   y.


   ISO9660 -    CD-ROMs.    CD-
  ROM,       Linux,  y.





  [1m3.3.8.1.  ,    filesystems ![0m

  ,  mount.         :




           blah# mount
           /dev/hda1 on / type ext2 (defaults)
           /dev/hda3 on /usr type ext2 (defaults)
           none on /proc type proc (defaults)
           /dev/fd0 on /mnt type msdos (defaults)




      :     type    
  filesystem.     filesystems /  /usr  second
  extended,   /proc,       
  mount,     msdos (!) filesystem.


     cat /proc/filesystems,    
  /proc :      filesystems     .


    ,   filesystems   .
       modules    ,  
   ""       
  .



  [1m3.3.9.    (Character devices)[0m

     drivers     (. 
   ),     busmouse  PS/2 (
   /    PS/2   trackballs 
  ),     ,   
    "".  y    .


   :  gpm   ,     (
      X-Windows)  cut  paste  
  (virtual) .       , 
        X,     
     .



  [1m3.3.10.  [0m

      '   biff  ,  y,
         ,     
   . (        :  
           driver,
   '  n      
  ,       .)


          ,  
    drivers  http://www.linux.org.uk/OSS/,  
    Open Sound System (OSS),  http://www.opensound.com/.



  [1m3.3.11.    [0m

        ,  
   ,      (   
  3Com 3C509    compile  driver  
   ethernet.)        
   (       script Configure), 
          Axel Boldt
  (boldt@math.ucsb.edu),     online .  
           (
     2.0),  Documentation/Configure.help 
    dirs  source     Linux .



  [1m3.3.12.    [0m

  >  README  Linus :

       "   (kernel hacking)"
         (   ),
          , 
   ,        
       ( kmalloc() ). ,  
   '  "n"      "".



  [1m3.4.   , ; (  Makefile)[0m

     ,        
   ,   "  -  
  Makefile    (check the top-level Makefile for
  additional configuration)", .


  ,   Makefile.      
  ,      .   '
          ,  
   rdev.        ,
    .



  [1m4.   compile  [0m


  [1m4.1.     [0m

       script ,     make
  dep ( =   )  () clean ( =
  ). ,  make dep.      
   ,    include,    . 
       ,    /   
  .     ,    
    make clean.     object   
   ,       . 
   , [4m[24m       
   compile  .



  [1m4.2.    compile[0m

    depend   clean,     make bzImage, 
  make bzdisk. (        
   .)  make bzImage  compile  , 
      directory arch/i386/boot,    (
  ) bzImage.     ,   . 
  make bzdisk    ,     
  bzImage   ,       
   "A:".   bzdisk   ,   
  .     (    ),  
          .   '
       boot,     
     (     ).    
     ,    
     '  . ("'   
  !     ' ;")


    (    )   
  ,     bz   .  
    ,  .


    ,      bzImage.  
     zImage.   ,     
    , ,       
  ,       .



  [1m4.3.     "make"[0m

   make mrproper    clean,    
   .          
  (patch).  make mrproper        ,
        backup   (.config),  
       .


   make oldconfig         
   .     make config.   
   compile  ,      
  ,        , 
     '   default .


       modules,    make modules.



  [1m4.4.    [0m

      ,      
  ,     .   
    LILO (Linux Loader)    .  make
  bzlilo    ,    LILO,   
   boot,     lilo    /  
     :     /vmlinuz,  lilo  
  /sbin,      lilo (/etc/lilo.conf)  
   .


  ,     LILO . 
           ' ,
             
  .       (/etc/lilo/config 
     Linux, /etc/lilo.conf   ), 
     .      :

      image = /vmlinuz
      label = Linux
      root = /dev/hda1
      ...



    image =    ,  
     /vmlinuz.  label ( = )
     lilo         
    boot,   root     directory /  
   .   backup      
      bzImage   .  (   cp
  bzImage /vmlinuz,    /vmlinuz). ,  
  lilo.      lilo,    
    /etc/lilo/install (),    /etc/lilo/lilo
  -C /etc/lilo/config ().


           LILO,  
    LILO,         
   ftp server,     .


    boot     '     
   (      ,    
     ),        
   (  )  image = xxx     
   LILO,    image = xxx  image = yyy,  yyy  
    path  ,    backup   
  . ,   label = zzz  label = linux-backup 
    lilo.        
   ,    delay=x,  x     
   ,    LILO     
  boot,       (   
  shift),     label ()  backup  (
      ).



  [1m5.   (patching)  [0m


  [1m5.1.     (patch)[0m

          patches ( =
  ). ,     1.1.45,      
    patch46.gz ' ,     
     1.1.46,   patch. , 
       backup    dirs  source
   ( make clean,    cd /usr/src; tar zcvf old-
  tree.tar.gz linux,      tar ).


  ,    ,     
  patch46.gz  /usr/src.    cd  dir /usr/src  
  zcat patch46.gz | patch -p0 ( patch -p0 < patch46,   patch 
  ).         ( 
  ,   /    ),     
      ,     .  
      ,     
     ,      
    . ,       
  -s     patch,     
     . ( '     
  " ,  /     ' !",    
      .)       
    ,   dir /usr/src/linux    
    .rej .    patch ( ,
    compile     filesystem),  
      # .      find 
     . 


      find .  -name '*.rej' -print



         .rej    
  dir   subdirs .


     ,  make clean, config,  dep,  
     3  4.


       patch.  , 
  patch -s    ,     . 
    source      dir   
  /usr/src/linux,  patch -p1 ('    dir)    patch
   .     patch   
     man.



  [1m5.2.      [0m

  ( :        .)


       ,    patch  
     config.in,      ,  
          /.   
  ,         
  .    ,    config.in.rej, 
      patch.      +  -
     .      
    ,      y  n. ,
    config.in,    y  n   n  y, 
  . 


      patch -p0 < config.in.rej



       (.    ), 
        compilation.  
  config.in.rej    ,     .


      ,     
  patch   .    patch    previously
  applied patch detected: Assume -R? (  patch, 
   ;)     patch  
     .   y,     
  source   ,   ' . , 
       source  ( , ,
        ).



      patch,    patch -R 
    patch.


       ,   patches 
  ,    '     
  source  (      linux-x.y.z.tar.gz),  
     .



  [1m5.3.    .orig [0m

      patches, '     .orig
  . ,    1.1.51  ,   
    1.1.48 .      .orig , 
     MB.  


      find .  -name '*.orig' -exec rm -f {} ';'



       .    patch   #
    .rej,  tilde ()   .orig .


          .orig,  
     GNU xargs.  :


      find .  -name '*.orig' | xargs rm



    " ,    "  :


      find . -name '*.orig' -print0 | xargs --null rm --





  [1m5.4.   patches[0m

     patches (    " "),  '
     Linus.     ,  patches 
  Linus      ,      
   -    source   patch - 
      source ,    
     .      ,
  ,    '   source  ( 
     ),     patches 
     Linus,      . ,
         patches  .  ,
     '   ,     patch 
   source       ,  
      ( )    
    patch.


     patches    ; 
      .   
  noblink patch  virtual  ,     
  . (  patch   - 
      -     .) ,
      drivers      
  modules  ,     " "
  patches  .



  [1m6.   [0m

     Linux   ,    
         source .   
      ,   
       .



  [1m6.1.  kbd[0m

      Linux     '
   .       
  fonts,     ,   
   (   ), .   kbd 
           , 
   fonts       , 
       sites,    source 
   .



  [1m6.2.  util-linux[0m

   Rik Faith (faith@cs.unc.edu)  '     
  utilities  Linux,   -   -  util-
  linux.   utilities     Andries Brouwer
  (util-linux@math.uio.no).     ftp  
  sunsite.unc.edu  dir /pub/Linux/system/misc,  
     setterm,  rdev,   ctrlaltdel,  
      .    Rik, [4m[24m [4m[24m [4m[0m
  [4m[24m [4m[24m [4m[24m.        
   . (   ,     
   .)



  [1m6.3.  hdparm[0m

      ,       
      .  patches  
   ,        ( 
       )  .



  [1m6.4.  gpm[0m

   gpm  general purpose mouse (   ). 
        cut  paste  text 
  virtual ,       ,   
    .



  [1m7.   [0m



  [1m7.1.  make clean[0m

            
  ,     make clean   compile
    .      , 
    /     I/O,  
  .  ,     make dep.



  [1m7.2.     [0m

        ,   , / 
    compile      Quadbazillium-III/4400,
        (drivers ,
  filesystems, ).     ,   ,
      /.   
         
  (swapping)  -    .      
  ,        Fujitsu Eagles, 
         ,  
     .


         ,  
      / ,      "total mem"
  ( )   /proc/meminfo,       
  free.



  [1m7.3.      ,    [0m

       PCs  : ,   "General
  Setup" ( ),  "Parallel port support"
  (  )  "PC-style hardware" (hardware 
  PC). ,  "Character devices" ( ) 
  "Parallel printer support" (  ).


  ,    .  Linux 2.2   
   ' ,   .    
    lp1     ,    lp0 
   .       ,  
   dmesg,      (logs)  dir /var/log.



  [1m7.4.    compile  [0m

     compile,       patch,
          source . , 
           gcc   (  
  include).       (symbolic links) 
    Linus  README,   . ,  
     compile   ,    
      Linux,      
  .


    ,  gcc     
  hardware.       "xxx exited with signal 15"
  ( =  xxx      15),    
     .      
  ,        -   
  cache,   compiler    .  
  ,      gcc.  
        compile  
    off   cache,    RAM, .


    ,      hardware  
  ,       '   .
         (FAQs), 
    http://www.bitwizard.nl/sig11/.



  [1m7.5.        boot[0m

     LILO,     .    
  "" ,      ,  
  boot = /dev/hda1,  boot = /dev/hda. (    
    ,        ,
      .)



  [1m7.6.      LILO,   /  boot [0m

  !          boot 
    CDROM,        (
        make zdisk).     
    root filesystem  (/),     (. second
  extended, minix).   ,    
     filesystem     source  
  (/usr/src/linux),   ,     mount .


    ,  /   /dev/hda1,   filesystem
     /usr/src/linux   /dev/hda3,   
   mount  /usr.     filesystems  second
  extended.  image    
  /usr/src/linux/arch/i386/boot  bzImage.


     ,     bzImage,   
       .    ,   
   ,    (    
    / ),      .


  ,  boot   boot/root  (  
  - rescue disk),   mount  filesystem    image
     :



      mkdir /mnt
      mount -t ext2 /dev/hda3 /mnt



    mkdir     dir   ,   .
  ,   cd  dir    image   .
   


  /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot



       drive "A:" (   boot 
   root!),   image  ,      root
  filesystem  :



      cd /mnt/src/linux/arch/i386/boot
      dd if=bzImage of=/dev/fd0
      rdev /dev/fd0 /dev/hda1



  ,   cd  /   unmount   filesystem
  /usr :



      cd /
      umount /mnt



  ,        /  
  '   .      lilo (  
   ,   )   !


   ,       .
            / ( 
  /vmlinuz),        .
       ,    image  
   /vmlinuz,       : 
   /dev/hda3  /dev/hda1 ( filesystem /),  /mnt/src/linux 
  /mnt,   if=bzImage  if=vmlinuz. (    
      /mnt/src/linux.)


     LILO    (  1024 ) 
    .   LILO mini-HOWTO,  
   .



  [1m7.7.   "warning: bdflush not running"[0m

  (. " :    bdflush".)    
   .        
  1.0 (  20  1994),    
   update (       
    filesystem).   source   bdflush (
     ,     source   ), 
   . (   ,    
      .)     
  update,          
  .



  [1m7.8.       IDE/ATAPI CD-ROM  [0m

   ,        
  ATAPI  ,         
   .



    CD-ROM       '   IDE,
      (  jumpers -  -   )
  "master"  "single".       - 
   .


   ,   Creative Labs    IDE
       . ,    
   ,        IDE,
         motherboard  ( 
  IRQ15),      SoundBlaster    IDE
  (   IRQ11).


      Linux,    1.2.x 
     IDE. (   
     1.3.x ,      
  ,      .) (... :
   Linux          HowTo,
             3
  IDE.)      ,    :


      IDE,     ,  
      - cdrom  .    ATAPI 
    ,       IDE. ,
    IDE    (   
  IRQ).


      IDE,    jumpers  IDE 
    (          !)
   IRQ15,     IDE.     
   .



  [1m7.9.        routing[0m

        route,   
      routing.   
  /usr/include/linux/route.h (     
  /usr/src/linux).



  [1m7.10.   firewalling     1.2.0[0m

      1.2.1 .



  [1m7.11.  "Not a compressed kernel Image file"[0m

  (. "    image  ".) 
    boot   vmlinux   
  /usr/src/linux.     [..]/arch/i386/boot/bzImage.



  [1m7.12.       (console terminal)  [0m
  [1m  1.3.x[0m

      console termcap   /etc/termcap, 
    dumb  linux.        
  terminfo.
  [1m7.13.      compile,    [0m

   source     Linux   
  include (    .h)  dir /usr/include,  
     .       
    ( xyzzy.h    include  
  /usr/include/linux) :


      #include <linux/xyzzy.h>



  ,   /usr/include  link linux   directory
  include/linux  source     (
  /usr/src/linux/include/linux).    link   , 
     ,       
  compile.     source     
   ,   ,   '  .
     ,      . 
   dir root    umask,      
      ,    source   
     p (preserve filemodes -   
    ),      
       compiler   C.  
       chmod     
  ,        include.
            source  
    ,       :



      blah# tar zxvpf linux.x.y.z.tar.gz linux/include



   :  "make config"    link  
  /usr/src/linux,    .



  [1m7.14.    [0m

   , [4m[24m [4m[24m ,     '
       ,      
   :


  echo 4096 > /proc/sys/kernel/file-max
  echo 12288 > /proc/sys/kernel/inode-max
  echo 300 400 500 > /proc/sys/vm/freepages





  [1m8.       2.0.x, 2.2.x[0m

    2.0.x  2.2.x      
    .   Documentation/Changes  
  dirs  source    2.0.x   
    ,        
   .        
  ,   gcc, libc, SysVInit,   '  
  ,      . , 
  .
  [1m9.  Modules[0m

   modules     (loadable),  
        .   
  modules  ,    filesystems, drivers
   , drivers   , drivers ,
   .



  [1m9.1.    utilities   modules[0m

   utilities   modules   (  modutils-
  x.y.z.tar.gz)  ,    source   .
       x.y.z   patch,  
     (   )     .
     tar zxvf modutils-x.y.z.tar.gz,   cd  directory
    (modutils-x.y.z),   README, 
      (   ,  
   make install). ,      
  insmod, rmmod, ksyms, lsmod, genksyms, modprobe,  depmod  dir
  /sbin.  ,     utilities    driver
  "hw",    insmod  .  ,
     INSTALL   subdir.


   insmod   module   .  modules 
    .o .  driver   , 
  drv_hello.o. ,      ,  
  insmod drv_hello.o.     modules   
     ,  lsmod.      :


      blah# lsmod
      Module:        #pages:  Used by:
      drv_hello          1



   drv_hello     module,     4k
  ,        modules   '
  .    ,  rmmod drv_hello.   
  rmmod  [4m[24m [4mmodule[24m  ,   .  
   module       lsmod.    
  utilities   modules     man.



  [1m9.2.  Modules      [0m

     2.0.30,      
  loadable modules.    ,    
        . ,   y ' ,
      make config.  compile   , 
   ' . ,   cd  /usr/src/linux, 
   make modules.   compile   modules   
     ,   links   
  /usr/src/linux/modules.      
   dir ,    make modules_install,    
   dir /lib/modules/x.y.z ( x.y.z     ).


         filesystems. ,   
     filesystems minix  msdos, , 
      msdos (!!!),   insmod
  /usr/src/linux/modules/msdos.o,   rmmod msdos.  
     50k RAM     
   .        filesystem
  minix : [4m[24m       , 
       "".



  [1m10.    [0m


  [1m10.1.       make  patch[0m

          make  patch, 
        .  ,  
   (shell)  :  grep root /etc/passwd,   
    /bin/csh.


     sh   bash,  :


      (command) 2>&1 | tee (output file)



         (command) ( = ) 
   (output file) ( =  ).


    csh  tcsh,  :


      (command) |& tee (output file)




    rc ( :     )  :


      (command) >[2=1] | tee (output file)





  [1m10.2.      [0m

      ,     
         .   ,
       Unix,  LILO    
  boot   '   . (  
    500 MBytes,      LILO
     .)  ,    
   


      image = /usr/src/linux/arch/i386/boot/bzImage
          label = new_kernel



        LILO,    
    ,  '     /vmlinuz (,
     lilo).       LILO 
  boot   ,      shift  
   (  LILO  ,   ),  
       (prompt).    
  new_kernel (.     ),   boot  
  .


       /      
  source   (,  :     [4m[24m 
  ),        
  /usr/src/linux-x.y.z,  x.y.z     .  ,
    ""   source  '   
  (symbolic link). ,  ln -sf linux-1.2.2 /usr/src/linux,
     1.2.2 .    symbolic link,
        ln   
   directory (  symbolic links   ), 
         .



  [1m10.3.    [0m

   Russell Nelson (nelson@crynwr.com)     
     .   ,    
       .     ftp
    ftp.emlist.com ( dir pub/kchanges),    site


      http://www.crynwr.com/kchanges





  [1m11.    HOWTOs     [0m


    Sound-HOWTO :     utilities

    SCSI-HOWTO :     SCSI controllers  

    NET-2-HOWTO : 

    PPP-HOWTO :     PPP

    PCMCIA-HOWTO :  drivers    

    ELF-HOWTO :    ELF,  

    Hardware-HOWTO :     hardware

    Module mini-HOWTO :    modules  

    Kerneld mini-HOWTO :    daemon kerneld

    BogoMips mini-HOWTO :  ... (    /)


  [1m12.  [0m


  [1m12.1.  [0m

       Linux Kernel-HOWTO   Brian Ward
  (bri@cs.uchicago.edu). ,   , ,
   (      ).

         ,     
  URLs :


      http://www.math.psu.edu/bri/
      http://blah.math.tu-graz.ac.at/~bri/




         mails ,    
   [4m[24m '   ,   '    
  .     ,   
       .    harware 
    (   ),     hardware
  .        ,  
   "   ,   ".    
    . ,      ,
  gcc,  libc .        
  ,     . ,     
  ,    ,     ! 
          e-mail.


          ,    
     ,   .


            
  (.    ),      
  e-mail .  . , .


    e-mails   ,   
      hardware.   ok,   
        hardware  . 
   AMD , Adaptec  Sybios SCSI controllers, 
   IBM SCSI.


    -0.1    HowTo   3  1994. 
        SGML, PostScript, TeX, roff, 
   text.



  [1m12.2.   [0m

    "  "   .   
     .


      " ".


        debugging  crash recovery ( =
    /   ).



  [1m12.3.  [0m

       README  Linus (   ).
  , Linus!


  uc@brian.lunetix.de (Ulrich Callmeier) :   patch -s  
  xargs.


  quinlan@yggdrasil.com (Daniel Quinlan) :   
     .


  nat@nat@nataa.fr.eu.org (Nat Makarevitch) :   mrproper, tar -p,
    .


  boldt@math.ucsb.edu (Axel Boldt) :    
  Internet     ,     .


  lembark@wrkhors.psyber.com (Steve Lembark) :   
   boot.


  kbriggs@earwax.pd.uwa.edu.au (Keith Briggs) :  
  .


  rmcguire@freenet.columbus.oh.us (Ryan McGuire) :   
   makeables.


  dumas@excalibur.ibp.fr (Eric Dumas) :   .


  simazaki@ab11.yamanashi.ac.jp (Yasutada Shimazaki) :  
  .


  jjamor@lml.ls.fi.upm.es (Juan Jose Amor Iglesias) :  
  .


  mva@sbbs.se (Martin Wahlen) :   .


  jzp1218@stud.u-szeged.hu (Zoltan Vamosi) :   .


  bart@mat.uni.torun.pl (Bartosz Maruszewski):   .


  donahue@tiber.nist.gov (Michael J Donahue) :  , 
   "  ".


  rms@gnu.ai.mit.edu (Richard Stallman) :    ""
    .


  dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup) :   NFS.


  esr@snark.thyrsus.com (Eric Raymond) :  .


  ,        mails  
   .


  [1m12.4.  Copyright,  ,   [0m

  Copyright (C) Brian Ward, 1994-1999.


           
  ,        copyright  
          .


          
           ,  
           
     .     
  " ".


   : .


   :      .
  ,        
     ,     .
  (        ,  
  .) ,      
      .      .
  .







































