微吼云上線多路互動直播服務 加速多場景互動直播落地
606
2025-04-01
Linux kernel release 2.6.xx
Linux內核-2.6.xx版本
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.
這些是Linux2.6版本的文檔。認真閱讀它們,因為它們能夠告訴你這是什么,解釋如何
安裝內核,并且當出現錯誤的時候該怎么辦。
WHAT IS LINUX?
Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.
It aims towards POSIX compliance.
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 TCP/IP networking.
It is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.
什么是Linux?
Linux是從Linus Torvalds的Unix衍生而來的,并且得到了通過網絡而結交的松散的
hackers的幫助,并遵從POSIX規則
它具備你所期望的在現代UNIX操作系統中的所有特點,包括真正的多任務,虛擬內存,
共享庫,按需加載,寫時復制,優雅的內存管理和TCP/IP網絡協議
Linux在GNU公共許可證的保護下發布-詳情查看COPYING文件
ON WHAT HARDWARE DOES IT RUN?
Linux was first developed for 386/486-based PCs. ?These days it also
runs on ARMs, DEC Alphas, SUN Sparcs, M68000 machines (like Atari and
Amiga), MIPS and PowerPC, and others.
運行于那些硬件平臺?
Linux最初是開發運行于386/246體系結構的PC的。現在,它也能運行于ARMs,
DEC Alphas, SUN Sparcs, M68000的機器上 (像Atari金額Amiga),
MIPS,PowerPC和其他硬件平臺上
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.
- 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.
- 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.
文檔:
- 對于Linux特定的或者是常見的Unix的問題在網上的電子版或者書中都有許多可用的
可用的文檔。我推薦查看Linux的FTP站的documentation子目錄下的LDP文檔。這個
README文檔不是整個系統的詳細文檔:還有更多更好的可用資源
- 在Documentation目錄的子目錄下有許多不同的README文檔,它們通常包含了一些
內核相關的驅動的安裝實例。請查看Documentation/00-INDEX文件。請閱讀Changes
文件,因為它包含了升級你的內核可能帶來的一些問題
- Documentation/DocBook的子目錄包含了一些為內核開發者和用戶提供的指導文檔。
這些文檔能被生成為多種格式:PostScripts(.ps),PDF,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 -
Replace "XX" with the version number of the latest kernel.
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.
- You can also upgrade between 2.6.xx releases by patching. ?Patches are
distributed in the traditional gzip and the new 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:
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.
Alternatively, the script patch-kernel can be used to automate this
process. ?It determines the current kernel version and applies any
patches found.
linux/scripts/patch-kernel linux
The first argument in the command above is the location of the
kernel source. ?Patches are applied from the current directory, but
an alternative directory can be specified as the second argument.
- Make sure you have no stale .o files and dependencies lying around:
cd linux
make mrproper
You should now have the sources correctly installed.
安裝內核:
- 如果你從完整的內核源碼包安裝,請將內核源碼壓縮包放在具有權限的目錄下
(例如你的主用戶目錄下)并且解壓它:
gzip -cd linux-2.6.XX.tar.gz | tar xvf -
將“XX”替換為最新版本內核的版本號
千萬不要使用/usr/src/linux的空間!這個區域有(通常不完整的)Linux內核
頭文件的集合。它們需要與庫對應,無論如何也不要把你當前的內核弄亂。
- 你也可以通過在2.6.××版本之間通過補丁來升級。補丁包一般通過gzip或者bzip2
來打包發布,獲取最新的源碼,進入源碼樹頂層路徑并執行:
gzip -cd ../patch-2.6.xx.gz | patch -p1
或者
bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1
(重復解壓執行所有比現有版本號要大的xx的壓縮包)
你可能想要移除那些備份的文件(xxx~或者xxx.orig),并且確保沒有失敗的
補?。▁xx#或者xxx.rej)。如果有,說明要么是你要么是我出錯誤了
另外,patch-kernel腳本可以用來自動的執行以上過程。它會按照現在的內核版本
應用它找到的所有內核補丁
linux/scripts/patch-kernel linux
上述命令的第一個參數是內核源碼的位置。會被在當前的目錄查找補丁,但是你可以
使用第二個參數來指定查找的目錄
- 確保沒有舊的.o文件或者依賴:
cd linux
make mrproper
你現在應該已經正確的安裝了內核源代碼
SOFTWARE REQUIREMENTS
Compiling and running the 2.6.xx kernels requires up-to-date
versions of various software packages. ?Consult
./Documentation/Changes for the minimum version numbers required
and how to get updates for these packages. ?Beware that using
excessively old versions of these packages can cause indirect
errors that are very difficult to track down, so don't assume that
you can just update packages when obvious problems arise during
build or operation.
軟件依賴
編譯和運行2.6.xx內核需要最新的不同軟件包。查看./Documentation/Changes
來獲取所需軟件包的最小版本號和怎樣更新這些軟件包。要知道過多的使用老的
軟件包會引起一些很難捕獲到的錯誤,因此不要抱著僥幸心理不去升級那些軟件包
BUILD directory for the kernel:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
Example:
kernel source code: /usr/src/linux-2.6.N
build directory: /home/name/build/kernel
To configure and build the kernel use:
cd /usr/src/linux-2.6.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.
構建內核路徑:
當編譯內核時所有的輸出文件會默認的存放在內核源代碼的路徑
使用"make O=output/dir"選項可以允許你指定一個目錄存放這些文件
(包括 .config)
例如:
內核源碼: /usr/src/linux-2.6.N
構建路徑: /home/name/build/kernel
使用下列命令來配置和構建內核:
cd /usr/src/linux-2.6.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
請注意:如果你使用了'O=output/dir'選項,那么所有相關的make命令
都要加上這個參數做指定路徑
CONFIGURING the kernel:
Do not skip this step even if you are only upgrading one minor
version. ?New configuration options are added in each release, and
odd problems will turn up if the configuration files are not set up
as expected. ?If you want to carry your existing configuration to a
new version with minimal work, use "make oldconfig", which will
only ask you for the answers to new questions.
- Alternate configuration commands are:
"make menuconfig" ?Text based color menus, radiolists & dialogs.
"make xconfig" ? ? X windows (Qt) based configuration tool.
"make gconfig" ? ? X windows (Gtk) based configuration tool.
"make oldconfig" ? Default all questions based on the contents of
your existing ./.config file.
NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
under some circumstances lead to problems: probing for a
nonexistent controller card may confuse your other controllers
- compiling the kernel with "Processor type" set higher than 386
will result in a kernel that does NOT work on a 386. ?The
kernel will detect this on bootup, and give up.
- A kernel with math-emulation compiled in will still use the
coprocessor if one is present: the math emulation will just
never get used in that case. ?The kernel will be slightly larger,
but will work on different machines regardless of whether they
have a math coprocessor or not.
- the "kernel hacking" configuration details usually result in a
bigger or slower kernel (or both), and can even make the kernel
less stable by configuring some routines to actively try to
break bad code to find kernel problems (kmalloc()). ?Thus you
should probably answer 'n' to the questions for
"development", "experimental", or "debugging" features.
- Check the top Makefile for further site-dependent configuration
(default SVGA mode etc).
配置內核:
不要跳過這步,哪怕你只升級了一個鏡像版本。每一個新的版本都會添加新的配置
選項,如果沒有按照所期望的那樣去配置,那么將會出現一些很古怪的問題。如果
你想要做極少的工作來將你現在的配置移植到新版本的內核中。使用"make oldconfig"
那樣的話只會問你少量的一些問題
- 可選的配置命令有:
"make menuconfig" ?基于彩色菜單,單選列表和對話框的文本
"make xconfig" ? ? 基于X windows (Qt)的配置工具
"make gconfig" ? ? 基于X windows (Gtk)的配置工具
"make oldconfig" ? 基于所存在的./.config文件的默認配置
注意"make config":
- 安裝不必要的驅動會使內核過大,并且在某些情況下會導致一些問題:
安裝不存在控制卡的驅動會擾亂其他的控制卡
- 在編譯內核時使用高于386的"Processor type"選項會使得內核不能在
386機器上運行。內核會在機器啟動時檢測這個問題,然后放棄啟動。
- 編譯有數學仿真器的內核依舊會使用協處理器,如果存在協處理器的話:
在那種情況下,數學仿真器從來不會被使用。內核會稍大一些,但是它們
會在不同的機器上運行,無論機器上是否存在協處理器
- "kernel hacking"配置細節會導致一個更大或者更慢的內核(或者兼而有之)
甚至會因為配置了一些為找到內核問題而積極破壞一些壞代碼的例程而導致
內核不穩定(kmalloc()),因此你應該適當地回答'n'來回應"development",
"experimental"或者"debugging"
? - 檢查最頂部Makefile為更相關依賴的配置(默認SVGA模式等)
COMPILING the kernel:
- Make sure you have gcc 2.95.3 available.
gcc 2.91.66 (egcs-1.1.2), and gcc 2.7.2.3 are known to miscompile
some parts of the kernel, and are *no longer supported*.
Also remember to upgrade your binutils package (for as/ld/nm and company)
if necessary. For more information, refer to ./Documentation/Changes.
Please note that you can still run a.out user programs with this kernel.
- Do a "make bzImage" to create a compressed kernel image. ?If you want
to make a boot disk (without root filesystem or LILO), insert a floppy
in your A: drive, and do a "make bzdisk". ?It is also possible to do
"make install" if you have lilo installed to suit the kernel makefiles,
but you may want to check your particular lilo setup first.
To do the actual install you have to be root, but none of the normal
build should require that. Don't take the name of root in vain.
- In the unlikely event that your system cannot boot bzImage kernels you
can still compile your kernel as zImage. However, since zImage support
will be removed at some point in the future in favor of bzImage we
encourage people having problems with booting bzImage kernels to report
these, with detailed hardware configuration information, to the
linux-kernel mailing list and to H. Peter Anvin
- If you configured any of the parts of the kernel as `modules', you
will have to do "make modules" followed by "make modules_install".
- Keep a backup kernel handy in case something goes wrong. ?This is
especially true for the development releases, since each new release
contains new code which has not been debugged. ?Make sure you keep a
backup of the modules corresponding to that kernel, as well. ?If you
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you
do a "make modules_install".
- In order to boot your new kernel, you'll need to copy the kernel
image (found in .../linux/arch/i386/boot/bzImage after compilation)
to the place where your regular bootable kernel is found.
For some, this is on a floppy disk, in which case you can copy the
kernel bzImage file to /dev/fd0 to make a bootable floppy.
If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as specified in the file /etc/lilo.conf. ?The
kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
/boot/bzImage. ?To use the new kernel, save a copy of the old image
and copy the new image over the old one. ?Then, you MUST RERUN LILO
to update the loading map!! If you don't, you won't be able to boot
the new kernel image.
Reinstalling LILO is usually a matter of running /sbin/lilo.
You may wish to edit /etc/lilo.conf to specify an entry for your
old kernel image (say, /vmlinux.old) in case the new one does not
work. ?See the LILO docs for more information.
After reinstalling LILO, you should be all set. ?Shutdown the system,
reboot, and enjoy!
If you ever need to change the default root device, video mode,
ramdisk size, etc. ?in the kernel image, use the 'rdev' program (or
alternatively the LILO boot options when appropriate). ?No need to
recompile the kernel to change these parameters.
- Reboot with the new kernel and enjoy.
編譯內核:
- 確保你有可用的gcc 2.95.3
gcc 2.91.66 (egcs-1.1.2)和gcc 2.7.2.3已知會錯誤編譯一部分內核,并且它們
為"非長期支持版本"
如果必要的話,記得升級你的binutils軟件包。
獲取更多信息請參考 ./Documentation/Changes
請注意,使用這個內核你仍然可以運行a.out用戶程序
- 使用"nake bzImage"來創建一個壓縮內核鏡像。如果你想制作一個啟動盤(沒有
根文件系統或者LILO Linux加載程序),插入一張軟盤然后使用"make bzdisk"命令
也可以使用"make install"如果你安裝有適于內核makefiles的LILO,但是你可能要
先檢查LILO的安裝
做實際的內核安裝你必須擁有root權限,但是正常的構建都不需要那樣。不要隨意
使用root
- 你的系統不能啟動bzImage內核而能夠依舊可以把內核編譯為zImage是不可能的。
不論怎樣,既然在未來的某個時刻,zImage將不再被支持,而支持bzImage,我們
鼓勵大家來報告一些啟動bzImage內核的問題,要包括詳細的硬件配置信息來報告給
linux-kernel郵件列表并提交給.Peter Anvin ?
- 如果你以模塊化的形式編譯內核,你需要按照"make modules_install"來使用
"make modules"命令
- 備份你的內核以防它出錯。尤其對于開發者版本的內核,因為每一個新版本都包含
沒有被調試的代碼。也要確保你有對應你的內核版本的模塊備份。如果你安裝和你
當前工作一樣版本的內核,在你使用"make modules_install"之前備份你的模塊
目錄
- 為了啟動你的新內核,你需要拷貝你的內核鏡像(編譯后在 .../linux/arch/i386
/boot/bzImage 找到)至你一般啟動的內核
以上是在軟盤中啟動,你可以拷貝內核bzImage文件至 /dev/fd0 來制作一個啟動軟盤
如果你在硬盤啟動Linux,拷貝內核至相關路徑(參見 /etc/lilo.conf)
內核鏡像文件通常在 /vmlinuz, /boot/vmlinuz, /bzImage 或者 /boot/bzImage
為了使用新內核,拷貝一份老的鏡像,然后用新鏡像覆蓋老鏡像。然后你必須重新
運行LILO來更新裝載表。如果不這樣做,新內核將不會被啟動
通常運行 /sbin/lilo 來重新設置LILO,你可能希望通過編輯 /etc/lilo.conf
來為你的老內核(vmlinux.old)指定一個入口以防新內核不工作。你可以查看
LILO文檔來獲取更多信息
重新設置LILO之后,一切準備就緒。關機,重啟,OK!
如果你想要更改默認的跟設備,顯示模式,內存大小等等,在內核鏡像中使用"rdev"
(或者利用LILO啟動選項)。沒必要重新編譯內核
- 用新內核重啟,然后盡情的玩耍吧!
Linux 鏡像服務
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。