您的位置:首页 > Web前端

build a rpm kernel package[reference]

2011-03-30 21:12 232 查看
1. install the essential tools

  command:  su -c 'yum install rpmdevtools yum-utils'

2. Downloading the Kernel

  command:  wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.2.tar.bz2
3. Unpacking the file.

  command:  tar -xjvf linux-2.6.38.2.tar.bz2

4. change in to work directory.

  command:  cd linux-2.6.38.2

5. Preparing the Kernel

  command:  make mrproper

4.Configuring the Kernel

  command:  make config|make menuconfig|make xconfig|make gconfig select one from previous.

5.Creating a RPM

   command:  make help | grep rpm

          The output should be something like : rpm - Build a kernel as an RPM package

            If the output contains rpm , then type:              make rpm
            
If the output contains rpm-pkg or rpm and rpm-pkg, then type:   make rpm-pkg

When it is ready it returns you something like:

Wrote: /usr/src/redhat/SRPMS/kernel-2.6.38.2.src.rpm

Wrote: /usr/src/redhat/RPMS/i386/kernel-2.6.38.2.i386.rpm

6.Installing the kernel

  command:  rpm -ihv /usr/src/redhat/RPMS/i386/kernel-2.6.38.2.i386.rpm

7. Configuring GRUB

  command:  new-kernel-pkg --mkinitrd --depmod --install 2.6.38.2

can be used to configure Grub

8.Final step

reboot your system and choose the new kernel in the grub menu.

write at home Thu Mar31,00:07 AM by Haria
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: