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包 有 32,770 条回应

  1. Hello, I think your website might be having browser compatibility issues. When I look at your blog site in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!| а

    回复
  2. excellent post, very informative. I wonder why the opposite experts of this sector do not realize this. You must continue your writing. I’m confident, you’ve a huge readers’ base already!| а

    回复
  3. purchase Adobe Creative Suite 6 Design Standard software deal website review Autodesk AutoCAD LT 2016 requirements

    回复
  4. [url=http://tadalafil247.com/]buy generic tadalafil online cheap[/url] [url=http://atorvastatinlipitor.com/]lipitor generics[/url] [url=http://kamagraxr.com/]buy generic kamagra[/url] [url=http://propecialab.com/]buy propecia[/url] [url=http://acyclovirzov.com/]acyclovir 400mg tablets[/url]

    回复
  5. is advertisement

    53e7 be is 5mg tablets

    回复
  6. Howdy! [url=http://imitrex-sumatriptan.com/]http://imitrex-sumatriptan.com[/url] – buy imitrex usa excellent site

    回复
  7. [url=https://atorvastatinlipitor.com/]lipitor generic[/url] [url=https://doxycycline360.com/]doxycycline over the counter drug[/url]

    回复
  8. [url=http://albuterolsale.com/]albuterol inhaler no prescription[/url] [url=http://propecialab.com/]where to buy propecia[/url] [url=http://stratteramed.com/]strattera 5mg[/url] [url=http://acyclovirzov.com/]acyclovir 5g[/url] [url=http://clomidpill.com/]clomid otc[/url] [url=http://aqutaneiso.com/]where to buy accutane[/url] [url=http://celebrexcap.com/]celebrex 100 mg[/url]

    回复
  9. buy Autodesk Infrastructure Design Suite Ultimate 2020 online cheap
    windows software download Autodesk Advance Steel 2019

    回复
  10. I am curious to find out what blog system you happen to be using? I’m experiencing some minor security issues with my latest site and I would like to find something more secure. Do you have any suggestions?| а

    回复
  11. [url=http://tretinoinsale.com/]tretinoin gel buy online[/url] [url=http://doxycycline360.com/]doxycycline capsules purchase[/url] [url=http://lexapro10.com/]lexapro generic[/url] [url=http://suhagra2020.com/]buy suhagra 100mg[/url] [url=http://tadalafil247.com/]buy tadalafil[/url] [url=http://metformingluc.com/]metformin 500[/url] [url=http://clomidpill.com/]generic clomid[/url]

    回复
  12. [url=http://kamagraxr.com/]buy genuine kamagra online[/url] [url=http://retinaotc.com/]retin a 0.05[/url] [url=http://indocinmed.com/]indocin pill[/url]

    回复
  13. I blog often and I really thank you for your information. This great article has truly peaked my interest. I’m going to bookmark your website and keep checking for new information about once a week. I subscribed to your Feed as well.| а

    回复
  14. [url=http://clomidpill.com/]clomid where to buy canada[/url]

    回复
  15. Howdy! [url=http://loprozac.info/]http://loprozac.info[/url] – purchase fluoxetine no prescription good site

    回复
  16. [url=http://amoxicillinbio.com/]amoxicillin 125 mg[/url] [url=http://stratteramed.com/]strattera 60[/url] [url=http://aqutaneiso.com/]where to buy accutane online[/url] [url=http://kamagraxr.com/]buy generic kamagra[/url] [url=http://synthroid20.com/]synthroid 137.5[/url] [url=http://cipro360.com/]cipro 500mg[/url] [url=http://propecialab.com/]where to buy generic propecia[/url] [url=http://lisinopriltab.com/]lisinopril 20mg tablets[/url]

    回复
  17. [url=http://amoxicillinbio.com/]amoxicillin 5000mg[/url] [url=http://suhagra2020.com/]buy suhagra 25 mg[/url]

    回复
  18. [url=http://atorvastatinlipitor.com/]buy lipitor with mastercard[/url]

    回复
  19. [url=http://advair1.com/]advair coupon canada[/url] [url=http://zoloftgen.com/]zoloft 200 mg[/url] [url=http://propecialab.com/]buy generic propecia online cheap[/url] [url=http://wellbutrinlab.com/]generic wellbutrin 300[/url] [url=http://kamagraxr.com/]buy kamagra online usa[/url]

    回复
  20. [url=http://aqutaneiso.com/]where to buy accutane[/url] [url=http://amoxicillinbio.com/]amoxicillin 500 mg order online mexico[/url] [url=http://stratteramed.com/]strattera generic[/url] [url=http://diflucanmed.com/]buy diflucan[/url] [url=http://cipro360.com/]cipro 750[/url] [url=http://zoloftgen.com/]zoloft 300 mg[/url] [url=http://synthroid20.com/]synthroid generic[/url] [url=http://albendazoleotc.com/]albendazole tablet[/url]

    回复

Leslietoone进行回复 取消回复

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