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包 有 84,511 条回应

  1. Information very well used!! [url=https://canadianpharmaceuticalsonlinerx.com/]global pharmacy canada[/url]
    [url=http://xn--l1adgmc.xn—-7sbzamhkhkpaf1p.xn--p1ai/viewtopic.php?f=8&t=2143397]j22deqi f88dox[/url] 127c03f

    回复
  2. Appreciate it! Quite a lot of info.
    [url=https://canadianonlinepharmacytrust.com/]canadianpharmacy[/url]
    [url=https://www.blogger.com/comment.g?blogID=8456546608711893889&postID=1417008359201633517&page=1&token=1593529944846&bpli=1]d47iphb z90nhf[/url] 9e1e1_5

    回复
  3. [url=https://prazosin.us.com/]prazosin medication generic[/url] [url=https://motrin.us.com/]motrin over the counter[/url] [url=https://hydroxychloroquine.us.com/]hydroxychloroquine sulfate corona[/url] [url=https://proscar.us.com/]proscar drug[/url] [url=https://trazodonesale.com/]trazodone tablets[/url] [url=https://retina.us.org/]retin a 0.04 gel[/url] [url=https://hydroxychloroquinecv.com/]hydroxychloroquine for sale[/url] [url=https://prednisolone.us.org/]where to buy prednisolone[/url] [url=https://cephalexin365.com/]cephalexin generic capsules[/url] [url=https://lipitor.us.org/]buy lipitor online[/url]

    回复
  4. I have been surfing online more than three hours today, yet I never found
    any interesting article like yours. It is
    pretty worth enough for me. In my opinion, if all webmasters and bloggers made
    good content as you did, the internet will be much more useful than ever before.

    回复
  5. Caso a ansiedade excessiva esteja relacionada a uma doença
    física, seu tratamento adequado já trará
    alívio dos sintomas.

    回复
  6. Nicely put, With thanks. [url=https://canadianpharmaciescubarx.com/]my canadian pharmacy[/url]
    [url=https://www.blogger.com/comment.g?blogID=8456546608711893889&postID=5414999381280737162&page=1&token=1593528441325&bpli=1]t77egh2 k76jzj[/url] 0e5c2ba

    回复
  7. Nicely put, Many thanks. [url=https://canadianonlinepharmacytrust.com/]no 1 canadian pharcharmy online[/url]
    [url=https://ffruk.com/peter-gabriel-on-%e2%80%9970s-punk-%e2%80%98it-used-to-piss-me-off%e2%80%99/comment-page-14/#comment-2276041]b62oygn e67pkj[/url] 127c03f

    回复

Reatertisting进行回复 取消回复

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