八津尾です。
kernel-handbook の Chapter 3 です。
少し長いですが査読をお願い致します。
---------------------------------------------------------------------
<chapt id="packaging">
<heading>Debian kernel packages</heading>
<sect id="source-pkg">
<heading>Source package</heading>
<p>
To ensure that the latest kernel version, containing all the
essential bug and security fixes is available on as many
architectures as possible, starting with 2.6.12 the kernel team
introduced a new packaging scheme. In it most of the
kernel-related binary packages are built from a single source
package <tt>linux</tt> (previously <tt>linux-2.6</tt>). The
<tt>linux</tt> source package supports building of kernel
images and headers for all currently supported
architectures. Subsequent sections of this chapter document the
naming and contents of the binary packages built from the
<tt>linux</tt> source package.
</p>
<sect id="arch-indep">
<heading>Architecture-independent packages</heading>
<p>
<taglist>
<tag><tt>linux-source-<em>version</em></tt></tag>
<item>
This package contains the Debian kernel source
tarball. The patchlevel of the source is determined by the
Debian revision of the package, for example the version 3.2.19-1
of the package <tt>linux-source-3.2</tt> contains the
version 3.2.19 of the Debian kernel source patched to
patchlevel 1. Once the package is installed, the source
tarball is available at
<tt>/usr/src/linux-source-<em>version</em>.tar.bz2</tt>.
</item>
<tag><tt>linux-manual-<em>version</em></tt></tag>
<item>
This package contains the manual pages for the functions,
constituting the kernel API. These pages are installed
into <tt>/usr/share/man/man9/</tt>, and are accessible
with the standard <tt>man</tt> command. Due to filename
conflicts, only one <tt>linux-manual</tt> package may be
installed at any given time.
</item>
<tag><tt>linux-doc-<em>version</em></tt></tag>
<item>
This package contains the rest of the kernel documentation
in various formats. It is installed in
<tt>/usr/share/doc/linux-doc-<em>version</em></tt>.
</item>
<tag><tt>linux-support-<em>version</em>-<em>abiname</em></tt></tag>
<item>
This package contains the support files for building of
out-of-tree modules for given version and abiname.
</item>
</taglist>
</p>
</sect>
<sect id="arch-dep">
<heading>Architecture-dependent packages</heading>
<p>
The kind of hardware the particular kernel package is
designed for is uniquely identified by the
<em>architecture</em>, <em>featureset</em>, and
<em>flavour</em>. Kernels for all architectures are built
from the same Debian kernel source tree, which is obtained
using the procedure described in <ref id="source">. Each
architecture usually has multiple flavours of the binary
kernel images. Different flavours correspond to different
kernel configuration files, used to build the binary images
from the <strong>same</strong> kernel tree.
</p>
<p>
In order to build a working kernel with an extra featureset
not provided by the upstream source, additional changes to
the Debian kernel source are required. Again, multiple
flavours of binary images may be built from the featureset
tree. For example, the <tt>i386</tt> architecture has a number of
different flavours, such as <tt>486</tt>, <tt>686-pae</tt> and
<tt>amd64</tt>, built from the common Debian kernel source. It
also contains the <tt>rt</tt> featureset. The source tree for
building the kernels for each of these featuresets is
obtained by applying additional patches to the Debian kernel
source. It may be used to build the <tt>rt-686-pae</tt>
binary image flavours. The names of the
Debian binary packages incorporate the name of the flavour
and, if necessary, the name of the featureset (there is
no need to worry about the name of the architecture, since
Debian tools will only allow installation of the packages
with "correct" architecture). If the arch does not have any
featuresets, the featureset part is omitted from the name, as
indicated by the square brackets below.
</p>
<p>
Package names also include the <em>abiname</em>, a small
integer, which identifies the kernel's binary compatibility
level. The kernels with different abinames are binary
incompatible, so upgrading to a kernel with a different
abiname will most likely require recompilation of
third-party binary modules against the new kernel. The list
of architecture-dependent packages together with a short
description is given below.
</p>
<p>
<taglist>
<tag><tt>linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt></tag>
<item>
This package contains a common set of kernel headers for a
particular featureset (or arch, if featureset is
empty). Together with the flavour-specific
<tt>linux-headers</tt> package it provides a full set of
kernel headers, suitable for building of out-of-tree
modules. This package should not normally be installed
directly, but only as a dependency of the flavour-specific
headers package (see next description). It unpacks into
the
<tt>/usr/src/linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt>
directory.
</item>
</taglist>
<taglist>
<tag><tt>linux-headers-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
This package provides flavour-specific header files. It
depends on the corresponding
<tt>linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt>
package, and sets up symbolic links into its directory
tree in such a way that the directory
<tt>/usr/src/linux-headers-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt>
appears to contain a full set of headers, required for
building of out-of-tree kernel modules. For more
information on this check out <ref
id="common-out-of-tree">. A complete set of kernel headers
matching the currently running official kernel may be
installed with a command
<example>
apt-get install linux-headers-$(uname -r)
</example>
</item>
<tag><tt>linux-image[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<tag><tt>linux-headers[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
<p>
These virtual packages provide (via dependencies) the latest
binary image and matching set of header files (respectively)
for a particular flavour. Example: <tt>linux-image-rt-686-pae</tt>
</p>
<p>
In Debian 6.0 (squeeze) and earlier, the headers
metapackages were
named <tt>linux-headers-2.6[-<em>featureset</em>]-<em>flavour</em></tt>.
</p>
</item>
<tag><tt>linux-image-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
<p>
This package contains the binary kernel image and
pre-built binary modules for a particular
arch/featureset/flavour combination. Names of the files
installed by this package are
architecture-dependent. Typical locations of essential
files for the <tt>i386</tt> architecture are:
<taglist>
<tag><tt>/boot/vmlinuz-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
The binary (compressed) kernel image.
</item>
<tag><tt>/boot/initrd.img-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
Initial RAM filesystem (initramfs) image. Note, that this file is automatically generated
in the installation process and is <strong>not</strong> shipped as a part of the package.
See <ref id="initramfs"> for more details.
</item>
<tag><tt>/boot/config-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
The kernel configuration file used to build this particular kernel. May be used
to rebuild the kernel from source, if necessary.
</item>
<tag><tt>/lib/modules/<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em>/</tt></tag>
<item>
Directory containing the pre-built binary kernel modules.
</item>
</taglist>
</item>
<tag><tt>linux-libc-dev</tt></tag>
<item>
<p>
This package provides Linux kernel headers for use by userspace programs,
such as GNU glibc and other system libraries.
</p>
</item>
</taglist>
</p>
</sect>
</chapt>
---------------------------------------------------------------------
<chapt id="packaging">
<heading>Debian カーネルパッケージ</heading> <sect id="source-pkg"> <heading>ソースパケージ</heading>
<p>
バグやセキュリティの必須の修正が入った、最新のカーネルバージョンが可能な限り全てのアーキテクチャ上
で利用可能であることを担保するために、 2.6.12 からカーネルは、新しいパッケージングの方法を採用しました。
新しい方法では、ほぼ全てのカーネル関連のバイナリパッケージは、<tt>linux</tt> (以前は <tt>linux-2.6</tt> でした)
という 1 つのソースパッケージからビルドされます。<tt>linux</tt> ソースパッケージは、現在サポートし
ている全てのアーキテクチャに対するカーネルイメージとカーネルヘッダのビルドを支援します。
この章の次のセクションからは、<tt>linux</tt> ソースパッケージからビルドされるバイナリパッケージの
命名規則と内容について説明します。
</p>
<sect id="arch-indep">
<heading>アーキテクチャ非依存パッケージ</heading>
<p>
<taglist>
<tag><tt>linux-source-<em>version</em></tt></tag>
<item>このパッケージは Debian カーネルソースの tar 玉が含まれています。ソースのパッチレベルは、
パッケージの Debian リビジョンによって決定されます。例えば、3.2.19-1 というバージョンの
<tt>linux-source-3.2</tt> パッケージには、パッチレベル 1 でパッチされたバージョン 3.2.19 の Debian
カーネルソースを含んでいます。パッケージがインストールされると、tar 玉のソースは
<tt>/usr/src/linux-source-<em>version</em>.tar.bz2</tt> で利用可能になります。</item>
<tag><tt>linux-manual-<em>version</em></tt></tag>
<item>このパッケージはカーネルの API を含めた関数
へのマニュアルパージが含まれています。これらは、<tt>/usr/share/man/man9/</tt>にインストールされ、
標準の <tt>man</tt> コマンドで参照できます。ファイル名が衝突してしまうため、<tt>linux-manual</tt>
パッケージは常にどれか 1 つしかインストールできません。</item>
<tag><tt>linux-doc-<em>version</em></tt></tag>
<item>このパッケージは、その他のカーネル関連のドキュメントが様々なフォーマットで含まれています。
<tt>/usr/share/doc/linux-doc-<em>version</em></tt> にインストールされます。</item>
<tag><tt>linux-support-<em>version</em>-<em>abiname</em></tt></tag>
<item>このパッケージは、パッケージ名の version と abiname の ツリーから取得したモジュールをビルド
するためのサポートファイルが含まれています。</item>
</taglist>
</p>
</sect>
<sect id="arch-dep">
<heading>アーキテクチャ依存パッケージ</heading>
<p>
あるカーネルパッケージを特定のハードウェア向けにデザインしたものは、<em>アーキテクチャ</em>、
<em>フィーチャセット</em>、 <em>フレーバ</em>で一意に識別されます。全てのアーキテクチャ向けのカーネル
は、<ref id="source">で説明されている手順で取得した、同一の Debian カーネルソースツリーからビルドされ
ます。それぞれのアーキテクチャには普通、複数のフレーバのバイナリカーネルイメージがあります。異なるフレ
ーバは、<strong>同一の</strong>カーネルツリーからビルドされますが、バイナリイメージをビルドする際に使
用されるカーネルの設定ファイルが異なります。
</p>
<p>
アップストリームで提供されていない追加のフィーチャセットが動作するカーネルをビルドするには、Debian カ
ーネルソースに追加の設定をする必要があります。この場合もやはり、複数のフレーバのバイナリイメージがフィ
ーチャセットのツリーからビルドできます。例えば、<tt>i386</tt> アーキテクチャには、共通の Debian カーネ
ルソースからビルドされた、いくつもの異なるフレーバがあります。<tt>486</tt>、<tt>686-pae</tt>、<tt>amd64</tt>
などです。また、<tt>i386</tt> アーキテクチャは <tt>rt</tt>フィーチャセットも含んでいます。これらのフィ
ーチャセットが動作するカーネルをビルドするためのソースツリーは、Debian カーネルソースに追加のパッチを
当てることで取得できます。これは、例えば <tt>rt-686-pae</tt> バイナリイメージフレーバをビルドするのに
使われます。Debian バイナリパッケージの名前にはフレーバと、必要であればフィーチャセットの名前が含まれ
ています。 (アーキテクチャ名については気にする必要がありません。Debian tools は "正しい” アーキテクチャ
のパッケージしかインストールを許可しないからです。)もし、アーキテクチャに何もフィーチャセットが無い場合
は、以下の説明にある、確乎( [ ] )内のフィーチャセットの部分が名前から省略されます。
</p>
<p>
パッケージ名にはまた、<em>abiname</em> が含まれます。これは、カーネルのバイナリ互換レベルを識別するため
の小さな整数です。abiname が異なるカーネルは、バイナリ互換性がありません。異なる abiname のカーネルにア
ップグレードする場合、サードパーティ製のバイナリモジュールを、新しいカーネル用にコンパイルし直さなければ
ならない可能性が高いです。アーキテクチャ依存のパッケージのリストと簡単な説明を以下に示します。
</p>
<p>
<taglist>
<tag><tt>linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt></tag>
<item> このパッケージは、特定のフィーチャセット (またはアーキテクチャ。もしフィーチャセットが空の場合は。)
のための共通のカーネルヘッダが含まれます。フレーバ固有の <tt>linux-headers</tt> パッケージと合わせることで、
カーネルヘッダのフルセットとなるため、out-of-tree モジュールのビルドに最適です。このパッケージは通常、直接
インストールすることができますが、あるフレーバ固有のヘッダパッケージの依存としてのみ存在します。(次の説明
を読んで下さい。)<tt>/usr/src/linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt>
ディレクトリに展開されます。</item> </taglist>
<taglist>
<tag><tt>linux-headers-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item> このパッケージはフレーバ固有のヘッダファイルを提供します。これは対応する
<tt>linux-headers-<em>version</em>-<em>abiname</em>-common[-<em>featureset</em>]</tt>
パッケージに依存します。そして、シンボリックリンクをディレクトリツリーの中に設定します。そのようにして、
あのディレクトリ
<tt>/usr/src/linux-headers-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt>
がフルセットのヘッダーを含んでいるように見えます。out-of-tree のカーネルモジュールをビルドするための。
さらに詳しく知りたい場合は、 <ref id="common-out-of-tree">を参照して下さい。
現在走らせているカーネルに対応した完全なセットのカーネルヘッダは次のコマンドでインストールすることができます:
<example> apt-get install linux-headers-$(uname -r) </example> </item>
<tag><tt>linux-image[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<tag><tt>linux-headers[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
</p>
<p>
これらの仮想パッケージは (依存関係を利用して)、特定のフレーバ用の最新のバイナリイメージと、それに対応する
(個々の) ヘッダファイルを提供します。例: <tt>linux-image-rt-686-pae</tt>
</p>
<p>
Debian 6.0 (squeeze) 以前は、ヘッダは <tt>linux-headers-2.6[-<em>featureset</em>]-<em>flavour</em></tt>
という名前のメタパッケージでした。
</p>
</item>
<tag><tt>linux-image-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item>
<p>
このパッケージには、特定の アーキテクチャ/フィーチャセット/フレーバ を組み合わせたバイナリ の kernel
イメージとビルド済みのバイナリモジュールが含まれています。このパッケージによってインストールされた
ファイル名は、アーキテクチャに依存します。伝統的に、<tt>i386</tt> アーキテクチャに必須のファイルは
以下の通りです:
<taglist>
<tag><tt>/boot/vmlinuz-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item> バイナリ (圧縮) kernel イメージです。</item>
<tag><tt>/boot/initrd.img-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item> 初期 RAM ファイルシステム (initramfs) イメージ。このファイルはインストール時に自動的に生成されたもの
です。パッケージの一部として配布されているものでは<strong>ない</strong>ことに注意して下さい。 詳細は
<ref id="initramfs"> を参照して下さい。</item>
<tag><tt>/boot/config-<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em></tt></tag>
<item> この特定のカーネルをビルドするために使用されるカーネル設定ファイル。必要であれば、カーネルをソース
から再構築するために利用できます。</item>
<tag><tt>/lib/modules/<em>version</em>-<em>abiname</em>[-<em>featureset</em>]-<em>flavour</em>/</tt></tag>
<item>
ディレクトリには、ビルド済みのバイナリカーネルモジュールが含まれています。
</item>
</taglist>
</item>
<tag><tt>linux-libc-dev</tt></tag>
<p>
このパッケージは GNU glibc や、その他のシステムライブラリなどのユーザ空間プログラムによって使用される Linux
カーネルヘッダを提供します。
</p>
</item>
</taglist>
</p>
</sect>
</chapt>
Attachment:
signature.asc
Description: Digital signature