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包 有 3,039 条回应

  1. jej [url=https://cbdoil50.com/#]cbd[/url]
    ohb [url=https://cbdoil50.com/#]what is cbd oil[/url]

    回复
  2. tkn [url=https://onlinecasinosww.com/#]vegas world free games online slots[/url] vbf [url=https://onlinecasinosww.com/#]free online casino[/url]
    cqq [url=https://onlinecasinosww.com/#]vegas world free games[/url]

    回复
  3. evy [url=https://casinogameww.com/#]doubledown casino bonus collector[/url] pot [url=https://casinogameww.com/#]100 no deposit bonus codes[/url]
    jmi [url=https://casinogameww.com/#]parx casino online[/url]

    回复
  4. jgy [url=https://onlinecasinoww.com/#]high 5 casino[/url] mky [url=https://onlinecasinoww.com/#]free video slots[/url]

    回复
  5. rxy [url=https://buycbdoil20.com/#]best cbd oil[/url]

    回复
  6. edx [url=https://buycbdoil20.com/#]charlottes web cbd oil[/url]

    回复
  7. btf [url=https://freecasinoww.com/#]cleopatra slots[/url] bin [url=https://freecasinoww.com/#]free casino slot games[/url]
    xke [url=https://freecasinoww.com/#]slot machines[/url]

    回复
  8. xwg [url=https://casinogameww.com/#]online casino no deposit free welcome bonus[/url]

    回复
  9. dnl [url=https://buycbdoil10.com/#]hemp oil[/url]

    回复
  10. wpt [url=https://freecasinoww.com/#]free penny slots[/url]

    回复
  11. erp [url=https://cbdoil50.com/#]side effects of hemp oil[/url]

    回复
  12. uns [url=https://buycbdoil30.com/#]what is hemp oil[/url]
    cmo [url=https://buycbdoil30.com/#]buy cbd[/url]

    回复
  13. idd [url=https://buycbdoil10.com/#]buy cbd usa[/url]
    ndf [url=https://buycbdoil10.com/#]cbd oil at walmart[/url]

    回复
  14. hvh [url=https://onlinecasinoww.com/#]charlestown races and slots[/url] kti [url=https://onlinecasinoww.com/#]all free casino slots games[/url]
    uil [url=https://onlinecasinoww.com/#]free slots no download no registration zeus[/url]

    回复
  15. zqj [url=https://onlinecasinosww.com/#]bovada casino[/url] oaj [url=https://onlinecasinosww.com/#]lady luck online casino[/url]

    回复
  16. zkz [url=https://casinogameww.com/#]house of fun free slots[/url]
    tiv [url=https://casinogameww.com/#]virgin online casino[/url]

    回复
  17. dcx [url=https://buycbdoil20.com/#]charlottes web cbd oil[/url]
    bvy [url=https://buycbdoil20.com/#]hemp oil cbd[/url]

    回复
  18. spv [url=https://buycbdoil30.com/#]cbd oil online[/url]
    npd [url=https://buycbdoil30.com/#]cbd oil[/url]

    回复
  19. wbw [url=https://buycbdoil30.com/#]cbd oil price[/url]

    回复
  20. jej [url=https://cbd-oil10.com/#]cbd oil online[/url]
    yjc [url=https://cbd-oil10.com/#]side effects of hemp oil[/url]

    回复
  21. bnm [url=https://buycbdoil30.com/#]green roads cbd oil[/url]

    回复
  22. uyr [url=https://casinogameww.com/#]free online slots[/url]

    回复
  23. fyj [url=https://buycbdoil20.com/#]cbd oil side effects[/url]
    ogm [url=https://buycbdoil20.com/#]healthy hemp oil[/url]

    回复
  24. aux [url=https://cbd-oil10.com/#]what is hemp oil[/url]
    fxx [url=https://cbd-oil10.com/#]benefits of cbd oil[/url]

    回复
  25. raf [url=https://buycbdoil30.com/#]hemp oil vs cbd oil[/url]
    wzd [url=https://buycbdoil30.com/#]cbd oil dosage[/url]

    回复
  26. czp [url=https://onlinecasinoww.com/#]caesars slots free casino[/url] mig [url=https://onlinecasinoww.com/#]play free slot machines with bonus spins[/url]

    回复
  27. ffn [url=https://cbd-oil10.com/#]buy cbd new york[/url]

    回复
  28. gmc [url=https://buycbdoil20.com/#]buy cbd[/url]

    回复
  29. mgb [url=https://buycbdoil20.com/#]organic hemp oil[/url]

    回复
  30. qtu [url=https://buycbdoil10.com/#]cbd hemp oil[/url]

    回复
  31. jej [url=https://onlinecasinosww.com/#]slot games with bonus spins[/url]

    回复
  32. qqi [url=https://onlinecasinosww.com/#]best online slots[/url]

    回复
  33. sfx [url=https://buycbdoil10.com/#]cbd oil[/url]
    ako [url=https://buycbdoil10.com/#]cbd oil dosage[/url]

    回复
  34. ycz [url=https://buycbdoil30.com/#]cbd oil for sale[/url]
    wtw [url=https://buycbdoil30.com/#]hemp oil for dogs[/url]

    回复
  35. cxl [url=https://buycbdoil30.com/#]cbd oil cost[/url]

    回复
  36. thv [url=https://onlinecasinoww.com/#]vegas slots[/url] lff [url=https://onlinecasinoww.com/#]zone online casino bingo games[/url]
    afx [url=https://onlinecasinoww.com/#]free slots no download no registration zeus[/url]

    回复
  37. zkv [url=https://cbdoil50.com/#]cbd oil for pain[/url]

    回复
  38. uwd [url=https://freecasinoww.com/#]slotomania slot machines[/url] aut [url=https://freecasinoww.com/#]caesars slots[/url]
    urs [url=https://freecasinoww.com/#]cafe casino online[/url]

    回复
  39. rmk [url=https://freecasinoww.com/#]caesars online casino[/url]

    回复
  40. mkq [url=https://buycbdoil10.com/#]buy cbd new york[/url]

    回复
  41. pom [url=https://cbdoil50.com/#]best hemp oil[/url]
    eqc [url=https://cbdoil50.com/#]benefits of cbd oil[/url]

    回复
  42. fpy [url=https://onlinecasinosww.com/#]vegas slots[/url] pdm [url=https://onlinecasinosww.com/#]indian casinos near me[/url]
    wjk [url=https://onlinecasinosww.com/#]100 most popular free slots[/url]

    回复
  43. dyv [url=https://casinogameww.com/#]caesars free slots[/url] bmz [url=https://casinogameww.com/#]play free for real money[/url]
    zci [url=https://casinogameww.com/#]free full casino games download[/url]

    回复
  44. bmp [url=https://buycbdoil20.com/#]hemp oil for pain[/url]
    oyg [url=https://buycbdoil20.com/#]cbd oil uk[/url]

    回复
  45. dwe [url=https://casinogameww.com/#]free 777 slots no download[/url]

    回复
  46. eux [url=https://cbdoil50.com/#]optivida hemp oil[/url]
    amv [url=https://cbdoil50.com/#]benefits of hemp oil[/url]

    回复
  47. zse [url=https://buycbdoil30.com/#]cbd oil benefits[/url]

    回复
  48. ngm [url=https://buycbdoil10.com/#]strongest cbd oil for sale[/url]
    dgb [url=https://buycbdoil10.com/#]cbd hemp[/url]

    回复
  49. wnb [url=https://onlinecasinoww.com/#]sizzling 777 slots free online[/url]

    回复
  50. cae [url=https://cbdoil50.com/#]hemp oil benefits[/url]

    回复

发表评论

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