home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / README.modules < prev    next >
Encoding:
Text File  |  1995-01-31  |  2.8 KB  |  97 lines

  1. This file describes the strategy for dynamically loadable modules
  2. in the Linux kernel. This is not a technical description on
  3. the internals of module, but mostly a sample of how to compile
  4. and use modules.
  5.  
  6. In this kernel you also have a possibility to create modules that are
  7. less dependent on the kernel version.  This option can be selected
  8. during "make config", by enabling CONFIG_MODVERSIONS.
  9. Note: If you enable CONFIG_MODVERSIONS, you will need some utilities
  10.       from the latest module support package: "modules-1.1.8*.tar.gz"!
  11.  
  12. Anyway, your first step is to compile the kernel, as explained in the
  13. file README.  It generally goes like:
  14.  
  15.     make config
  16.     make dep
  17.     make clean
  18.     make zImage or make zlilo
  19.  
  20. In "make config", you select what you want to include in the kernel.
  21. You will generally select the minimal set that is needed to boot:
  22.  
  23.     The filesystem of your root partition
  24.     A scsi driver, but see below for a list of SCSI modules!
  25.     Normal hard drive support
  26.     Net support (CONFIG_NET)
  27.     TCP/IP support (CONFIG_INET), but no drivers!
  28.  
  29.     plus those things that you just can't live without...
  30.  
  31. What has been left out is generally loadable as a modules.
  32. The set of modules is rapidly increasing, but so far these are known:
  33.  
  34.     Most filesystems: minix, xiafs, msdos, umsdos, sysv, isofs
  35.  
  36.     Some SCSI drivers: aha1542, in2000
  37.  
  38.     Some ethernet drivers:
  39.         plip, slip, dummy,
  40.         de600, de620
  41.         3c501, 3c509
  42.         eexpress, depca,
  43.         ewrk3, apricot
  44.  
  45.     Some misc modules:
  46.         lp: line printer
  47.         binfmt_elf: elf loader
  48.  
  49. When you have made the kernel, you create the modules by doing:
  50.  
  51.     make modules
  52.  
  53. This will compile all modules and update the modules directory.
  54. In this directory you will then find a bunch of symbolic links,
  55. pointing to the various object files in the kernel tree.
  56.  
  57. As soon as you have rebooted the newly made kernel, you can install
  58. and remove modules at will with the utilities: "insmod" and "rmmod".
  59.  
  60.  
  61. Now, after you have made all modules, you can also do:
  62.  
  63.     make modules_install
  64.  
  65. This will copy all newly made modules into subdirectories under
  66. "/lib/modules/kernel_release/", where "kernel_release" is something
  67. like 1.1.83, or whatever the current kernel version is...
  68.  
  69.  
  70. Nifty features:
  71.  
  72. If you have installed the utilities from "modules-1.1.8*.tar.gz",
  73. you will have access to two new utilities: "modprobe" and "depmod"
  74.  
  75. Using the modprobe utility, you can load any module like this:
  76.  
  77.     /sbin/modprobe module
  78.  
  79. without paying much attention to which kernel you are running.
  80. To use modprobe successfully, you generally place the following
  81. command in your /etc/rc.d/rc.S script.
  82.  
  83.     /sbin/depmod -a
  84.  
  85. This computes the dependencies between the different modules.
  86. Then if you do, for example
  87.  
  88.     /sbin/modprobe umsdos
  89.  
  90. you will automatically load _both_ the msdos and umsdos modules,
  91. since umsdos runs piggyback on msdos.
  92.  
  93.  
  94. Written by:
  95.     Jacques Gelinas <jacques@solucorp.qc.ca>
  96.     Bjorn Ekwall <bj0rn@blox.se>
  97.