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包 有 103,615 条回应

  1. [url=https://motilium10mg.com/]generic motilium[/url] [url=https://advair2019.com/]advair diskus 0.25 mg[/url] [url=https://vermox100.com/]buy vermox over the counter uk[/url] [url=https://viagra2019.com/]viagra pharmacy coupon[/url] [url=https://clonidinenorx.com/]025 mg clonidine[/url] [url=https://priligydapoxetin.com/]dapoxetine drug[/url] [url=https://kamagra911.com/]compare prices kamagra[/url]

    回复
  2. [url=https://lasixwtp.com/]buy lasix cheap[/url] [url=https://inderal.us.com/]inderal tab[/url] [url=https://amoxicillinab.com/]purchase amoxicillin[/url] [url=https://acyclovirzov.com/]medication acyclovir cream[/url] [url=https://finpecia911.com/]finpecia without prescription[/url]

    回复
  3. [url=http://fluoxetinetb.com/]fluoxetine 20mg capsules[/url] [url=http://finasteridealop.com/]online pharmacy finasteride 1mg[/url] [url=http://sildenafilv.com/]sildenafil discount prices[/url] [url=http://levitratab.com/]levitra pharmacy[/url] [url=http://ventolin24.com/]generic ventolin price[/url]

    回复
  4. Having read this I thought it was rather informative. I appreciate you taking the time and energy to put this short article together.
    I once again find myself personally spending a significant amount of time both
    reading and leaving comments. But so what, it was still worth it!

    回复
  5. Have you ever considered about adding a little bit more
    than just your articles? I mean, what you say is fundamental
    and everything. But just imagine if you added some great photos or videos to give
    your posts more, “pop”! Your content is excellent but with
    pics and clips, this website could definitely be one of the best in its niche.
    Fantastic blog!

    回复
  6. Los usuarios de Energy BI tienen más opciones.

    回复
  7. [url=http://lexaporo.com/]lexapro pharmacy[/url]

    回复
  8. Hello to every , as I am in fact keen of reading
    this blog’s post to be updated daily. It consists of pleasant data.

    回复
  9. I am sure this article has touched all the internet people, its really really pleasant paragraph on building up new website.

    回复
  10. Heya just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different internet browsers and both show the same outcome.

    回复

AshWed进行回复 取消回复

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