根目錄下README文件翻譯

陳洪波發表於2014-06-29
版權宣告:您好,轉載請留下本人部落格的地址,謝謝 https://blog.csdn.net/hongbochen1223/article/details/35859403

檔案目錄:/README

注:這是一個測試的,想讓廣大網友朋友們看一下是直白的翻譯比較好,還是根據我自己的理解進行翻譯,希望大家提出建議。同時在翻譯中肯定會有一些錯誤,希望大家將錯誤指正出來,以完善中文文件。

正文:

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?

  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. 
Linux是Liuns Torvalds在一些來自網路的電腦愛好者團隊的幫助下從頭開始寫的unix克隆版,它致力於POSIX標準。

  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. 
他具有和現在成熟的unix作業系統所有的特點,包括真正的多工性,虛擬記憶體,共享庫,指令載入,寫時複製程式,合適的記憶體管理和Tcp/ip網路。

  It is distributed under the GNU General Public License – see the
  accompanying COPYING file for more details. 
他在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/486架構的pc機開發的,但是現在他也可以執行在 ARMs, DEC Alphas, SUN Sparcs, M68000 machines (像 Atari and
  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.
在網上有很多電子版的可用的文件,還有很多書籍中也有,這些文件都是一些關於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檔案,這些通常是包含著一些核心專有的安裝資訊,例如一些驅動程式。檢視目錄./Documentation/00-INDEX下的檔案列表,這些檔案介紹每一個檔案都包含什麼資訊。請月的Changes file,因為它包含了一些關於問題的資訊,這些問題將會是你更新你的核心後的結果。

 – 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.
子目錄 Documentation/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 –

   Replace “XX” with the version number of the latest kernel.
如果你安裝整個資源,請把核心包放在你有許可權的目錄下(例如你的主目錄)並且使用下列命令解壓:
gzip -cd linux-2.6.XX.tar.gz | tar xvf –
其中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 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.
你也可以通過修補丁的方式升級2.6.xx核心。這些補丁包以傳統的gzip和新版的bzip2格式封裝。為了通過補丁安裝,獲取所有的新版打包檔案,進入核心資源(linux-2.6.xx)的頂層目錄並以下列命令處理:
gzip -cd ../patch-2.6.xx.gz | patch -p1
  或者是
bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1
(重複的XX是比你當前核心版本號要高的版本號,按順序進行排列),你應該可以。應可能想要去除備份檔案(xxx~ 或者是 xxx.reg),一定要確認你沒有失敗的補丁(xxx# 或者是 xxx.reg).如果有的話,你和我都已經犯了錯誤。

   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.
另外,核心補丁指令碼程式能夠被用來自動化的完成這些過程。她決定當前核心的版本並應用到任何發現的補丁程式中。
linux/scripts/patch-kernel linux
在上述命令中第一個引數是核心原始碼的位置。補丁從當前目錄被應用,但是一個可選的目錄可以被指定作為第二個引數。

 – Make sure you have no stale .o files and dependencies lying around:

cd linux
make mrproper

   You should now have the sources correctly installed.
一定要確定你沒有舊的字尾為.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 install_modules 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)
例如:
Kernel source code: /usr/src/linux-2.6.N
build directory:    /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 install_modules 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.
即使你僅僅更新一個輕微的版本,也不要跳過這個步驟。在每一個發行版中都有新的
配置選項被加進來,如果配置檔案不是按希望爭取的設定,將會出現一些奇怪的問題。
如果你想要使用現在的配置應用到最新版本來使自己有最小工作量,使用命令”make config”
,這個命令將會僅僅問你一下新的問題的答案。

 – 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.
可替代的配置命令有:
“make menuconfig”  帶有顏色的選單,選項列表和對話方塊的文字
“make xconfig”     帶有配置工具的X窗體(Qt)
“make gconfig”     帶有配置工具的X窗體(Gtk)
   
NOTES on “make config”:
“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.
– 編譯核心的時候,將”professor type”設定的比386要高的話,將會導致核心在
 386機器上不能執行。核心將在啟動時檢測這個配置,並且放棄啟動。
– 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.
– “kernel hacking”的配置細節通常會導致核心更大或者是更慢(或者是兩者
 都想存在),如果你配置一些例程嘗試取通過壞的程式碼來找到核心問題的話,
 甚至會使你的核心更不穩定。所以對一些”development”,”experiment”,或者
 是”debugging”特徵的問題,你應該回答”n”。
 – Check the top Makefile for further site-dependent configuration
   (default SVGA mode etc). 
 – 檢查頂層的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.
 – 確定你有gcc 2.95.3編譯器。
   gcc 2.91.66(還有-1.1.10)和gcc 2.7.2.3編譯器可能會錯誤的編譯核心的一部分
   程式,所以以不再被支援。如果必要的話也要記著取更新你的二進位制包(例如 as/ld/
   nm等)。檢視./Documentation/Changes目錄下的檔案獲取更多資訊。

   Please note that you can still run a.out user programs with this kernel.
   請注意你可以在這個核心下執行a.out使用者程式。

 – 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. 
 – 使用命令”make bzImage”來建立一個壓縮的核心映象檔案。如果你想製作一個啟動盤
   (沒有根檔案系統或者是LILO啟動)(譯者注:LILO是linux的一個啟動程式),在你
   的A驅下插入一個軟盤,並且使用命令”make bzdisk”進行製作。如果你有安裝好的lilo
   與核心檔案相適應的話,命令”make install”也是可以的,但是首先你應該先檢查你的
   特別的lilo步驟。

——————————//!!!這一段的翻譯有問題!!!//———————————————-
   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.
   如果真正要去安裝的話,你必須要有切換到root下,但是正常的構建是不需要那個的。不要起root名字。
————————————————————————————————————

 – 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 <hpa+linux@zytor.com>.
 – 存在一些不太可能的事件,例如你的系統不能啟動bzImage核心但是依然能夠編譯核心為bzImage檔案。 然而儘管在未來zImage支援可能會被移除,但是為了支援bzImage.我們鼓勵人們遇到啟動bzImage問題的時候能夠上傳這些問題,同時上傳具體的硬體配置資訊。將這些資訊以郵件的形式傳送給Peter Anvin <hpa+linux@zytor.com>。

 – If you configured any of the parts of the kernel as `modules`, you
   will have to do “make modules” followed by “make modules_install”.
 – 如果你將核心的一些部分配置成`modules`,你必須使用”make modules”和”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”.
 – 為了防止出現錯誤,一定要對核心進行備份。對一些開發發行版這種做法是尤其正確
   的。因為一些新的發行版包含一些新的程式碼,但這些程式碼可能還沒有被除錯。還要備份一些與核心相對應的模組。如果你安裝一個具有相同版本號的新核心作為你的執行核心,在你使用命令”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.
 – 為了啟動你的新核心,你需要將核心映象(編譯完成後,在目錄…/linux/arch/i386
   /boot/bzImage下面找)複製到可啟動的核心資料夾中。

   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.
   對有些時候,這是在軟盤中,在這種情況下,你可以複製核心bzImage檔案到/dev/fd0下來製作可啟動軟盤。

   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.
   如果你從硬碟中啟動linux,你可能使用LILO啟動,在檔案/etc/lilo.config檔案中
   LILO使用核心映象進行啟動。核心映象檔案通是/vmlinuz,/boot/vmlinuz,/bzImage
 或者是/boot/bzImage.為了使用新的核心,儲存一箇舊映象檔案的副本,並且用新的
   映象檔案覆蓋舊的映象檔案。然後,你一定要重新執行LILO來重新載入核心。如果不
   這樣做的話,你將不能啟動新的核心映象。

   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. 
   重新安裝LILO通常的做法是執行 /sbin/lilo命令。你可能希望便器 /etc/lilo.conf
   檔案來指定一箇舊版核心映象的入口以防止新核心不能執行。檢視LILO檔案來獲取更多的資訊。

   After reinstalling LILO, you should be all set.  Shutdown the system,
   reboot, and enjoy!
   重新安裝LILO之後,你應該重新設定一下。關閉系統,重啟然後愉快的玩耍吧!

   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. 
   如果你需要改變預設的啟動裝置,視訊模式,記憶體磁碟大小等等,在核心映象中,
   使用`rdev`程式(或者是適當的時候使用LILO啟動選項)進行設定。不需要重新編譯
   核心來改變這些引數。

 – Reboot with the new kernel and enjoy. 
   重新啟動新核心然後愉快的玩耍吧。

IF SOMETHING GOES WRONG:
如果出錯了:

 – If you have problems that seem to be due to kernel bugs, please check
   the file MAINTAINERS to see if there is a particular person associated
   with the part of the kernel that you are having trouble with. If there
   isn`t anyone listed there, then the second best thing is to mail
   them to me (torvalds@osdl.org), and possibly to any other relevant
   mailing-list or to the newsgroup.
 – 如果你遇到了一些問題,並且這些問題看上去像是核心bug,請查詢檔案MAINTAINGS來檢視是否有與你所遇到問題的這部分核心相關的人,如果人物列表中沒有,那麼最好的方式就是給我發郵件(torvalds@osdl.org),或者是給其他相關人員傳送郵件。

 – In all bug-reports, *please* tell what kernel you are talking about,
   how to duplicate the problem, and what your setup is (use your common
   sense).  If the problem is new, tell me so, and if the problem is
   old, please try to tell me when you first noticed it.
 – 在所有的上傳的bugs中,請告訴我們你正在討論的是哪一個版本的核心,如何重複
   這個問題,你的安裝程式是什麼(使用你的常識)。如果問題是新的,這樣告訴我。
   如果問題是舊的,請告訴我你什麼時候注意到這個問題的。

 – If the bug results in a message like
 – 如果一個bug導致了像以下類似的訊息

unable to handle kernel paging request at address C0000010
Oops: 0002
EIP:   0010:XXXXXXXX
eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
Pid: xx, process nr: xx
xx xx xx xx xx xx xx xx xx xx
    不能夠在地址 C0000010處處理核心頁請求
    Oops: 0002
EIP:   0010:XXXXXXXX
eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
Pid: xx, process nr: xx
xx xx xx xx xx xx xx xx xx xx

   or similar kernel debugging information on your screen or in your
   system log, please duplicate it *exactly*.  The dump may look
   incomprehensible to you, but it does contain information that may
   help debugging the problem.  The text above the dump is also
   important: it tells something about why the kernel dumped code (in
   the above example it`s due to a bad kernel pointer). More information
   on making sense of the dump is in Documentation/oops-tracing.txt
   或者是在你的螢幕上顯示類似的核心除錯資訊或者是在你的系統日誌中,請確切的重複這些除錯資訊給我們。轉儲對你來說可能不是很理解,但是她確實包含著一些能夠幫助除錯問題的資訊。上述轉儲文字也確實很重要:他告訴我們為什麼核心放棄程式碼(在上述例子中,他是由於錯誤的核心指標導致的)。要想獲取更多的能夠理解轉儲的資訊,請檢視文件 /oops-tracing.txt.
   
 – You can use the “ksymoops” program to make sense of the dump.  This
   utility can be downloaded from
   ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops.
   Alternately you can do the dump lookup by hand:
 – 你可以使用”ksymoops”程式來理解轉儲。這個工具可以從
   ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops
   上下載。你可以親自檢視轉儲資訊。

 – In debugging dumps like the above, it helps enormously if you can
   look up what the EIP value means.  The hex value as such doesn`t help
   me or anybody else very much: it will depend on your particular
   kernel setup.  What you should do is take the hex value from the EIP
   line (ignore the “0010:”), and look it up in the kernel namelist to
   see which kernel function contains the offending address.
 – 像上述方式除錯核心的時候,如果你能夠檢視EIP值代表什麼,那麼他的幫助是巨大
   的。十六進位制值不會幫助我或者是其他任何一個人很多:因為它依賴於你特定的核心
   安裝程式。你應該做的是將十六進位制值從EIP行中(忽略“0010:”)拿出來,在核心
   名字列表中進行查詢什麼核心函式包含這個地址。

   To find out the kernel function name, you`ll need to find the system
   binary associated with the kernel that exhibited the symptom.  This is
   the file `linux/vmlinux`.  To extract the namelist and match it against
   the EIP from the kernel crash, do:

