view master.idx @ 66:b661eca51591

Minor fix to display.
author Rob Landley <rob@landley.net>
date Tue, 09 Oct 2007 17:08:23 -0500
parents eb75b1bfc3d1
children 992a411c98b6
line wrap: on
line source

<html>
<title>Linux Kernel Documentation</title>
<body>

<h2>Linux Kernel Documentation Index</h2>

<p>This page collects and organizes documentation about the Linux kernel, taken
from many different sources.  What is the kernel, how do you build it, how do
you use it, how do you change it...</p>

<p>This is a work in progress, and probably always will be.  Please let us know
on the
<a href=http://vger.kernel.org/vger-lists.html#linux-doc>linux-doc</a> mailing
list (on vger.kernel.org) about any documentation you'd like added to this
index, and feel free to ask about any topics that aren't covered here yet.
This index is maintained by Rob Landley &lt;rob@landley.net&gt;, and tracked in
<a href=http://landley.net/hg/kdocs>this mercurial repostiory</a>.  The
cannonical location for the page is <a href=http://kernel.org/doc>here</a>.</p>

<hr>

<put_index_here>

<hr>

<span id="Sources of documentation">

<p>These are various upstream sources of documentation, many of which are linked
into the <a href=http://kernel.org/doc>linux kernel documentation index</a>.</p>

