home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / KERNEL / V1_1 / SOURCE / LINUX-1_1 / KernelInfo < prev    next >
Encoding:
Text File  |  1994-05-11  |  4.7 KB  |  119 lines

  1. [ NOTE! I didn't write this: I'm too lazy to write README's etc.  I just
  2.   make this available because it might just reduce the number of "how do
  3.   I compile linux" questions on the net (and to me).  I'm not
  4.   guaranteeing anything in this README: things might have changed with
  5.   0.97, making this not completely up-to-date.  - Linus ]
  6.  
  7.  
  8.     VERY QUICK AND DIRTY README
  9.     by Lars Wirzenius
  10.  
  11. This is the README for the Linux kernel sources.  It tells a few small
  12. things about kernel configuration and other things that can perhaps be
  13. useful if you want to compile the kernel from scratch.  It leaves out a
  14. lot as well, probably because the person who wrote it doesn't understand
  15. very much about operating systems.  Linus did his best to help, but all
  16. problems this causes are my fault. 
  17.  
  18. In order to compile this version of the kernel you need GCC 2.2.2 or
  19. newer.  Some makefile targets require special commands which may not be
  20. available on all machines (see below).  Normal utilities like ls etc are
  21. not explicitly listed, they are assumed to be available on all systems. 
  22.  
  23. Kernel sources are usually kept in /usr/src/linux.  If you have them
  24. elsewhere, you will have to change path names in a few places. 
  25. Filenames that aren't absolute are supposed to be relative to the
  26. toplevel kernel source directory. 
  27.  
  28.  
  29. * Basic configuration
  30.  
  31. 1.  Edit Makefile: Check the definitions of macros ROOTDEV, KEYBOARD,
  32. MATH_EMULATION, RAMDISK and SVGA_MODE before you run make.  They are
  33. explained in the Makefile.  MATH_EMULATION does not hurt much even if
  34. you have an FPU (387 or a 486 with a built in FPU), since Linux uses
  35. the FPU if it finds one, even with MATH_EMULATION defined.  The kernel
  36. will be slightly bigger.  It is probably not worth it to recompile the
  37. kernel just to get rid of the emulation.
  38.  
  39. 2.  Create a symlink:
  40.  
  41.     ln -s /usr/src/linux/include/linux /usr/include/linux 
  42.  
  43. This is required so that tools/build.c will compile and link (it
  44. requires the standard versions of headers instead of the kernel specific
  45. headers, as it is a normal application, not kernel code).
  46.  
  47. [ Linus's note: I don't think this is required any more, but it's still
  48.   default installation procedure, and is needed for things like the mkfs
  49.   sources anyway ]
  50.  
  51. * Things you may want to get rid of
  52.  
  53. 3.  To remove SCSI drivers, do this:
  54.  
  55.     - remove kernel/blk_drv/scsi/scsi.a from DRIVERS in the Makefile
  56.     - remove the commands for the subdirs dependency in
  57.       kernel/blk_drv/Makefile
  58.     - add "#undef CONFIG_SCSI" to the end of include/linux/config.h
  59.  
  60. The SCSI drivers take a bit of memory, and also slow the bootup a bit,
  61. so you may want to get rid of them if you don't have an SCSI drive.
  62.  
  63. 4.  The kernel contains code for the extended filesystem (extfs) and MS-DOS
  64. filesystem (dosfs), both of which are in testing phases and are not
  65. recommended for real use yet.  If you don't want to include these in the
  66. kernel, do the following:
  67.  
  68.     - remove references to these in the FILESYSTEMS macro in the
  69.       root Makefile 
  70.     - remove directory names from the SUBDIRS macro in fs/Makefile
  71.     - remove the corresponding lines in the initialization of
  72.       file_systems in fs/super.c.
  73.  
  74. 5.  To configure more ptys do this:
  75.     - change NR_PTYS in include/linux/tty.h to the number you want
  76.     - create the new files in /dev
  77.     - recompile the kernel
  78.  
  79.  
  80. * Running make
  81.  
  82. Unless you know what you're doing, don't ever run the makefiles in
  83. subdirectories by hand.  There is a bit of interaction between the
  84. various makefiles, e.g. in the form of inherited macros and the like.
  85.  
  86. The following targets all apply for the makefile at the root of the
  87. kernel source tree.
  88.  
  89. "make" or "make all" compiles everything.
  90.  
  91. "make Image" is like "make all", but it doesn't bump the number in
  92. .version, which tells how many times this version has been compiled
  93. (helps you differentiate between different configurations etc).
  94.  
  95. "make disk" is like "make Image", but it additionally writes out a copy
  96. of the boot image to a floppy in your first floppy drive (/dev/fd0;
  97. change the filename if you want a different floppy).  You need to have
  98. a formatted, overwritable floppy in that drive when it is time to do the
  99. copy.  This requires dd.
  100.  
  101. "make dep" updates all dependencies.  This requires sed.  It modifies
  102. the makefiles directly (the end of them, starting at the ###Dependencies
  103. -line at the end).
  104.  
  105. "make clean" will remove all object files and other files created by the
  106. compilation.  This requires basename.
  107.  
  108. You may wish to redirect compiler error messages to a file so that you
  109. can review them later and to ease problem fixing.  You can do this with
  110. Bash with:
  111.  
  112.     make something 2>&1 | tee make.out
  113.  
  114. The tee part is so that you can check what is going on while the
  115. compilation runs.  If you have GNU emacs and use M-x compile you don't
  116. need this, of course.
  117.  
  118.         Lars Wirzeniu
  119.