关于内核的readme文件解读

来源:互联网 发布:淘宝用假单号骗货 编辑:程序博客网 时间:2024/06/05 01:57

 1、如何安装内核

 1.1 下载并解压内核:

  gzip -cd linux-2.6.XX.tar.gz | tar xvf -

   or
  bzip2 -dc linux-2.6.XX.tar.bz2 | tar xvf -

   or

  tar jvfx linux-2.6.XX.tar.bz2

  打补丁

    gzip -cd ../patch-2.6.xx.gz | patch -p1

   or
   bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1

1.2 内核编译的软件要求:

  请参内核源码Documentation/Changes文件,Current Minimal Requirements

o  Gnu C                  3.2                     # gcc --version
o  Gnu make               3.79.1                  # make --version
o  binutils               2.12                    # ld -v
o  util-linux             2.10o                   # fdformat --version
o  module-init-tools      0.9.10                  # depmod -V
o  e2fsprogs              1.29                    # tune2fs
o  jfsutils               1.1.3                   # fsck.jfs -V
o  reiserfsprogs          3.6.3                   # reiserfsck -V 2>&1|grep reiserfsprogs
o  xfsprogs               2.6.0                   # xfs_db -V
o  pcmciautils            004                     # pccardctl -V
o  quota-tools            3.09                    # quota -V
o  PPP                    2.4.0                   # pppd --version
o  isdn4k-utils           3.1pre1                 # isdnctrl 2>&1|grep version
o  nfs-utils              1.0.5                   # showmount --version
o  procps                 3.2.0                   # ps --version
o  oprofile               0.9                     # oprofiled --version
o  udev                   081                     # udevinfo -V
o  grub                   0.93                    # grub --version

1.3 内核编译时输出目录指定:

 内核编译时默认输出文件(如生成的.o文件)和源码在同目录,可单独指定生成文件的目录。

   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.

1.4 配置内核(CONFIGURING the kernel):

 "make config"      Plain text interface.
 "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 and asking about
      new config symbols.
 "make defconfig"   Create a ./.config file by using the default
      symbol values from arch/$ARCH/defconfig.
 "make allyesconfig"
      Create a ./.config file by setting symbol
      values to 'y' as much as possible.
 "make allmodconfig"
      Create a ./.config file by setting symbol
      values to 'm' as much as possible.
 "make allnoconfig" Create a ./.config file by setting symbol
      values to 'n' as much as possible.

  对于allyesconfig/allmodconfig/allnoconfig/randconfig变量可使用linux的KCONFIG_ALLCONFIG

环境变量指定配置文件名,如KCONFIG_ALLCONFIG=allyesconfig,如果没指定,make将依次检查all

{yes/mod/no/random}.config文件,若这些文件都不存在,all.config文件将被指定。

1.5编译内核

    make install

    make modules_install

   

 

 2、有问题如何办

   查看内核源码文件中的MAINTAINERS文件,找到内核维护者相关信息,项目人邮件地址、列表或项目网址。

 

原创粉丝点击