<ul>
<li><a href=Documentation>Text files in the kernel's Documentation directory.</a></li>
<li><a href=htmldocs>Output of kernel's "make htmldocs".</a></li>
<li><a href=menuconfig>Menuconfig help</a></li>
<li><a href=readme>Linux kernel README files</a></li>
<li><a href=xmlman>html version of man-pages package</a></li>
<li><a href=http://lwn.net/Kernel/Index/>Linux Weekly News kernel articles</a></li>
<li>Linux Device Drivers book (<a href=http://lwn.net/Kernel/LDD3/>third edition</a>) (<a href=http://www.xml.com/ldd/chapter/book/>second edition</a>)</li>
<li><a href=ols>Ottawa Linux Symposium papers</li>
<li><a href=http://www.linuxjournal.com/xstatic/magazine/archives>Linux Journal archives</a></li>
<li><a href=http://www.ibm.com/developerworks/views/linux/library.jsp>IBM Developerworks Linux Library</a> (also <a href=http://www.ibm.com/developerworks/linux/library/l-linux-kernel/>here</a>)
</li>
<li><a href=http://www.tux.org/lkml/>Linux Kernel Mailing List FAQ</a></li>
<li><a href=http://kernelplanet.org>Kernel Planet (blog aggregator)</a></li>
<li><a href=video.html>Selected videos of interest</a></li>
<li><a href=local>Some locally produced docs</a></li>
</ul>

<span id="Standards">
<ul>
<li><a href=http://www.opengroup.org/onlinepubs/009695399/>Single Unix Specification v3</a> (Also known as Open Group Base Specifications issue 6, and closely overlapping with Posix.  See especially <a href=http://www.opengroup.org/onlinepubs/009695399/idx/xsh.html>system interfaces</a>)</li>
<li><a href=http://www.open-std.org/jtc1/sc22/wg14/www/standards>ISO/IEC C9899</a> the "C99" standard, defining the C programming language.</a></li>
<li><a href=http://www.linux-foundation.org/spec/refspecs/>Linux Foundation's specs page</a> (ELF, Dwarf, ABI...)</li>
</ul>
</span id="Standards">

<span id="Translations">
<ul>
<li><a href=http://tlktp.sourceforge.net/>Linux Kernel Translation Project</a></li>
<li><a href=http://kernelnewbies.org/RegionalNewbies>Kernel Newbies regional pages</a></li>
<li><a href=http://www.linux.or.jp/JF/index.html>Japanese</a></li>
<li><a href=http://zh-kernel.org/docs>Chinese</a></li>
</ul>
</span id="Translations">

</span id="Sources of documentation">

<span id="Building from source">
  <span id="User interface">
    <span id="Configuring">
    </span>
    <span id="building">
      <span id="Building out of tree">
      </span>
    </span>
    <span id="Installing">
    </span>
    <span id="running">
    </span>
    <span id="debugging">
      <span id="QEMU">
      </span>
    </span>
    <span id="cross compiling">
      <span id="User Mode Linux">
      </span>
    </span>
  </span>
  <span id="Infrastructure">
    <span id="kconfig">
    </span>
    <span id="kbuild">
    </span>
    <span id="build and link (tmppiggy)">
    </span>
  </span>
</span>

<span id="Installing and using the kernel">
  <span id="Installing">
    <span id="Kernel image">
    </span>
    <span id="Bootloader">
    </span>
  </span>
  <span id="A working Linux root filesystem">
    <span id="Finding and mounting /">
      <span id="initramfs, switch_root vs pivot_root, /dev/console">
      </span>
    </span>
    <span id="Running programs">
      <span id="init program and PID 1">
        <span id="What does daemonizing really mean?">
        </span>
      </span>
      <span id="Executable formats">
<p>The Linux kernel runs programs in response to the
<a href=xmlman/man3/exec.html>exec</a> syscall, which is called on a
file.  This file must have the
executable bit set, and must be on a filesystem that implements mmap() and which
isn't mounted with the "noexec" option.  The kernel understands
several different <a href="#executable_file_formats">executable file
formats</a>, the most common of which are shell scripts and ELF binaries.</p>
        <span id="Shell scripts">
<p>If the first two bytes of an executable file are the characters "#!", the
file is treated as a script file.  The kernel parses the first line of the file
(until the first newline), and the first argument (immediately following
the #! with no space) is used as absolute path to the script's interpreter,
which must be an executable file.  Any additional arguments on the first
line of the file (separated by whitespace) are passed as the first arguments
to that interpreter executable.  The interpreter's next argument is the name of
the script file, followed by the arguments given on the command line.</p>

<p>To see this behavior in action, run the following:</p>
<blockquote>
<pre>echo "#!/bin/echo hello" > temp
chmod +x temp
./temp one two three
</pre>
</blockquote>

<p>The result should be:</p>
<blockquote>hello ./temp one two three</blockquote>

<p>This is how shell scripts, perl, python, and other scripting languages
work.  Even C code can be run as a script by installing the
<a href=http://en.wikipedia.org/wiki/Tiny_C_Compiler>tinycc</a> package,
adding "#!/usr/bin/tcc -run" to the start of the .c file, and setting the
executable bit on the .c file.</p>
        </span>
        <span id="ELF">
          <span id="Shared libraries">
          </span>
        </span>
      </span>

      <span id="C library">
<p>Most userspace programs access operating system functionality through a C
library, usually installed at "/lib/libc.so.*".  The C library wraps system
calls, and provides implementations of various standard functions.</p>

<p>Because almost all other programming languages are implemented in C
(including python, perl, php, java, javascript, ruby, flash, and just about
everything else), programs written in other languages also make use of the
C library to access operating system services.</p>

<p>The most common C library implementations for Linux are
<a href=http://www.linuxfromscratch.org/lfs/view/6.2/chapter06/glibc.html>glibc</a>
and <a href=http://uClibc.org>uClibc</a>.  Both are full-featured
implementations capable of supporting a full-featured desktop Linux
distribution.</p>

<p>The main advantage of glibc is that it's the standard implementation used by the
largest desktop and server distributions, and has more features than any other
implementation.  The main advantage of uClibc is that it's much smaller and
simpler than glibc while still implementing almost all the same functionality.
For comparison, a "hello world" program statically linked against glibc is half
a megabyte when stripped, while the same program statically linked against
uClibc strips down to 7k.</p>

<p>Other commonly used special-purpose C library implementations include
<a href=http://en.wikipedia.org/wiki/Klibc>klibc</a> and
<a href=http://www.sourceware.org/newlib/>newlib</a>.</p>

<span id="Exporting kernel headers">
<p>Building a C library from source code requires a special set
of Linux kernel header files, which describe the API of the specific version
of the Linux kernel the C library will interface with.  However, the header
files in the kernel source code are designed to build the kernel and contain
a lot of internal information that would only confuse userspace.  These
kernel headers must be "exported", filtering them for use by user space.</p>

<p>Modern Linux kernels (based on 2.6.19.1 and newer) export kernel headers via
the "make headers_install" command.  See
<a href=local/headers_install.txt>exporting kernel headers for use by
userspace</a> for more information.</p>
</span>
      </span>
      <span id="Dynamic loader">
      </span>
    </span>
    <span id="FHS directories">
      <p>FHS spec</p>
      <a href="pending/hotplug.txt">populating /dev from sysfs</a>.
    </span>
  </span>
</span>

<span id="Reading the source code">
  <span id="Source code layout">
    <span id="Following the boot process">
    </span>
    <span id="Major subsystems">
    </span>
    <span id="Architectures">
    </span>
  </span>
  <span id="Concept vs implementation">
    <p>Often the first implementation of a concept gets replaced.
       Journaling != reiserfs, virtualization != xen, devfs gave way to udev...
       Don't let your excitement for the concept blind you to the possibility
       of alternate implementations.</p>
  </span>
  <span id="Concepts">
    <span id="rbtree">
    </span>
    <span id="rcu">
    </span>
  </span>
</span>

<span id="Kernel infrastructure">
  <span id="Process Scheduler">
    <span id="fork, exec">
    </span>
    <span id="sleep">
    </span>
  <span id="Timers">
    <span id="Interrupt handling">
    </span>
  </span>
  <span id="memory management">
    <ul>
    <li><a href="gorman">Understanding the Linux Virtual Memory Manager</a>, by Mel Gorman.</li>
    <li><a href=http://lwn.net/Articles/250967/>What every programmer should know about memory</a> by Ulrich Drepper.</li>
    <li>Ars technica ram guide, parts
<a href=http://arstechnica.com/paedia/r/ram_guide/ram_guide.part1-1.html>one</a>
<a href=http://arstechnica.com/paedia/r/ram_guide/ram_guide.part1-1.html>two</a>
<a href=http://arstechnica.com/paedia/r/ram_guide/ram_guide.part3-1.html>three</a></li>
    <span id="mmap, DMA">
    </span>
  </span>
  <span id="vfs">
    <span id="Filesystems">
      <span id="Types of filesystems (see /proc/filesystems)">
        <span id="Block backed">
        </span>
        <span id="Ram backed">
          <span id="ramfs">
          </span>
          <span id="tmpfs">
          </span>
        </span>
        <span id="Synthetic">
          <span id="proc">
          </span>
          <span id="sys">
          </span>
          <span id="internal (pipefs)">
          </span>
          <span id="usbfs">
          </span>
          <span id="devpts">
          </span>
          <span id="rootfs">
          </span>
          <span id="devfs (obsolete)">
<p>Devfs was the first attempt to do a dynamic /dev directory which could change
in response to hotpluggable hardware, by doing the seemingly obvious thing of
creating a kernel filesystem to mount on /dev which would adjust itself as
the kernel detected changes in the available hardware.</p>

<p>Devfs was an interesting learning experience, but turned out to be the wrong
approach, and was replaced by sysfs and udev.  Devfs was removed in kernel
version 2.6.18.  See
<a href=local/hotplug-history.html>the history of hotplug</a> for details.</p>

          </span>
        </span>
        <span id="Network">
          <span id="nfs">
          </span>
          <span id="smb/cifs">
          </span>
          <span id="FUSE">
          </span>
        </span>
      </span>
      <span id="Filesystem drivers">
        <span id="Using">
        </span>
        <span id="Writing">
        </span>
      </span>
    </span>
  </span>

  <span id="Drivers">
    <span id="Filesystem">
    </span>
    <span id="Block (block layer, scsi layer)">
      <span id="SCSI layer">
	<ul>
	<li><a href="Documentation/scsi">Documentation/scsi</a> scsi.txt scsi_mid_low_api.txt scsi-generic.txt scsi_eh.txt</li>
        <li><a href="http://sg.torque.net/sg/p/sg_v3_ho.html">SCSI Generic (sg) HOWTO</a></li>
	<li><a href="xmlman/man4/sd.html">man 4 sd</a></li>
        <li><a href="http://www.t10.org/scsi-3.htm">SCSI standards</a></li>
	</ul>
      </span>
    </span>
    <span id="Character">
      <span id="serial">
      </span>
      <span id="keyboard">
      </span>
      <span id="tty">
        <span id="pty">
        </span>
      </span>
      <span id="audio">
      </span>
      <span id="null">
      </span>
      <span id="random/urandom">
      </span>
      <span id="zero">
      </span>
    </span>
    <span id="DRI">
    </span>
    <span id="Network">
    </span>
  </span>

  <span id="Hotplug">
  </span>
  <span id="Input core">
  </span>
  <span id="Network">
  </span>
  <span id="Modules">
    <span id="Exported symbols">
      <p>EXPORT_SYMBOL() vs EXPORT_SYMBOL_GPL()</p>
      <p>List of exported symbols.</p>
    </span>
  </span>
  <span id="Busses">
  </span>
  <span id="API (how userspace talks to the kernel)">
    <span id="Syscalls">
    </span>
    <span id="ioctls">
    </span>
    <span id="executable file formats">
      <span id="a.out">
      </span>
      <span id="elf">
        <span id="css, bss, etc.">
        </span>
      </span>
      <span id="#!">
      </span>
      <span id="flat">
      </span>
      <span id="misc">
      </span>
    </span>
    <span id="Device nodes">
    </span>
    <span id="Pipes (new pipe infrastructure)">
    </span>
    <span id="Synthetic filesystems (as API)">
    </span>
  </span>
</span>

<span id="Hardware">
  <span id="Architectures">
<pre>
ls arch/*
include/asm-generic
uml
x86, x86-64 powerpc/ppc arm mips sparc sh 68k/coldfire
</pre>
  </span>
  <span id="DMA, IRQ, MMU (mmap), IOMMU, port I/O">
  </span>
  <span id="Busses">
    <span id="PCI, USB">
    </span>
  </span>
</span>

</span>

<span id="Following Linux development">
  <span id="Distibutions.">
  </span>
  <span id="Releases">
    <span id="Source control">
    </span>
  </span>
  <span id="community">
<pre>
  CATB
  http://vger.kernel.org/vger-lists.html
  http://www.tux.org/lkml/
  lwn, kernel traffic, kernelplanet.
  http://www.kernel.org/faq
    http://www.kernel.org/kdist/rss.xml
  git/mercurial
  Documentation/{CodingStyle,SubmitChecklist}
  The four layer (developer, maintainer, subsystem, linus) model.
  Politics
    Stable API nonsense
    Why reiser4 not in.
</pre>
  </span id="community">
  <span id="Submitting Patches">
  </span>
</span>


<span id="Glossary">
</span>
</body>
</html>