nm vmlinux | sort | less
   為了找到核心函式名字,你需要去查詢顯示該症狀的核心的二進位制檔案。就是檔案”
   linux/vmlinuz”.為了提取姓名列表,並且從崩潰的核心中與EIP向匹配出來,使用
   下面命令:
     nm vmlinuz | sort | less

——————-//!!!這一段也有一些不確定———————————————————-
   This will give you a list of kernel addresses sorted in ascending
   order, from which it is simple to find the function that contains the
   offending address.  Note that the address given by the kernel
   debugging messages will not necessarily match exactly with the
   function addresses (in fact, that is very unlikely), so you can`t
   just `grep` the list: the list will, however, give you the starting
   point of each kernel function, so by looking for the function that
   has a starting address lower than the one you are searching for but
   is followed by a function with a higher address you will find the one
   you want.  In fact, it may be a good idea to include a bit of
   “context” in your problem report, giving a few lines around the
   interesting one. 
   這會給你一個按升序排列的核心地址列表,在這個列表中,找到包含該地址的函式
   是非常簡單的。注意核心除錯資訊給出的地址不必要與該地址精確匹配(事實上,
   這是不可能的),所以你不能僅僅`grep`這個列表:這個列表將會給你每一個核心
   函式的開始指標,所以通過查詢帶有開始地址的函式要比查詢帶有更高地址的函式
   要慢,你將會找到你想要的函式。事實上,在你的問題報告中包含一些”context”
   將會更好一些,你可以給我們一些你感興趣的幾行。
—————————————————————————————————–

   If you for some reason cannot do the above (you have a pre-compiled
   kernel image or similar), telling me as much about your setup as
   possible will help. 
   可能由於某些原因你無法作上述事情(你已經預編譯了核心映象或類似現象),儘可能多的告訴我們一些關於你的安裝程式的資訊也是有幫助的。

 – Alternately, you can use gdb on a running kernel. (read-only; i.e. you
   cannot change values or set break points.) To do this, first compile the
   kernel with -g; edit arch/i386/Makefile appropriately, then do a “make
   clean”. You`ll also need to enable CONFIG_PROC_FS (via “make config”).
 – 除此之後,在執行著的核心中你也可以使用gdb除錯程式。(只讀的;你不能改變值或者是設定斷點。)為了能夠實現除錯,初次編譯核心的時候使用引數 -g;適當的編輯 arch/i386/Makefile檔案,然後使用命令”make clean”.你也需要是CONFIG_PROC_FS可用(通過”make config”)。

   After you`ve rebooted with the new kernel, do “gdb vmlinux /proc/kcore”.
   You can now use all the usual gdb commands. The command to look up the
   point where your system crashed is “l *0xXXXXXXXX”. (Replace the XXXes
   with the EIP value.)
   在你重新啟動新核心之後,使用命令”gdb vmlimuz /proc/kcore”.現在你可以使用所有的常用的gdb命令。在你係統崩潰的地方使用命令”l *0xXXXXXXXX”來檢視指標。(使用EIP值替換掉XXXes)


   gdb`ing a non-running kernel currently fails because gdb (wrongly)
   disregards the starting offset for which the kernel is compiled.
   使用gdb除錯一個當前沒有執行的核心會導致失敗,因為gdb將會忽略核心被編譯之後的
   開始偏移量。



相關文章