linux内核安装指南-1
Linux kernel release 2.6.xx <http://kernel.org/>
These are the release notes for Linux version 2.6. Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong.
这里有许多LINUX 2.6的发布注解。认真地阅读他们,因为他们会告诉你所有相关的内容,
解释如何安装内核,以及出错时如何处理。
WHAT IS LINUX?
Linux is a clone of the operating system Unix, written from scratch by
Linus Torvalds with assistance from a loosely-knit team of hackers across
the Net. It aims towards POSIX and Single UNIX Specification compliance.
LINUX是操作系统能够UNIX的一个克隆。在一帮遍布互联网的松散组织起来的黑客协
助下,由Linus Torvalds仓促写成的。它遵循POSIX和Single UNIX Specification标准。
It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management,
and multistack networking including IPv4 and IPv6.
它具备所有的你希望一个现代、完善的UNIX应该拥有的特征,包括真正的多任务、虚拟内存、
共享库、命令载入、共享的写时拷贝执行、正确的内存管理、以及多任务网络[包括IPv4和IPv6]。
It is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.
它在GNU GPL协议下发布,请查看版权文件获取更详细的细节信息。
ON WHAT HARDWARE DOES IT RUN?
Although originally developed first for 32-bit x86-based PCs (386 or higher),
today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
Xtensa, AVR32 and Renesas M32R architectures.
虽然,最早是为32位的PC(386或者更高)开发的,今天linux最少已经可以运行在康柏
Alpha AXP、Sun的SPARC和UltraSPARC、摩托罗拉6800、PowerPC、PowerPC64、ARM、
Hitachi SuperH, Cell,IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX,
AMD x86-64, AXIS CRIS, Xtensa, AVR32 以及Renesas M32R 等架构。
Linux is easily portable to most general-purpose 32- or 64-bit architectures
as long as they have a paged memory management unit (PMMU) and a port of the
GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
also been ported to a number of architectures without a PMMU, although
functionality is then obviously somewhat limited.
Linux是最容易移植到绝大多数通用32位或64位架构,主要他们支持页式内存管理单元(PMMU)和
GCC接口。linux也被移植到一系列不支持PMMU的架构,虽然有些功能显然是要受到限制。
Linux has also been ported to itself. You can now run the kernel as a
userspace application - this is called UserMode Linux (UML).
linux已经被移植到自身。你现在可以将内核作为用户空间的应用程序来运行,这就是
用户模式的Linux(UML)。
DOCUMENTATION:
- There is a lot of documentation available both in electronic form on
the Internet and in books, both Linux-specific and pertaining to
general UNIX questions. I''d recommend looking into the documentation
subdirectories on any Linux FTP site for the LDP (Linux Documentation
Project) books. This README is not meant to be documentation on the
system: there are much better sources available.
有很多文档即以互联网上的电子形式也以书的形式提供,即有linux专题或者UNIX
普遍问题相关。我建议仔细查看任何linux FTP页面的文档子目录,查找LDP(linux 文档项目)
的书。这个README不是这个系统的文档:有更多更好的资源可以获取。
- There are various README files in the Documentation/ subdirectory:
these typically contain kernel-specific installation notes for some
drivers for example. See Documentation/00-INDEX for a list of what
is contained in each file. Please read the Changes file, as it
contains information about the problems, which may result by upgrading
your kernel.
有许多不同的README文件在文档子目录:特别是包含内核专有的安装指南,以某些驱动作为例子。
查看文件/00-INDEX,浏览下每个文件包含的内容列表。请阅读修改日志,因为
它包含关于问题的信息,这些问题可能影响你升级内核。
- The Documentation/DocBook/ subdirectory contains several guides for
kernel developers and users. These guides can be rendered in a
number of formats: PostScript (.ps), PDF, and HTML, among others.
After installation, "make psdocs", "make pdfdocs", or "make htmldocs"
will render the documentation in the requested format.
/DocBook子目录包含几个内核开发者和使用者的手册。这些手册能够被转译成几种格式:PostScript (.ps),
PDF, and HTML以及其他格式。安装之后,"make psdocs"、"make pdfdocs"、"make htmldocs"
将转译这个文档到指定的格式。
INSTALLING the kernel:
- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:
如果你要以全源码方式安装,将内核压缩包存放在一个你有权限访问的目录,并且解压。
gzip -cd linux-2.6.XX.tar.gz | tar xvf -
或者
bzip2 -dc linux-2.6.XX.tar.bz2 | tar xvf -
Replace "XX" with the version number of the latest kernel.
将"XX"替换为实际内核文件的版本号。
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.
不要使用/usr/src/linux目录!这个目录有一个内核头文件集合,通常是不完整的,
这些头文件被库头文件所使用。他们应该正好匹配库文件,而不应该正好被内核变更
给弄得一团糟。
- You can also upgrade between 2.6.xx releases by patching. Patches are
distributed in the traditional gzip and the newer bzip2 format. To
install by patching, get all the newer patch files, enter the
top level directory of the kernel source (linux-2.6.xx) and execute:
你也可以通过打补丁在2.6.xx发布版之间升级。补丁通常以传统得gzip和新得bzip2格式
发布。为了安装补丁,下载所有更新得补丁文件,进入内核源码(linux-2.6.xx)的最顶
层目录并且执行
gzip -cd ../patch-2.6.xx.gz | patch -p1
or
bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1
(repeat xx for all versions bigger than the version of your current
source tree, _in_order_) and you should be ok. You may want to remove
the backup files (xxx~ or xxx.orig), and make sure that there are no
failed patches (xxx# or xxx.rej). If there are, either you or me has
made a mistake.
(按顺序,重复输入所有比你当前源码树更大的版本号),那么你就可以顺利完成了。
你可能想删除备份文件(xxx~或者xxx.orig),确认没有失败的补丁(xxx#或者xxx.rej).
如果有,不是你就是我犯了一个错误。
Unlike patches for the 2.6.x kernels, patches for the 2.6.x.y kernels
(also known as the -stable kernels) are not incremental but instead apply
directly to the base 2.6.x kernel. Please read
Documentation/applying-patches.txt for more information.
和2.6.x内核的补丁不一样,2.6.x.y内核的补丁,就是所谓的稳定版本,不是递增的,
而是直接替换2.6.x内核。请阅读applying-patches.txt,
文章出处:DIY部落(http://www.diybl.com/course/6_system/linux/Linuxjs/20071215/92305.html)