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包 有 22,080 条回应

  1. [url=https://buspar1.com/]buspar prescription[/url]

    回复
  2. [url=https://tadalafil8.com/]best tadalafil brand[/url]

    回复
  3. [url=http://viagra204.com/]cheap viagra[/url] [url=http://ventolin1s1.com/]cheap ventolin[/url] [url=http://tadalafil000.com/]tadalafil online[/url] [url=http://viagrad6j.com/]generic viagra[/url]

    回复
  4. [url=https://buspar1.com/]buspar medication[/url] [url=https://viagra250.com/]generic prescription viagra[/url] [url=https://cialis500.com/]generic cialis 20 mg from india[/url] [url=https://prednisone100.com/]prednisone 10 mg tablet[/url] [url=https://tretinoin24.com/]tretinoin from canada[/url]

    回复
  5. [url=http://allopurinol24.com/]buy allopurinol 300 mg online uk[/url] [url=http://metformin365.com/]metformin 1000[/url] [url=http://sildenafil30.com/]sildenafil 100mg[/url]

    回复
  6. [url=https://cialis500.com/]cialis coupon 20mg[/url]

    回复
  7. [url=http://lisinoprild7k.com/]lisinopril buy[/url]

    回复
  8. [url=https://retina100.com/]best price for retin a[/url]

    回复
  9. [url=https://cialis500.com/]generic cialis 5mg australia[/url] [url=https://motilium2019.com/]buy motilium uk[/url] [url=https://prednisone100.com/]buy prednisone[/url] [url=https://retina100.com/]25 retin a[/url] [url=https://viagra250.com/]generic viagra pills cheap[/url]

    回复
  10. [url=http://albuterold7l.com/]buy albuterol[/url] [url=http://synthroidd6j.com/]synthroid[/url] [url=http://acyclovird6j.com/]buy generic acyclovir[/url] [url=http://synthroid0i0.com/]buy generic synthroid[/url] [url=http://lasix0i0.com/]buy lasix online[/url] [url=http://allopurinol0i0.com/]buy allopurinol[/url] [url=http://prednisonef5h.com/]prednisone generic[/url] [url=http://prozacf5h.com/]cheap prozac[/url]

    回复
  11. [url=http://valtrexd7k.com/]buy generic valtrex[/url] [url=http://propecia0i0.com/]cheap propecia[/url] [url=http://lexaprof5h.com/]buy lexapro[/url] [url=http://cephalexin0i0.com/]buy cephalexin[/url]

    回复
  12. ydc [url=https://cbdoil33.com/#]cbd oil side effects[/url] hzd [url=https://cbdoil33.com/#]cbd oil benefits[/url]
    spp [url=https://cbdoil33.com/#]hemp oil side effects[/url]

    回复
  13. vpcvcq uk vaping xjhoot smok mods

    回复
  14. [url=http://tretinoin24.com/]tretinoin cream prescription[/url] [url=http://tadalafil8.com/]tadalafil 20mg lowest price[/url] [url=http://cialis500.com/]cialis generic brand[/url] [url=http://viagra250.com/]cheap viagra[/url] [url=http://buspar1.com/]buspar cost[/url]

    回复
  15. [url=https://colchicine100.com/]colchicine cancer[/url] [url=https://metformin365.com/]metformin 1000[/url] [url=https://sildenafil30.com/]sildenafil soft tabs[/url] [url=https://doxycycline3.com/]doxycycline uk[/url] [url=https://allopurinol24.com/]drug allopurinol 300 mg[/url]

    回复
  16. [url=http://propecia1s1.com/]buy propecia online[/url]

    回复
  17. [url=http://propeciaby6.com/]buy propecia[/url] [url=http://retinad6j.com/]retin-a[/url] [url=http://sildenafild6j.com/]sildenafil generic[/url] [url=http://prednisoloned7k.com/]buy prednisolone[/url] [url=http://prednisoneby6.com/]prednisone online[/url] [url=http://viagrad7l.com/]buy viagra[/url] [url=http://amoxicillinf5h.com/]amoxicillin generic[/url]

    回复
  18. yga [url=https://cbd-oil11.com/#]benefits of cbd oil[/url]
    chi [url=https://cbd-oil11.com/#]zilis cbd oil[/url]

    回复
  19. cic [url=https://cbdhempoil2020.com/#]buy cbd[/url]

    回复
  20. [url=http://prozacd7k.com/]cheap prozac[/url] [url=http://tadalafil000.com/]tadalafil buy[/url] [url=http://kamagra0i0.com/]kamagra[/url]

    回复
  21. bun [url=https://cbdoil33.com/#]benefits of hemp oil[/url]

    回复
  22. [url=http://albuterol1s1.com/]albuterol generic[/url] [url=http://metformind6j.com/]buy metformin[/url] [url=http://prednisolonegenericbuy.com/]generic prednisolone[/url] [url=http://tadalafilb4.com/]generic tadalafil[/url] [url=http://cialis0i0.com/]cheap cialis[/url] [url=http://propeciaf5h.com/]generic propecia[/url] [url=http://valtrexd6j.com/]valtrex generic[/url]

    回复
  23. Hello, good site reputable canadian online pharmacy

    回复
  24. [url=https://atenolol911.com/]atenolol[/url] [url=https://tadalafil8.com/]buy tadalafil 20[/url] [url=https://sildenafil10.com/]sildenafil 50 mg tablet[/url] [url=https://motilium2019.com/]motilium price australia[/url] [url=https://tretinoin24.com/]tretinoin cream buy online nz[/url]

    回复
  25. [url=https://sildenafil10.com/]sildenafil coupon[/url] [url=https://atenolol911.com/]buy 100 mg atenolol brand name[/url] [url=https://retina100.com/]retin a 025[/url] [url=https://tadalafil8.com/]tadalafil india price[/url] [url=https://buspar1.com/]buspar australia[/url]

    回复
  26. bqq [url=https://cbdhempoil2020.com/#]what is hemp oil[/url] anb [url=https://cbdhempoil2020.com/#]hemp oil for dogs[/url]
    wem [url=https://cbdhempoil2020.com/#]pure cbd oil[/url]

    回复
  27. [url=http://tadalafilly6.com/]buy tadalafil online[/url] [url=http://tetracycline0i0.com/]tetracycline online[/url] [url=http://cialisby6.com/]cheap cialis[/url] [url=http://tadalafild6j.com/]tadalafil online[/url] [url=http://prozac1s1.com/]generic prozac[/url] [url=http://baclofen0i0.com/]baclofen buy[/url] [url=http://prozaca4.com/]buy prozac online[/url]

    回复
  28. [url=http://tadalafil8.com/]tadalafil 20mg coupon[/url] [url=http://cialis500.com/]cialis coupon[/url] [url=http://sildenafil10.com/]sildenafil 50mg canada[/url] [url=http://retina100.com/]retin a[/url] [url=http://buspar1.com/]buspar cost[/url]

    回复
  29. [url=http://prednisone100.com/]prednisone 10mg[/url]

    回复
  30. [url=http://kamagra1s1.com/]kamagra buy[/url] [url=http://retinad6j.com/]buy generic retin-a[/url] [url=http://baclofen0i0.com/]baclofen[/url]

    回复

MedeEmuse进行回复 取消回复

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