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,970 条回应

  1. Helpful forum posts. With thanks! [url=https://viaonlinebuymsn.com/]viagra without a doctor prescription price[/url] [url=https://viaonlinebuyntx.com/]canadian pharmacies without an rx[/url] [url=https://canadianpharmacyopen.com/]canada pharmacy online[/url]

    回复
  2. zha [url=https://cbd-oil11.com/#]cbd oil in canada[/url]
    lbl [url=https://cbd-oil11.com/#]cbd hemp oil walmart[/url]

    回复
  3. krkssk yami vapor icy trio lgczby mods uk

    回复
  4. qdh [url=https://cbd-oil11.com/#]cbd oil in canada[/url]

    回复
  5. You reported it effectively. [url=https://canadianpharmacycom.com/]canada pharmacies online prescriptions[/url]

    回复
  6. wdg [url=https://cbdoil51.com/#]cbd oil prices[/url] uvr [url=https://cbdoil51.com/#]pure cbd oil[/url]
    iom [url=https://cbdoil51.com/#]best cbd oil for pain[/url]

    回复
  7. xnq [url=https://cbdoil51.com/#]buy cbd[/url]

    回复
  8. [url=http://tetracycline0l1.com]tetracycline to treat seroma [/url]

    回复
  9. [url=http://cialis500.com/]cialis 20mg coupon[/url] [url=http://tretinoin24.com/]tretinoin cream where to buy uk[/url] [url=http://retina100.com/]retin a 005[/url] [url=http://tadalafil8.com/]cialis tadalafil[/url] [url=http://viagra250.com/]buy cheap viagra[/url] [url=http://sildenafil10.com/]sildenafil in india[/url] [url=http://prednisone100.com/]cheap generic prednisone[/url]

    回复
  10. zla [url=https://cbdoil51.com/#]buy cbd oil[/url]
    inf [url=https://cbdoil51.com/#]optivida hemp oil[/url]

    回复
  11. [url=http://colchicine100.com/]price colchicine 0.6 mg[/url] [url=http://metformin365.com/]can i buy metformin over the counter in canada[/url] [url=http://sildenafil30.com/]sildenafil 100 mexico[/url] [url=http://allopurinol24.com/]buy allopurinol[/url]

    回复
  12. [url=https://prednisone100.com/]prednisone prescription cost[/url] [url=https://tretinoin24.com/]tretinoin cream[/url] [url=https://tadalafil8.com/]tadalafil 20 mg[/url] [url=https://buspar1.com/]buspar 15 mg[/url] [url=https://atenolol911.com/]atenolol otc[/url]

    回复
  13. wbu [url=https://cbdoil33.com/#]hemp oil benefits[/url] eyi [url=https://cbdoil33.com/#]buy cbd new york[/url]
    egk [url=https://cbdoil33.com/#]cbd oil for sale[/url]

    回复
  14. [url=http://motilium2019.com/]motilium[/url] [url=http://sildenafil10.com/]sildenafil 50mg canada[/url] [url=http://tadalafil8.com/]tadalafil 20mg lowest price[/url] [url=http://prednisone100.com/]prednisone 10 mg price[/url] [url=http://buspar1.com/]buspar generic[/url]

    回复
  15. [url=http://sildenafil30.com/]sildenafil[/url] [url=http://colchicine100.com/]cheapest colchicine generic no prescription[/url] [url=http://metformin365.com/]metformin[/url] [url=http://doxycycline3.com/]medication doxycycline 100mg[/url]

    回复
  16. wos [url=https://cbdoil33.com/#]cbd oil side effects[/url]

    回复
  17. [url=http://tadalafilf5h.com/]tadalafil generic[/url] [url=http://lisinoprild6j.com/]lisinopril generic[/url] [url=http://cialiso0o.com/]cialis buy[/url] [url=http://sildenafilg8.com/]buy sildenafil[/url] [url=http://cialiso0.com/]cialis online[/url]

    回复
  18. [url=http://motilium2019.com/]buy motilium uk[/url] [url=http://atenolol911.com/]atenolol 50 mg online[/url] [url=http://tadalafil8.com/]tadalafil 20 mg[/url] [url=http://retina100.com/]retin a[/url] [url=http://viagra250.com/]cheap canadian generic viagra[/url]

    回复
  19. rgsezv french dude gjkjga vaporizer store uk

    回复
  20. [url=https://sildenafil10.com/]sildenafil prescription uk[/url] [url=https://viagra250.com/]cheap viagra online[/url] [url=https://prednisone100.com/]medicine prednisone 5mg[/url] [url=https://atenolol911.com/]atenolol[/url] [url=https://cialis500.com/]cialis coupon[/url]

    回复

MichaelCen进行回复 取消回复

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