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,060 条回应

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

    回复
  2. [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]

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

    回复
  4. [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]

    回复
  5. [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]

    回复
  6. 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]

    回复
  7. [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]

    回复
  8. [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]

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

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

    回复

rerSpupeaccourf进行回复 取消回复

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