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包 有 83,025 条回应

  1. You said it adequately.. [url=https://viaonlinebuyntx.com/]viagra pills 100 mg walmart[/url]
    [url=http://littlebikers.messageboard.nl/forum/viewtopic.php?f=2&t=1025767]h699gam e93glp[/url] 9e1e8_f

    回复
  2. [url=http://malegra.us.org/]malegra dxt[/url]

    回复
  3. [url=http://trazodonesale.com/]trazodone 100mg australia[/url] [url=http://wellbutrin.us.org/]wellbutrin 151 pill[/url] [url=http://azithromycin.us.org/]azithromycin 39 tablets[/url] [url=http://amitriptyline24.com/]amitriptyline pills[/url] [url=http://tamoxifenpct.com/]tamoxifen price[/url] [url=http://flomax.us.com/]flomax generic[/url] [url=http://zovirax.us.com/]zovirax cost[/url] [url=http://lipitor.us.org/]buy lipitor online australia[/url]

    回复
  4. Many thanks. Loads of facts!
    [url=https://paydayloansttf.com/]loans online for bad credit[/url]
    [url=http://www.rstc.co.id/berita-534-.uasi-ppk-blu-di-rstc.html]z64yiva m60fqf[/url] a6415f1

    回复
  5. Whoa tons of fantastic info! [url=https://paperwritingservicestop.com/]paper writing services[/url]
    [url=http://littlebikers.messageboard.nl/forum/viewtopic.php?f=2&t=1038118]n80spg4 j412pn[/url] 4_308aa

    回复
  6. Thanks for sharing your info. I truly appreciate your
    efforts and I will be waiting for your further post thanks
    once again.

    回复
  7. [url=http://zovirax.us.com/]zovirax tablets[/url] [url=http://flomax.us.com/]flomax otc in usa[/url] [url=http://retina.us.org/]where to buy retin a cream in singapore[/url]

    回复
  8. [url=https://duloxetine.us.com/]buy cymbalta online from canada[/url] [url=https://attarax.com/]buy atarax[/url] [url=https://hydroxychloroquine.us.com/]buy hydroxychloroquine 200 mg[/url] [url=https://trazodonesale.com/]trazodone 50 mg tablet[/url] [url=https://cialisprice.us.org/]cialis 5 mg price in usa[/url] [url=https://bupropion365.com/]bupropion 150 mg coupon[/url] [url=https://prazosin.us.com/]prazosin cost[/url]

    回复
  9. Great knowledge. Thanks. [url=https://viagradocker.com/]viagra for sale uk[/url]
    [url=http://oksana-mukha.com.ua/15/#comment435125]m13poyj b724nb[/url] fc1a0ab

    回复
  10. I do accept as true with all the ideas you’ve presented on your post.
    They are really convincing and will definitely work.

    Still, the posts are too quick for novices.
    Could you please extend them a bit from
    next time? Thank you for the post.

    回复
  11. You said it perfectly.. [url=https://canadianpharmaceuticalsonlinerx.com/]canada pharmacy online[/url]
    [url=https://www.tankerderbanker.dk/blog/en-tro-folgesvend-og-uven-i-noden-2019-03-20?page=24867#comment-1349212]c16mpbx y41sfj[/url] 27c03fc

    回复
  12. [url=https://tamoxifenpct.com/]buy tamoxifen[/url] [url=https://flomax.us.com/]buy flomax[/url] [url=https://prazosin.us.com/]prazosin drug[/url]

    回复
  13. [url=http://prednisolone.us.org/]prednisolone online[/url] [url=http://attarax.com/]atarax 50 mg tablet[/url]

    回复
  14. Really lots of fantastic advice. [url=https://ciaonlinebuyntx.com/]cialis tablets[/url]
    [url=https://www.tankerderbanker.dk/blog/en-tro-folgesvend-og-uven-i-noden-2019-03-20?page=24935#comment-1353183]r89hbbg d39mzd[/url] 15f19e1

    回复
  15. Beneficial tips. Thank you! [url=https://canadianpharmacyntv.com/]canadian pharmacy online canada[/url]
    [url=http://www.lakecountyoffroad.org/LCOR_FORUM/viewtopic.php?f=32&t=542372]j51qzpm i34pod[/url] 19e1e3_

    回复
  16. Whoa a lot of superb advice. [url=https://paydayloansttf.com/]no credit check payday loans instant approval[/url]
    [url=https://www.ninoulabelle.com/product/eyelash-glue/#comment-30137]k95gjgr h96ekt[/url] 7c03fc1

    回复
  17. [url=https://hydroxychlorothiazide.com/]buy hydrochlorothiazide[/url] [url=https://hydroxychloroquine.us.com/]hydroxychloroquine sulfate[/url] [url=https://lipitor.us.org/]lipitor 20mg[/url] [url=https://amitriptyline24.com/]amitriptyline brand name 10mg[/url] [url=https://tamoxifenpct.com/]tamoxifen generic[/url] [url=https://ivermectin.us.org/]ivermectin 4000[/url] [url=https://metformin.us.org/]metformin[/url] [url=https://prazosin.us.com/]buy prazosin[/url] [url=https://zovirax.us.com/]where can i buy zovirax cream[/url] [url=https://azithromycin.us.org/]buy azithromycin[/url]

    回复
  18. What’s up to every one, the contents present at this web
    page are really remarkable for people experience, well, keep
    up the nice work fellows.

    回复
  19. [url=https://bupropion365.com/]bupropion 150 mg tablet[/url]

    回复
  20. Reliable facts. Regards! [url=https://essaywriting4you.com/]write a narrative essay[/url]
    [url=https://m.hyhouse.com/forum/forum.php?mod=viewthread&tid=1386823&pid=19298955&page=15&extra=#pid19298955]w83srpg j64uqe[/url] 415f19e

    回复
  21. Effectively expressed indeed! . [url=https://ciaonlinebuyntx.com/]Why Is Cialis Not Working Anymore[/url]
    [url=http://hbcontract.com/shop/contract-furniture/chest-of-drawers/#comment-495814]t582rd6 g13fcd[/url] c1a0ab3

    回复

MichaelCen进行回复 取消回复

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