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包 有 82,369 条回应

  1. What a material of un-ambiguity and preserveness of precious experience concerning
    unexpected feelings.

    回复
  2. [url=https://proscar.us.com/]order proscar online uk[/url]

    回复
  3. Hi this is kinda of off topic but I was wanting to
    know if blogs use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding experience so I wanted to get guidance from someone
    with experience. Any help would be greatly appreciated!

    回复
  4. Nicely put. Kudos. [url=https://ciaonlinebuyntx.com/]Most Effective Dose Of Cialis[/url]
    [url=http://www.baperwiljember.jatimprov.go.id/pengumuman-hari-berkabung-nasional.html]c51gpxb p45lyn[/url] 5c2ba64

    回复
  5. [url=https://domperidone.us.com/]domperidone[/url] [url=https://motrin.us.com/]prescription motrin[/url] [url=https://hydroxychlorothiazide.com/]lisinopril hydrochlorothiazide[/url]

    回复
  6. fantastic submit, very informative. I ponder why the opposite experts of this sector
    don’t realize this. You should proceed your writing.
    I’m sure, you have a huge readers’ base already!

    回复
  7. This is nicely said! . [url=https://viaonlinebuyntx.com/]viagra without a doctor prescription[/url]
    [url=http://christmas.regenbogenwiese.net/index.php?guestbook-entry/4052847-k904oah-b15ffs/]k904oah b15ffs[/url] 7c03fc1

    回复
  8. [url=http://prednisolone.us.org/]prednisolone online[/url] [url=http://hydroxychlorothiazide.com/]hydrochlorothiazide 25mg[/url] [url=http://metformin.us.org/]metformin 800 mg[/url] [url=http://zovirax.us.com/]zovirax 800 mg[/url] [url=http://trazodonesale.com/]trazodone 300 mg capsule[/url] [url=http://wellbutrin.us.org/]buy brand wellbutrin[/url] [url=http://cialisprice.us.org/]cialis price[/url] [url=http://priligy.us.com/]buy priligy tablets[/url]

    回复
  9. [url=https://cephalexin365.com/]cephalexin tablets 250 mg[/url] [url=https://hydroxychlorothiazide.com/]hydrochlorothiazide 12.5 mg tablets[/url]

    回复
  10. [url=https://hydroxychloroquinecv.com/]hydroxychloroquine buy[/url] [url=https://hydroxychloroquine.us.com/]hydroxychloroquine-o-sulfate[/url] [url=https://zovirax.us.com/]buy zovirax[/url] [url=https://bupropion365.com/]bupropion hcl 150mg[/url] [url=https://cialisprice.us.org/]cialis capsules price[/url]

    回复
  11. [url=https://hydroxychloroquine.us.com/]buy hydroxychloroquine[/url]

    回复
  12. Today, I went to the beach with my children. I found a sea shell and gave it
    to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.

    There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is entirely off
    topic but I had to tell someone!

    回复
  13. Amazing write ups. With thanks. [url=https://viagradocker.com/]generic viagra 100mg[/url]
    [url=http://rcro56.ru/forum/viewtopic.php?pid=215044#p215044]o82fmo6 j38ncx[/url] 1_19416

    回复
  14. Nicely expressed without a doubt! ! [url=https://viagrapython.com/]viagra 100mg[/url]
    [url=http://www.sickautos.com/?q=node/30&page=109#comment-9146]f59fsor o631tp[/url] c1a0ab3

    回复

www.asanmassage.icu进行回复 取消回复

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