build a rpm kernel package[reference]

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

转载于:https://www.cnblogs.com/haria/archive/2011/03/30/kernel_rpm.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值