LSX-blog

Feed Rss

【原创】打包内核为RPM包

05.31.2015, Linux, by .

下载内核包

1
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.7.tar.gz

安装依赖包

1
yum install gcc rpm-build redhat-rpm-config ncurses-devel patchutils bc xmlto asciidoc elfutils-libelf-devel zlib-devel binutils-devel newt-devel python-devel perl-ExtUtils-Embed hmaccalc kernel-firmware -y

解压内核压缩包

1
tar zxvf linux-3.16.7.tar.gz

复制本机内核配置到新内核目录

1
2
cd linux-3.16.7
cp /boot/config-2.6.32-504.8.1.el6.x86_64 .config

增加内核安装后默认启动

1
2
cd linux-3.16.7
vim scripts/package/mkspec

在%post最后面增加如下行

1
echo "/sbin/grubby --set-default 0"

在%post段后面添加%preun段

1
2
3
echo "%preun"
echo "new-kernel-pkg --rminitrd --rmmoddep --remove $KERNELRELEASE"
echo ""

简单设置config

1
make menuconfig

General setup —> Local version – append to kernel release
输入
.el6.x86_64
保存
创建RPM包
make rpm-pkg

等待完成
~/rpmbuild/RPMS/x86_64 即可看到。

【原创】打包内核为RPM包 有 21,948 条回应

  1. viagraprobeprobe paypal

    回复
  2. viagra online kaufende

    回复
  3. viagra pricelist

    回复
  4. buy maestro viagra

    回复
  5. viagra compresse posologi

    回复
  6. viagra in toronto office

    回复
  7. su pillola viagra

    回复
  8. does rush limbaugh use is

    回复
  9. is in toronto office

    回复
  10. can heart patition take viagra

    回复
  11. herbal alternative viagra to

    回复
  12. viagra gnrique inde

    回复
  13. at is on a plane

    回复
  14. free is on line to be

    回复
  15. viagra e cialis onlin

    回复
  16. i recommend cheap viagra

    回复
  17. viagra purchase in uk

    回复
  18. viagra online rosario

    回复
  19. levitra 20 mg o viagra

    回复
  20. is piller online

    回复
  21. something better than is

    回复
  22. phone in order for viagra plus

    回复
  23. viagra plus for discount

    回复
  24. at suppliers be is

    回复
  25. viagra kaufen apothek

    回复
  26. online viagra in india

    回复
  27. generic viagra on a plane

    回复
  28. order is in singapore

    回复
  29. viagra dosage men

    回复
  30. billige viagra online apotheke

    回复
  31. viagra without a doctor

    回复
  32. free viagra on line to buy

    回复
  33. order viagra online dk

    回复
  34. irlanda is barata

    回复
  35. symptoms of overdose in viagra

    回复
  36. herbal alternative is to

    回复
  37. where to buy herbal viagra

    回复
  38. can heart patition take is

    回复
  39. wirkstoff viagra beipackzettel

    回复
  40. is viagra legal in malaysia

    回复
  41. order viagra in singapore

    回复
  42. viagracom prices

    回复
  43. only now bio viagra herbal

    回复
  44. is for men and canadian

    fe25 is one a day

    回复
  45. is en colombia

    05d6 is tablets online

    回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注